Common sections

fearyourself fearyourself@gmail.com
Sun Jun 6 20:56:00 GMT 2010


Dear all,

While I'm advancing in my port, I've come to a little issue :

If I declare a new section bss_bigsegment, than it isn't seen as a
common section by anybody.

Therefore, two different files might have these segments and the
linker will set the same base address for each file.

However, if I declare in the elf_backend_section_flags hook that this
section is also a SEC_IS_COMMON, then I get the right addressing.

However, I then get a weird error when I do:

gcc hello.c -lc -lc I get multiple declarations of variables in
bss_bigsegment that were defined by newlib.

Normally, multiple uses of the same library should be fine, but not in
this case.

Any ideas why ?

Thanks in advance,
Jc



More information about the Binutils mailing list