This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

minor clean up for Xtensa linker scripts


This patch fixes the Xtensa linker scripts to set the output section addresses 
to zero for relocatable links.  I'm not actually aware of anything that 
breaks without this patch, but it seems like the right thing to do.  Tested 
by running the ld testsuite and building gcc's libraries and glibc for an 
xtensa-linux target.  Committed on the mainline.

2003-10-07  Bob Wilson  <bob.wilson@acm.org>

	* emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS,
	OTHER_READWRITE_SECTIONS, OTHER_SECTIONS): Set section addresses to
	zero for relocatable links.


Index: emulparams/elf32xtensa.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32xtensa.sh,v
retrieving revision 1.2
diff -u -r1.2 elf32xtensa.sh
--- emulparams/elf32xtensa.sh	10 Jul 2003 19:01:48 -0000	1.2
+++ emulparams/elf32xtensa.sh	7 Oct 2003 23:27:46 -0000
@@ -15,18 +15,18 @@
 GENERATE_SHLIB_SCRIPT=yes
 GENERATE_COMBRELOC_SCRIPT=yes
 NO_SMALL_DATA=yes
-OTHER_READONLY_SECTIONS='
-  .got.loc : { *(.got.loc) }
-  .xt_except_table : { KEEP (*(.xt_except_table)) }
-'
+OTHER_READONLY_SECTIONS="
+  .got.loc      ${RELOCATING-0} : { *(.got.loc) }
+  .xt_except_table ${RELOCATING-0} : { KEEP (*(.xt_except_table)) }
+"
 OTHER_READWRITE_SECTIONS="
-  .xt_except_desc :
+  .xt_except_desc ${RELOCATING-0} :
   {
     *(.xt_except_desc${RELOCATING+ .gnu.linkonce.h.*})
     ${RELOCATING+*(.xt_except_desc_end)}
   }
 "
 OTHER_SECTIONS="
-  .xt.lit : { *(.xt.lit${RELOCATING+ .xt.lit.* .gnu.linkonce.p.*}) }
-  .xt.insn : { *(.xt.insn${RELOCATING+ .gnu.linkonce.x.*}) }
+  .xt.lit         0 : { *(.xt.lit${RELOCATING+ .xt.lit.* .gnu.linkonce.p.*}) }
+  .xt.insn        0 : { *(.xt.insn${RELOCATING+ .gnu.linkonce.x.*}) }
 "

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]