Re: [PATCH 1/2] sh: align .bss section padding to 8-byte boundary

David Laight <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.kernel
Message-ID <20250313093838.10749599@pumpkin>
On Wed, 12 Mar 2025 10:47:00 +0100
Geert Uytterhoeven <[email protected]> wrote:

> Hi Uros,
> 
> On Wed, 12 Mar 2025 at 09:32, Uros Bizjak <[email protected]> wrote:
> > On Wed, Mar 12, 2025 at 9:22 AM John Paul Adrian Glaubitz
> > <[email protected]> wrote:  
....
> > > OK. FWIW, do you understand what SBSS is for? I couldn't find any explanation
> > > for it.  
> >
> > Small BSS section. The compiler can put data objects under a certain
> > size threshold to the .sbss section. Looking at GCC sh config, sh does
> > not use this section.  

The .sbss (and .sdata) sections are used by some architectures (eg Nios2)
for data that can be accessed using a 16bit offset from a fixed register.
(Although using the register as global register variable generates better code.)
Historically they may have been used for data at the top/bottom of the
addresses space (for the same reason).

There is no reason to just use it for 'small' (eg 8 bytes or less)
data, that is just some empirical default.

I guess they could also be used on cpu like the strongarm for memory
that used the 'small data cache' (useful for screen buffer memory!).

	David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.