This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[PATCH, RFC] Fix _bfd_elf_provide_symbols for weak imports
- From: Julian Brown <julian at codesourcery dot com>
- To: binutils at sources dot redhat dot com
- Cc: Julian Brown <julian at codesourcery dot com>
- Date: Wed, 27 Apr 2005 20:31:34 +0100
- Subject: [PATCH, RFC] Fix _bfd_elf_provide_symbols for weak imports
Hi,
This patch fixes running __libc_{init,fini}_array (for
.{init,fini}_array sections) with Newlib. The symbols
__init_array_{start,end} etc. are imported as weak in Newlib, which
conflicts with (I think) this change to use
gld${EMULATION_NAME}_provide_bound_symbols rather than a linker script,
to provide such symbols:
http://sources.redhat.com/ml/binutils/2005-03/msg00688.html
Without the patch, the symbols resolved to zero, which stops static
object construction/destruction from working. This affects the current
csl-arm-branch gcc (and also soon mainline for the ARM EABI target, with
a patch that is currently blocked on this problem).
Tested on arm-none-eabi with cross and with all targets on
i686-pc-linux-gnu.
OK to apply?
Julian
ChangeLog:
bfd/
* elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak import.