This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: The .sbss section on ELF/x86
> Date: Mon, 26 Nov 2001 16:23:13 -0800
> From: "H . J . Lu" <hjl@lucon.org>
> Cc: binutils@sourceware.cygnus.com
> Content-Disposition: inline
> User-Agent: Mutt/1.2.5i
>
> On Tue, Nov 27, 2001 at 12:42:46AM +0100, Jakub Jelinek wrote:
> > On Tue, Nov 27, 2001 at 10:00:48AM +1030, Alan Modra wrote:
> > > On Mon, Nov 26, 2001 at 12:13:01PM -0800, H . J . Lu wrote:
> > > > I am not aware ELF/x86 ever uses .sbss. But there is always an empty
> > > > .sbss section in every x86 ELF binart. Does it have to be therre?
> > >
> > > No. From memory, I think the PROVIDEs in the sbss output section
> > > will create the section.
> >
> > So IMHO there is the question whether ld should provide __sbss_start etc.
> > symbols even if there is no .sbss section or not.
> > If yes, then the linker script should be:
> > __bss_start = .;
> > PROVIDE (__sbss_start = .);
> > PROVIDE (___sbss_start = .);
> > .sbss :
> > {
> > *(.dynsbss)
> > *(.sbss)
> > *(.sbss.*)
> > *(.gnu.linkonce.sb.*)
> > *(.scommon)
> > }
> > PROVIDE (__sbss_end = .);
> > PROVIDE (___sbss_end = .);
> > .bss :
> > {
> > *(.dynbss)
> > *(.bss)
> > *(.bss.*)
> > *(.gnu.linkonce.b.*)
> > *(COMMON)
> >
> > if not, then either PROVIDE should be changed, so that it is skipped if the
> > containing output section is empty, or some other keyword should be used
> > instead. Having empty .sbss in every binary/library is strange...
> >
>
> Geoff, I think your patch:
>
> http://sources.redhat.com/ml/binutils/2000-04/msg00125.html
>
> caused the empty .sbss section. Could you please tell us how to remove
> the empty .sbss section? If only PPC needs it, can we turn them on only
> when needed?
I'm not sure what needs it now---that patch went in over a year ago,
it's quite likely that something else is now using those symbols. Is
there some reason why it's causing problems?
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>