This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: PR 445: A64 linker complains short data segment overflowed
- From: "H. J. Lu" <hjl at lucon dot org>
- To: jakub at redhat dot com
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 13 Oct 2004 14:58:07 -0700
- Subject: PATCH: PR 445: A64 linker complains short data segment overflowed
Hi Jakub,
Your patch
http://sources.redhat.com/ml/binutils/2004-05/msg00143.html
caused
http://sources.redhat.com/bugzilla/show_bug.cgi?id=445
This patch seems to work for me.
H.J.
---
2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
PR 445
* scripttempl/elf.sc: If NO_SMALL_DATA is not set, move
.ctors/.dtors after .data.
--- ld/scripttempl/elf.sc.small 2004-10-04 10:29:49.000000000 -0700
+++ ld/scripttempl/elf.sc 2004-10-13 14:41:24.716556281 -0700
@@ -347,8 +347,8 @@ cat <<EOF
.fini_array ${RELOCATING-0} : { KEEP (*(.fini_array)) }
${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}}
- ${RELOCATING+${CTOR}}
- ${RELOCATING+${DTOR}}
+ ${NO_SMALL_DATA+${RELOCATING+${CTOR}}}
+ ${NO_SMALL_DATA+${RELOCATING+${DTOR}}}
.jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
${RELOCATING+${DATARELRO}}
@@ -372,6 +372,8 @@ cat <<EOF
.data1 ${RELOCATING-0} : { *(.data1) }
${WRITABLE_RODATA+${RODATA}}
${OTHER_READWRITE_SECTIONS}
+ ${NO_SMALL_DATA-${RELOCATING+${CTOR}}}
+ ${NO_SMALL_DATA-${RELOCATING+${DTOR}}}
${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
${RELOCATING+${OTHER_GOT_SYMBOLS}}
${NO_SMALL_DATA-${GOT}}