* .bss section marked as contents, load, alloc, data
@ 2004-04-06 21:22 Nick Kelsey
2004-04-06 21:35 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Nick Kelsey @ 2004-04-06 21:22 UTC (permalink / raw)
To: binutils
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.
Thanks
Nick
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: .bss section marked as contents, load, alloc, data
2004-04-06 21:22 .bss section marked as contents, load, alloc, data Nick Kelsey
@ 2004-04-06 21:35 ` Daniel Jacobowitz
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-04-06 21:35 UTC (permalink / raw)
To: Nick Kelsey; +Cc: binutils
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: .bss section marked as contents, load, alloc, data
@ 2004-04-06 23:37 Nick Kelsey
0 siblings, 0 replies; 5+ messages in thread
From: Nick Kelsey @ 2004-04-06 23:37 UTC (permalink / raw)
To: binutils
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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: .bss section marked as contents, load, alloc, data
2004-04-06 21:57 Jafa
@ 2004-04-06 23:29 ` Ben Elliston
0 siblings, 0 replies; 5+ messages in thread
From: Ben Elliston @ 2004-04-06 23:29 UTC (permalink / raw)
To: binutils
"Jafa" <jafa@silicondust.com> writes:
> I guess I will have to run gdb on the linker :-(
My first port of call would be the linker script, especially if you
aren't using the default linker script.
Ben
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: .bss section marked as contents, load, alloc, data
@ 2004-04-06 21:57 Jafa
2004-04-06 23:29 ` Ben Elliston
0 siblings, 1 reply; 5+ messages in thread
From: Jafa @ 2004-04-06 21:57 UTC (permalink / raw)
To: binutils
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-04-06 23:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-06 21:22 .bss section marked as contents, load, alloc, data Nick Kelsey
2004-04-06 21:35 ` Daniel Jacobowitz
2004-04-06 21:57 Jafa
2004-04-06 23:29 ` Ben Elliston
2004-04-06 23:37 Nick Kelsey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).