This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: .bss section marked as contents, load, alloc, data


Ok... found the problem...

Added a printf to _bfd_elf_make_section_from_shdr and it was setting the
SEC_LOAD flag because some assembler code was not using @nobits.

Because it was the linker appling the flag it does not show up as a flag in
the .o file.

My main concern now is someone forgetting @nobits and causing the same
problem again.

It is working now... thanks for the advice.

Nick

----- Original Message ----- 
From: "Jafa" <jafa@silicondust.com>
To: <binutils@sources.redhat.com>
Sent: Tuesday, April 06, 2004 2:57 PM
Subject: Re: .bss section marked as contents, load, alloc, data


> Yep... checked libgcc.a, libgdb.a, and every .o file in the application...
> all report ALLOC.
>
> I guess I will have to run gdb on the linker :-(
>
> Nick
>
> On Tue, Apr 06, 2004 at 02:21:42PM -0700, Nick Kelsey wrote:
> > Hi guys,
> >
> > I am having a problem whereby all our elf files have the .bss section
> marked
> > as loadable:
> >
> > 10 .bss          000016a4  0010158c  0010158c  0000258c  2**4
> >                  CONTENTS, ALLOC, LOAD, DATA
> >
> > I ran objdump -h on all .o files being linked and all show:
> >
> >   2 .bss          00000000  00000000  00000000  00000034  2**0
> >                   ALLOC
> >
> > Which looks correct.
> >
> > Something must be making the linker think that it is loadable... but I
> have
> > no idea what.
> >
> > Any advice as to how to trace the problem would be appreciated.
>
> Are you sure you checked every library, archive, or system startup file
> being linked?  I had a bad .sbss in crt0.o recently...
>
> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]