This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
powerpc64-linux infrastructure 3 of 6
- To: binutils at sourceware dot cygnus dot com
- Subject: powerpc64-linux infrastructure 3 of 6
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Wed, 8 Aug 2001 22:42:59 +0930
Some tweaks to elf.sc.
a) I've renamed OTHER_GOT_SECTIONS to OTHER_SDATA_SECTIONS because it
came after .sdata, and I wanted to add a section immediately after .got.
All defines of OTHER_GOT_SECTIONS renamed, except those in elf64_ia64.sh
and elf64_aix.sh as it seems natural to me to put .IA_64.pltoff
immediately after .got. (In any case these targets don't use .sdata).
b) Move .dynamic so that it doesn't sit between .got and .plt when BSS_PLT
is defined.
ld/ChangeLog
* scripttempl/elf.sc: Move non-text .dynamic section before
.plt/.got/.sdata* group.
(OTHER_GOT_SECTIONS): Move to immediately after .got.
(OTHER_SDATA_SECTIONS): Add.
* emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
OTHER_GOT_SECTIONS.
* emulparams/crislinux.sh: Likewise.
* emulparams/elf32b4300.sh: Likewise.
* emulparams/elf32bmip.sh: Likewise.
* emulparams/elf32bmipn32.sh: Likewise.
* emulparams/elf32bsmip.sh: Likewise.
* emulparams/elf32btsmip.sh: Likewise.
* emulparams/elf32ebmip.sh: Likewise.
* emulparams/elf32elmip.sh: Likewise.
* emulparams/elf32l4300.sh: Likewise.
* emulparams/elf32lmip.sh: Likewise.
* emulparams/elf32lsmip.sh: Likewise.
* emulparams/elf32ltsmip.sh: Likewise.
* emulparams/elf64bmip.sh: Likewise.
* emulparams/elf64btsmip.sh: Likewise.
* emulparams/elf64ltsmip.sh: Likewise.
I won't apply this one immediately in case anyone has objections,
especially to the .dynamic move.
--
Alan Modra
Index: ld/scripttempl/elf.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf.sc,v
retrieving revision 1.18
diff -u -p -r1.18 elf.sc
--- elf.sc 2001/07/03 23:22:20 1.18
+++ elf.sc 2001/08/08 05:17:05
@@ -17,7 +17,8 @@
# DATA_START_SYMBOLS - symbols that appear at the start of the
# .data section.
# OTHER_GOT_SYMBOLS - symbols defined just before .got.
-# OTHER_GOT_SECTIONS - sections just after .got and .sdata.
+# OTHER_GOT_SECTIONS - sections just after .got.
+# OTHER_SDATA_SECTIONS - sections just after .sdata.
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
# .bss section besides __bss_start.
# DATA_PLT - .plt should be in data segment, not text segment.
@@ -308,14 +309,15 @@ SECTIONS
.gcc_except_table : { *(.gcc_except_table) }
${WRITABLE_RODATA+${RODATA}}
${RELOCATING+${OTHER_READWRITE_SECTIONS}}
+ ${TEXT_DYNAMIC-${DYNAMIC}}
${RELOCATING+${CTOR}}
${RELOCATING+${DTOR}}
${DATA_PLT+${PLT}}
${RELOCATING+${OTHER_GOT_SYMBOLS}}
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
+ ${RELOCATING+${OTHER_GOT_SECTIONS}}
${CREATE_SHLIB+${SDATA2}}
${CREATE_SHLIB+${SBSS2}}
- ${TEXT_DYNAMIC-${DYNAMIC}}
/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
@@ -326,7 +328,7 @@ SECTIONS
${RELOCATING+*(.sdata.*)}
${RELOCATING+*(.gnu.linkonce.s.*)}
}
- ${RELOCATING+${OTHER_GOT_SECTIONS}}
+ ${RELOCATING+${OTHER_SDATA_SECTIONS}}
${RELOCATING+_edata = .;}
${RELOCATING+PROVIDE (edata = .);}
${RELOCATING+__bss_start = .;}
Index: ld/emulparams/criself.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/criself.sh,v
retrieving revision 1.3
diff -u -p -r1.3 criself.sh
--- criself.sh 2001/04/05 20:37:54 1.3
+++ criself.sh 2001/08/08 05:17:05
@@ -36,7 +36,7 @@ OTHER_READONLY_SECTIONS='PROVIDE (__Etex
DATA_START_SYMBOLS='PROVIDE (__Sdata = .);'
# Smuggle an "OTHER_DATA_END_SYMBOLS" here.
-OTHER_GOT_SECTIONS='PROVIDE (__Edata = .);'
+OTHER_SDATA_SECTIONS='PROVIDE (__Edata = .);'
# If .bss does not immediately follow .data but has its own start
# address, we can't get to it with OTHER_BSS_SYMBOLS, neither can we
Index: ld/emulparams/crislinux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/crislinux.sh,v
retrieving revision 1.4
diff -u -p -r1.4 crislinux.sh
--- crislinux.sh 2001/04/05 20:37:54 1.4
+++ crislinux.sh 2001/08/08 05:17:05
@@ -26,7 +26,7 @@ OTHER_READONLY_SECTIONS='PROVIDE (__Etex
DATA_START_SYMBOLS='PROVIDE (__Sdata = .);'
# Smuggle an "OTHER_DATA_END_SYMBOLS" here.
-OTHER_GOT_SECTIONS='PROVIDE (__Edata = .);'
+OTHER_SDATA_SECTIONS='PROVIDE (__Edata = .);'
OTHER_BSS_SYMBOLS='PROVIDE (__Sbss = .);'
OTHER_BSS_END_SYMBOLS='PROVIDE (__Ebss = .);'
Index: ld/emulparams/elf32b4300.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32b4300.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 elf32b4300.sh
--- elf32b4300.sh 1999/05/03 07:29:07 1.1.1.1
+++ elf32b4300.sh 2001/08/08 05:17:05
@@ -9,7 +9,7 @@ OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf32bmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32bmip.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 elf32bmip.sh
--- elf32bmip.sh 1999/05/03 07:29:07 1.1.1.1
+++ elf32bmip.sh 2001/08/08 05:17:05
@@ -13,7 +13,7 @@ OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf32bmipn32.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32bmipn32.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32bmipn32.sh
--- elf32bmipn32.sh 1999/07/19 20:21:52 1.2
+++ elf32bmipn32.sh 2001/08/08 05:17:05
@@ -17,7 +17,7 @@ ENTRY=__start
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
.srdata : { *(.srdata) }
Index: ld/emulparams/elf32bsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32bsmip.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 elf32bsmip.sh
--- elf32bsmip.sh 1999/05/03 07:29:07 1.1.1.1
+++ elf32bsmip.sh 2001/08/08 05:17:05
@@ -13,7 +13,7 @@ OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf32btsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32btsmip.sh,v
retrieving revision 1.1
diff -u -p -r1.1 elf32btsmip.sh
--- elf32btsmip.sh 2000/07/02 01:15:56 1.1
+++ elf32btsmip.sh 2001/08/08 05:17:05
@@ -13,7 +13,7 @@ OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf32ebmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32ebmip.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 elf32ebmip.sh
--- elf32ebmip.sh 1999/05/03 07:29:07 1.1.1.1
+++ elf32ebmip.sh 2001/08/08 05:17:05
@@ -10,7 +10,7 @@ OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf32elmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32elmip.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 elf32elmip.sh
--- elf32elmip.sh 1999/05/03 07:29:07 1.1.1.1
+++ elf32elmip.sh 2001/08/08 05:17:05
@@ -10,7 +10,7 @@ OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf32l4300.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32l4300.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 elf32l4300.sh
--- elf32l4300.sh 1999/05/03 07:29:07 1.1.1.1
+++ elf32l4300.sh 2001/08/08 05:17:05
@@ -9,7 +9,7 @@ OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf32lmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32lmip.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 elf32lmip.sh
--- elf32lmip.sh 1999/05/03 07:29:07 1.1.1.1
+++ elf32lmip.sh 2001/08/08 05:17:05
@@ -13,7 +13,7 @@ OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf32lsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32lsmip.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 elf32lsmip.sh
--- elf32lsmip.sh 1999/05/03 07:29:07 1.1.1.1
+++ elf32lsmip.sh 2001/08/08 05:17:05
@@ -13,7 +13,7 @@ OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf32ltsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32ltsmip.sh,v
retrieving revision 1.1
diff -u -p -r1.1 elf32ltsmip.sh
--- elf32ltsmip.sh 2001/04/08 05:13:57 1.1
+++ elf32ltsmip.sh 2001/08/08 05:17:05
@@ -13,7 +13,7 @@ OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf64bmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64bmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf64bmip.sh
--- elf64bmip.sh 1999/07/19 20:21:52 1.2
+++ elf64bmip.sh 2001/08/08 05:17:05
@@ -20,7 +20,7 @@ ENTRY=__start
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
.srdata : { *(.srdata) }
Index: ld/emulparams/elf64btsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64btsmip.sh,v
retrieving revision 1.1
diff -u -p -r1.1 elf64btsmip.sh
--- elf64btsmip.sh 2001/04/08 05:13:57 1.1
+++ elf64btsmip.sh 2001/08/08 05:17:05
@@ -25,7 +25,7 @@ ENTRY=__start
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'
Index: ld/emulparams/elf64ltsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64ltsmip.sh,v
retrieving revision 1.1
diff -u -p -r1.1 elf64ltsmip.sh
--- elf64ltsmip.sh 2001/04/08 05:13:57 1.1
+++ elf64ltsmip.sh 2001/08/08 05:17:05
@@ -25,7 +25,7 @@ ENTRY=__start
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_GOT_SECTIONS='
+OTHER_SDATA_SECTIONS='
.lit8 : { *(.lit8) }
.lit4 : { *(.lit4) }
'