This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Common sections
- From: fearyourself <fearyourself at gmail dot com>
- To: binutils at sourceware dot org
- Date: Sun, 6 Jun 2010 16:56:11 -0400
- Subject: Common sections
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