This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: Do not create __exidx_{start,end} for ld -r
- From: Mark Mitchell <mark at codesourcery dot com>
- To: binutils at sources dot redhat dot com
- Cc: paul at codesourcery dot com
- Date: Tue, 26 Oct 2004 23:06:05 -0700
- Subject: PATCH: Do not create __exidx_{start,end} for ld -r
- Reply-to: mark at codesourcery dot com
The armelf.sh configuration is presently creating the
__exidx_{start,end} even when not relocating, e.g., when doing "ld
-r". That's incorrect; these symbols should only be defined when
creating a shared library or executable.
OK to commit?
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2004-10-26 Mark Mitchell <mark@codesourcery.com>
* emulparams/armelf.sh (OTHER_READONLY_SECTIONS): Do not emit
__exidx_{start,end} when not relocating.
Index: emulparams/armelf.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/armelf.sh,v
retrieving revision 1.13
diff -c -5 -p -r1.13 armelf.sh
*** emulparams/armelf.sh 1 Oct 2004 12:59:34 -0000 1.13
--- emulparams/armelf.sh 27 Oct 2004 06:02:14 -0000
*************** OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue
*** 10,22 ****
OTHER_BSS_SYMBOLS='__bss_start__ = .;'
OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
OTHER_READONLY_SECTIONS="
.ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
! __exidx_start = .;
.ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
! __exidx_end = .;"
DATA_START_SYMBOLS='__data_start = . ;';
GENERATE_SHLIB_SCRIPT=yes
--- 10,22 ----
OTHER_BSS_SYMBOLS='__bss_start__ = .;'
OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
OTHER_READONLY_SECTIONS="
.ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
! ${RELOCATING+ __exidx_start = .; }
.ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
! ${RELOCATING+ __exidx_end = .; }"
DATA_START_SYMBOLS='__data_start = . ;';
GENERATE_SHLIB_SCRIPT=yes