This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
elf.sc input section changes
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Thu, 22 Nov 2001 01:23:48 +1030
- Subject: elf.sc input section changes
The meat of this patch changes input section ordering to better support
group section removal of eh and debug info. The idea being to place
input sections to an output section in the same order they are
encountered. eg. Where we previously had the following in a script,
.data :
{
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
}
which places all .data sections together before .data.* etc., we now have
.data :
{
*(.data .data.* .gnu.linkonce.d.*)
}
which doesn't reorder the input sections.
That little explanation covers the first two lines of the ChangeLog.
The rest is a general cleanup. Yet to come are changes to place_orphan,
and/or addition of more input sections for the dwarf2 output sections.
ld/ChangeLog
* scripttempl/elf.sc: Order <section>, <section>.* and
corresponding linkonce sections as seen in input files.
Formatting fixes. Zero vma of all sections if not relocating.
(STACK): Define and insert if STACK_ADDR defined.
(OTHER_RELOCATING_SECTIONS): Delete.
(OTHER_END_SYMBOLS): Define.
(OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
(OTHER_READWRITE_SECTIONS): Likewise.
(OTHER_GOT_SECTIONS): Likewise.
(OTHER_SDATA_SECTIONS): Likewise.
(OTHER_BSS_SECTIONS): Likewise.
* scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
(OTHER_READWRITE_SECTIONS): Likewise.
* scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
(OTHER_READWRITE_SECTIONS): Likewise
* emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
(STACK_ADDR): Define.
* emulparams/armelf_oabi.sh: As for armelf.sh.
* emulparams/elf32mcore.sh: As for armelf.sh.
* emulparams/h8300elf.sh: As for armelf.sh.
* emulparams/mn10200.sh: As for armelf.sh.
* emulparams/shelf.sh: As for armelf.sh.
* emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
(OTHER_END_SYMBOLS): Define.
* emulparams/m32relf.sh: As for elf32fr30.sh.
* emulparams/h8300helf.sh: As for elf32fr30.sh.
* emulparams/h8300self.sh: As for elf32fr30.sh.
* emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
defines with RELOCATING test.
(OTHER_SDATA_SECTIONS): Likewise.
(OTHER_RELOCATING_SECTIONS): Delete, replacing with..
(OTHER_END_SYMBOLS): ..this.
* emulparams/crislinux.sh: As for criself.sh.
* emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
if not relocating.
(OTHER_RELOCATING_SECTIONS): Delete, replacing with..
(OTHER_SECTIONS): ..this. Zero vma if not relocating. Order
normal and linkonce sections as seen in input files.
* emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
(TEXT_DYNAMIC): Likewise.
(INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
(OTHER_SDATA_SECTIONS): Likewise.
* emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
* emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
* emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
* emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
* emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
(OTHER_PLT_RELOC_SECTIONS): Likewise.
(OTHER_READONLY_SECTIONS): Likewise. Order normal and linkonce
sections as seen in input files.
* emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
* emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
if not relocating.
(OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
(OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
* emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
(OTHER_SECTIONS): Instead, use this..
(OTHER_END_SYMBOLS): ..and this.
* emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
* emulparams/elf32bsmip.sh: Likewise.
* emulparams/elf32btsmip.sh: Likewise.
* emulparams/elf32ebmip.sh: Likewise.
* emulparams/elf32lmip.sh: Likewise.
* emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
* emulparams/elf32lsmip.sh: Likewise.
* emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
* emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
* emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
* emulparams/elf64btsmip.sh: Likewise.
* emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
* emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
* emulparams/elf32ppclinux.sh: Likewise.
* emulparams/elf32ppcsim.sh: Likewise.
* emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
* emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
* emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
* emulparams/h8300self.sh: Likewise.
* emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
* emulparams/sh.sh: Comment.
* emulparams/shl.sh: Source sh.sh, remove duplicates.
* emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
* emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
--
Alan Modra
Index: ld/emulparams/armelf.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/armelf.sh,v
retrieving revision 1.5
diff -u -p -r1.5 armelf.sh
--- armelf.sh 2001/11/12 14:39:11 1.5
+++ armelf.sh 2001/11/21 14:08:32
@@ -20,6 +20,5 @@ MAXPAGESIZE=256
ENTRY=_start
EMBEDDED=yes
-# Hmmm, there's got to be a better way. This sets the stack to the
-# top of the simulator memory (2^19 bytes).
-OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x80000
Index: ld/emulparams/armelf_oabi.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/armelf_oabi.sh,v
retrieving revision 1.2
diff -u -p -r1.2 armelf_oabi.sh
--- armelf_oabi.sh 1999/05/26 17:23:31 1.2
+++ armelf_oabi.sh 2001/11/21 14:08:32
@@ -16,6 +16,5 @@ MAXPAGESIZE=256
ENTRY=_start
EMBEDDED=yes
-# Hmmm, there's got to be a better way. This sets the stack to the
-# top of the simulator memory (2^19 bytes).
-OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x80000
Index: ld/emulparams/criself.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/criself.sh,v
retrieving revision 1.4
diff -u -p -r1.4 criself.sh
--- criself.sh 2001/08/09 14:25:59 1.4
+++ criself.sh 2001/11/21 14:08:32
@@ -32,11 +32,11 @@ __start = DEFINED(__start) ? __start :
'
# Smuggle an "OTHER_TEXT_END_SYMBOLS" here.
-OTHER_READONLY_SECTIONS='PROVIDE (__Etext = .);'
+OTHER_READONLY_SECTIONS="${RELOCATING+PROVIDE (__Etext = .);}"
DATA_START_SYMBOLS='PROVIDE (__Sdata = .);'
# Smuggle an "OTHER_DATA_END_SYMBOLS" here.
-OTHER_SDATA_SECTIONS='PROVIDE (__Edata = .);'
+OTHER_SDATA_SECTIONS="${RELOCATING+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
@@ -95,11 +95,8 @@ CTOR_END='
___elf_ctors_dtors_end = .;
'
-
-# Smuggle an "OTHER_ALL_END_SYMBOLS" here.
# Also add the other symbols provided for rsim/xsim and elinux.
-OTHER_RELOCATING_SECTIONS='
-PROVIDE (__Eall = .);
-PROVIDE (__Endmem = 0x10000000);
-PROVIDE (__Stacksize = 0);
-'
+OTHER_END_SYMBOLS="
+ PROVIDE (__Eall = .);
+ PROVIDE (__Endmem = 0x10000000);
+ PROVIDE (__Stacksize = 0);"
Index: ld/emulparams/crislinux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/crislinux.sh,v
retrieving revision 1.5
diff -u -p -r1.5 crislinux.sh
--- crislinux.sh 2001/08/09 14:25:59 1.5
+++ crislinux.sh 2001/11/21 14:08:32
@@ -22,18 +22,16 @@ MAXPAGESIZE=8192
TEXT_START_SYMBOLS='PROVIDE (__Stext = .);'
# Smuggle an "OTHER_TEXT_END_SYMBOLS" here.
-OTHER_READONLY_SECTIONS='PROVIDE (__Etext = .);'
+OTHER_READONLY_SECTIONS="${RELOCATING+PROVIDE (__Etext = .);}"
DATA_START_SYMBOLS='PROVIDE (__Sdata = .);'
# Smuggle an "OTHER_DATA_END_SYMBOLS" here.
-OTHER_SDATA_SECTIONS='PROVIDE (__Edata = .);'
+OTHER_SDATA_SECTIONS="${RELOCATING+PROVIDE (__Edata = .);}"
OTHER_BSS_SYMBOLS='PROVIDE (__Sbss = .);'
OTHER_BSS_END_SYMBOLS='PROVIDE (__Ebss = .);'
-# Smuggle an "OTHER_ALL_END_SYMBOLS" here.
# Also add the other symbols provided for rsim/xsim and elinux.
-OTHER_RELOCATING_SECTIONS='
-PROVIDE (__Eall = .);
-PROVIDE(__Endmem = 0x10000000);
-PROVIDE(__Stacksize = 0);
-'
+OTHER_END_SYMBOLS="
+ PROVIDE (__Eall = .);
+ PROVIDE (__Endmem = 0x10000000);
+ PROVIDE (__Stacksize = 0);"
Index: ld/emulparams/elf32b4300.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32b4300.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32b4300.sh
--- elf32b4300.sh 2001/08/09 14:25:59 1.2
+++ elf32b4300.sh 2001/11/21 14:08:32
@@ -1,29 +1,10 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-bigmips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
+# If you change this file, please also look at files which source this one:
+# elf32l4300.sh
+
+EMBEDDED=yes
+. ${srcdir}/emulparams/elf32bmip.sh
TEXT_START_ADDR=0xa0020000
-MAXPAGESIZE=0x40000
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
+unset NONPAGED_TEXT_START_ADDR
+unset SHLIB_TEXT_START_ADDR
EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
DYNAMIC_LINK=false
-EMBEDDED=yes
Index: ld/emulparams/elf32bmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32bmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32bmip.sh
--- elf32bmip.sh 2001/08/09 14:25:59 1.2
+++ elf32bmip.sh 2001/11/21 14:08:32
@@ -1,22 +1,27 @@
+# If you change this file, please also look at files which source this one:
+# elf32b4300.sh elf32bsmip.sh elf32btsmip.sh elf32ebmip.sh elf32lmip.sh
+
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-bigmips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
-DATA_ADDR=0x10000000
+test -n "${EMBEDDED}" || DATA_ADDR=0x10000000
MAXPAGESIZE=0x40000
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
-TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+test -n "${EMBEDDED}" || TEXT_DYNAMIC=
+INITIAL_READONLY_SECTIONS="
+ .reginfo ${RELOCATING-0} : { *(.reginfo) }
+"
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
+OTHER_SDATA_SECTIONS="
+ .lit8 ${RELOCATING-0} : { *(.lit8) }
+ .lit4 ${RELOCATING-0} : { *(.lit4) }
+"
TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
Index: ld/emulparams/elf32bmipn32.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32bmipn32.sh,v
retrieving revision 1.3
diff -u -p -r1.3 elf32bmipn32.sh
--- elf32bmipn32.sh 2001/08/09 14:25:59 1.3
+++ elf32bmipn32.sh 2001/11/21 14:08:32
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# elf64bmip.sh elf64btsmip.sh
+
# This is an ELF platform.
SCRIPT_NAME=elf
@@ -16,12 +19,12 @@ ENTRY=__start
# GOT-related settings.
OTHER_GOT_SYMBOLS='
_gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
- .srdata : { *(.srdata) }
'
+OTHER_SDATA_SECTIONS="
+ .lit8 ${RELOCATING-0} : { *(.lit8) }
+ .lit4 ${RELOCATING-0} : { *(.lit4) }
+ .srdata ${RELOCATING-0} : { *(.srdata) }
+"
# Magic symbols.
TEXT_START_SYMBOLS='_ftext = . ;'
@@ -41,35 +44,28 @@ EXECUTABLE_SYMBOLS="
# segment.
WRITABLE_RODATA=
-OTHER_RELOCATING_SECTIONS='
- .MIPS.events.text :
+OTHER_SECTIONS="
+ .MIPS.events.text ${RELOCATING-0} :
{
- *(.MIPS.events.text)
- *(.MIPS.events.gnu.linkonce.t*)
+ *(.MIPS.events.text${RELOCATING+ .MIPS.events.gnu.linkonce.t*})
}
- .MIPS.content.text :
+ .MIPS.content.text ${RELOCATING-0} :
{
- *(.MIPS.content.text)
- *(.MIPS.content.gnu.linkonce.t*)
+ *(.MIPS.content.text${RELOCATING+ .MIPS.content.gnu.linkonce.t*})
}
- .MIPS.events.data :
+ .MIPS.events.data ${RELOCATING-0} :
{
- *(.MIPS.events.data)
- *(.MIPS.events.gnu.linkonce.d*)
+ *(.MIPS.events.data${RELOCATING+ .MIPS.events.gnu.linkonce.d*})
}
- .MIPS.content.data :
+ .MIPS.content.data ${RELOCATING-0} :
{
- *(.MIPS.content.data)
- *(.MIPS.content.gnu.linkonce.d*)
+ *(.MIPS.content.data${RELOCATING+ .MIPS.content.gnu.linkonce.d*})
}
- .MIPS.events.rodata :
+ .MIPS.events.rodata ${RELOCATING-0} :
{
- *(.MIPS.events.rodata)
- *(.MIPS.events.gnu.linkonce.r*)
+ *(.MIPS.events.rodata${RELOCATING+ .MIPS.events.gnu.linkonce.r*})
}
- .MIPS.content.rodata :
+ .MIPS.content.rodata ${RELOCATING-0} :
{
- *(.MIPS.content.rodata)
- *(.MIPS.content.gnu.linkonce.r*)
- }
-'
+ *(.MIPS.content.rodata${RELOCATING+ .MIPS.content.gnu.linkonce.r*})
+ }"
Index: ld/emulparams/elf32bsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32bsmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32bsmip.sh
--- elf32bsmip.sh 2001/08/09 14:25:59 1.2
+++ elf32bsmip.sh 2001/11/21 14:08:32
@@ -1,31 +1,2 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-bigmips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-TEXT_START_ADDR=0x0400000
-DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-NONPAGED_TEXT_START_ADDR=0x0400000
-SHLIB_TEXT_START_ADDR=0x5ffe0000
-TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
+. ${srcdir}/emulparams/elf32bmip.sh
ENTRY=__start
Index: ld/emulparams/elf32btsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32btsmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32btsmip.sh
--- elf32btsmip.sh 2001/08/09 14:25:59 1.2
+++ elf32btsmip.sh 2001/11/21 14:08:32
@@ -1,31 +1,9 @@
-SCRIPT_NAME=elf
+# If you change this file, please also look at files which source this one:
+# elf32ltsmip.sh
+
+. ${srcdir}/emulparams/elf32bmip.sh
OUTPUT_FORMAT="elf32-tradbigmips"
BIG_OUTPUT_FORMAT="elf32-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips"
-TEXT_START_ADDR=0x0400000
-DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x0
-TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
ENTRY=__start
Index: ld/emulparams/elf32ebmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32ebmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32ebmip.sh
--- elf32ebmip.sh 2001/08/09 14:25:59 1.2
+++ elf32ebmip.sh 2001/11/21 14:08:32
@@ -1,28 +1,2 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-bigmips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-TEXT_START_ADDR=0x0400000
-MAXPAGESIZE=0x40000
-NONPAGED_TEXT_START_ADDR=0x0400000
-SHLIB_TEXT_START_ADDR=0x5ffe0000
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
EMBEDDED=yes
+. ${srcdir}/emulparams/elf32bmip.sh
Index: ld/emulparams/elf32elmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32elmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32elmip.sh
--- elf32elmip.sh 2001/08/09 14:25:59 1.2
+++ elf32elmip.sh 2001/11/21 14:08:32
@@ -1,28 +1,2 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlemips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-TEXT_START_ADDR=0x0400000
-MAXPAGESIZE=0x40000
-NONPAGED_TEXT_START_ADDR=0x0400000
-SHLIB_TEXT_START_ADDR=0x5ffe0000
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
EMBEDDED=yes
+. ${srcdir}/emulparams/elf32lmip.sh
Index: ld/emulparams/elf32fr30.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32fr30.sh,v
retrieving revision 1.3
diff -u -p -r1.3 elf32fr30.sh
--- elf32fr30.sh 2001/08/22 16:00:25 1.3
+++ elf32fr30.sh 2001/11/21 14:08:32
@@ -7,4 +7,4 @@ MAXPAGESIZE=256
ENTRY=_start
EMBEDDED=yes
NOP=0x9fa09fa0
-OTHER_RELOCATING_SECTIONS='PROVIDE (__stack = 0x200000);'
+OTHER_END_SYMBOLS='PROVIDE (__stack = 0x200000);'
Index: ld/emulparams/elf32l4300.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32l4300.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32l4300.sh
--- elf32l4300.sh 2001/08/09 14:25:59 1.2
+++ elf32l4300.sh 2001/11/21 14:08:32
@@ -1,29 +1,4 @@
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/elf32b4300.sh
OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-TEXT_START_ADDR=0xa0020000
-MAXPAGESIZE=0x40000
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-DYNAMIC_LINK=false
-EMBEDDED=yes
Index: ld/emulparams/elf32lmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32lmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32lmip.sh
--- elf32lmip.sh 2001/08/09 14:25:59 1.2
+++ elf32lmip.sh 2001/11/21 14:08:32
@@ -1,30 +1,7 @@
-SCRIPT_NAME=elf
+# If you change this file, please also look at files which source this one:
+# elf32elmip.sh elf32lsmip.sh
+
+. ${srcdir}/emulparams/elf32bmip.sh
OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-TEXT_START_ADDR=0x0400000
-DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-NONPAGED_TEXT_START_ADDR=0x0400000
-SHLIB_TEXT_START_ADDR=0x5ffe0000
-TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
Index: ld/emulparams/elf32lppc.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32lppc.sh,v
retrieving revision 1.3
diff -u -p -r1.3 elf32lppc.sh
--- elf32lppc.sh 2000/12/12 20:15:21 1.3
+++ elf32lppc.sh 2001/11/21 14:08:32
@@ -1,18 +1,5 @@
-TEMPLATE_NAME=elf32
-# If you change this, please also look at:
-# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
-GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elf
+# If you change this file, please also look at files which source this one:
+# elf32lppcsim.sh
+
+. ${srcdir}/emulparams/elf32ppc.sh
OUTPUT_FORMAT="elf32-powerpcle"
-TEXT_START_ADDR=0x01800000
-MAXPAGESIZE=0x10000
-ARCH=powerpc
-MACHINE=
-BSS_PLT=
-EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
-OTHER_BSS_END_SYMBOLS='__end = .;'
-OTHER_READWRITE_SECTIONS='
- .fixup : { *(.fixup) }
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
Index: ld/emulparams/elf32lppcsim.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32lppcsim.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32lppcsim.sh
--- elf32lppcsim.sh 2000/12/12 20:15:21 1.2
+++ elf32lppcsim.sh 2001/11/21 14:08:32
@@ -1,18 +1,2 @@
-TEMPLATE_NAME=elf32
-# If you change this, please also look at:
-# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
-GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpcle"
+. ${srcdir}/emulparams/elf32lppc.sh
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x10000
-ARCH=powerpc
-MACHINE=
-BSS_PLT=
-EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
-OTHER_BSS_END_SYMBOLS='__end = .;'
-OTHER_READWRITE_SECTIONS='
- .fixup : { *(.fixup) }
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
Index: ld/emulparams/elf32lsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32lsmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32lsmip.sh
--- elf32lsmip.sh 2001/08/09 14:25:59 1.2
+++ elf32lsmip.sh 2001/11/21 14:08:32
@@ -1,31 +1,2 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlemips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-TEXT_START_ADDR=0x0400000
-DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-NONPAGED_TEXT_START_ADDR=0x0400000
-SHLIB_TEXT_START_ADDR=0x5ffe0000
-TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
+. ${srcdir}/emulparams/elf32lmip.sh
ENTRY=__start
Index: ld/emulparams/elf32ltsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32ltsmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32ltsmip.sh
--- elf32ltsmip.sh 2001/08/09 14:25:59 1.2
+++ elf32ltsmip.sh 2001/11/21 14:08:32
@@ -1,31 +1,2 @@
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/elf32btsmip.sh
OUTPUT_FORMAT="elf32-tradlittlemips"
-BIG_OUTPUT_FORMAT="elf32-tradbigmips"
-LITTLE_OUTPUT_FORMAT="elf32-tradlittlemips"
-TEXT_START_ADDR=0x0400000
-DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-NONPAGED_TEXT_START_ADDR=0x0400000
-SHLIB_TEXT_START_ADDR=0x0
-TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-ENTRY=__start
Index: ld/emulparams/elf32mcore.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32mcore.sh,v
retrieving revision 1.10
diff -u -p -r1.10 elf32mcore.sh
--- elf32mcore.sh 2001/08/17 09:51:07 1.10
+++ elf32mcore.sh 2001/11/21 14:08:35
@@ -24,9 +24,8 @@ NOP=0x0e0e0e0e
OTHER_BSS_SYMBOLS="__bss_start__ = . ;"
OTHER_BSS_END_SYMBOLS="__bss_end__ = . ;"
-# Hmmm, there's got to be a better way. This sets the stack to the
-# top of the simulator memory (2^19 bytes).
-OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x80000
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
Index: ld/emulparams/elf32ppc.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32ppc.sh,v
retrieving revision 1.4
diff -u -p -r1.4 elf32ppc.sh
--- elf32ppc.sh 2000/12/12 20:15:21 1.4
+++ elf32ppc.sh 2001/11/21 14:08:35
@@ -1,6 +1,7 @@
+# If you change this file, please also look at files which source this one:
+# elf32lppc.sh elf32ppclinux.sh elf32ppcsim.sh
+
TEMPLATE_NAME=elf32
-# If you change this, please also look at:
-# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpc"
@@ -11,8 +12,8 @@ MACHINE=
BSS_PLT=
EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
OTHER_BSS_END_SYMBOLS='__end = .;'
-OTHER_READWRITE_SECTIONS='
- .fixup : { *(.fixup) }
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
+OTHER_READWRITE_SECTIONS="
+ .fixup ${RELOCATING-0} : { *(.fixup) }
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ .got2 ${RELOCATING-0} : { *(.got2) }
+"
Index: ld/emulparams/elf32ppclinux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32ppclinux.sh,v
retrieving revision 1.3
diff -u -p -r1.3 elf32ppclinux.sh
--- elf32ppclinux.sh 2000/04/14 21:18:22 1.3
+++ elf32ppclinux.sh 2001/11/21 14:08:35
@@ -1,18 +1,8 @@
-TEMPLATE_NAME=elf32
-# If you change this, please also look at:
-# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
-GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpc"
+. ${srcdir}/emulparams/elf32ppc.sh
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x10000
-ARCH=powerpc
-MACHINE=
-BSS_PLT=
-OTHER_RELOCATING_SECTIONS='
- /DISCARD/ : { *(.fixup) }
-'
-OTHER_READWRITE_SECTIONS='
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
+unset EXECUTABLE_SYMBOLS
+unset OTHER_BSS_END_SYMBOLS
+test -z "${RELOCATING}" || OTHER_SECTIONS="/DISCARD/ : { *(.fixup) }"
+OTHER_READWRITE_SECTIONS="
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ .got2 ${RELOCATING-0} : { *(.got2) }"
Index: ld/emulparams/elf32ppcsim.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32ppcsim.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf32ppcsim.sh
--- elf32ppcsim.sh 2000/12/12 20:15:21 1.2
+++ elf32ppcsim.sh 2001/11/21 14:08:35
@@ -1,18 +1,2 @@
-TEMPLATE_NAME=elf32
-# If you change this, please also look at:
-# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
-GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpc"
+. ${srcdir}/emulparams/elf32ppc.sh
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x10000
-ARCH=powerpc
-MACHINE=
-BSS_PLT=
-EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
-OTHER_BSS_END_SYMBOLS='__end = .;'
-OTHER_READWRITE_SECTIONS='
- .fixup : { *(.fixup) }
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
Index: ld/emulparams/elf64_aix.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64_aix.sh,v
retrieving revision 1.4
diff -u -p -r1.4 elf64_aix.sh
--- elf64_aix.sh 2001/05/25 12:42:28 1.4
+++ elf64_aix.sh 2001/11/21 14:08:35
@@ -10,7 +10,12 @@ TEXT_START_ADDR="0x10000000"
DATA_ADDR="0x20000000 + (. & (${MAXPAGESIZE} - 1))"
GENERATE_SHLIB_SCRIPT=yes
NOP=0x00300000010070000002000001000400 # a bundle full of nops
-OTHER_GOT_SECTIONS='.IA_64.pltoff : { *(.IA_64.pltoff) }'
-OTHER_PLT_RELOC_SECTIONS='.rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) }'
-OTHER_READONLY_SECTIONS='.opd : { *(.opd) } .IA_64.unwind_info : { *(.IA_64.unwind_info*) *(.gnu.linkonce.ia64unwi.*) } .IA_64.unwind : { *(.IA_64.unwind*) *(.gnu.linkonce.ia64unw.*) }'
+OTHER_GOT_SECTIONS="
+ .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }"
+OTHER_PLT_RELOC_SECTIONS="
+ .rela.IA_64.pltoff ${RELOCATING-0} : { *(.rela.IA_64.pltoff) }"
+OTHER_READONLY_SECTIONS="
+ .opd ${RELOCATING-0} : { *(.opd) }
+ .IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info*${RELOCATING+ .gnu.linkonce.ia64unwi.*}) }
+ .IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind*${RELOCATING+ .gnu.linkonce.ia64unw.*}) }"
LIB_PATH=/usr/lib/ia64l64:/usr/lib:/usr/local/lib
Index: ld/emulparams/elf64_ia64.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64_ia64.sh,v
retrieving revision 1.6
diff -u -p -r1.6 elf64_ia64.sh
--- elf64_ia64.sh 2001/08/13 20:40:31 1.6
+++ elf64_ia64.sh 2001/11/21 14:08:35
@@ -11,6 +11,11 @@ TEXT_START_ADDR="0x4000000000000000"
DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))"
GENERATE_SHLIB_SCRIPT=yes
NOP=0x00300000010070000002000001000400 # a bundle full of nops
-OTHER_GOT_SECTIONS='.IA_64.pltoff : { *(.IA_64.pltoff) }'
-OTHER_PLT_RELOC_SECTIONS='.rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) }'
-OTHER_READONLY_SECTIONS='.opd : { *(.opd) } .IA_64.unwind_info : { *(.IA_64.unwind_info*) *(.gnu.linkonce.ia64unwi.*) } .IA_64.unwind : { *(.IA_64.unwind*) *(.gnu.linkonce.ia64unw.*) }'
+OTHER_GOT_SECTIONS="
+ .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }"
+OTHER_PLT_RELOC_SECTIONS="
+ .rela.IA_64.pltoff ${RELOCATING-0} : { *(.rela.IA_64.pltoff) }"
+OTHER_READONLY_SECTIONS="
+ .opd ${RELOCATING-0} : { *(.opd) }
+ .IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info*${RELOCATING+ .gnu.linkonce.ia64unwi.*}) }
+ .IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind*${RELOCATING+ .gnu.linkonce.ia64unw.*}) }"
Index: ld/emulparams/elf64alpha.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64alpha.sh,v
retrieving revision 1.6
diff -u -p -r1.6 elf64alpha.sh
--- elf64alpha.sh 2001/09/03 06:43:37 1.6
+++ elf64alpha.sh 2001/11/21 14:08:35
@@ -12,7 +12,8 @@ GENERATE_SHLIB_SCRIPT=yes
DATA_PLT=
NOP=0x47ff041f
-OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
+OTHER_READONLY_SECTIONS="
+ .reginfo ${RELOCATING-0} : { *(.reginfo) }"
# This code gets inserted into the generic elf32.sc linker script
# and allows us to define our own command line switches.
Index: ld/emulparams/elf64bmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64bmip.sh,v
retrieving revision 1.3
diff -u -p -r1.3 elf64bmip.sh
--- elf64bmip.sh 2001/08/09 14:25:59 1.3
+++ elf64bmip.sh 2001/11/21 14:08:35
@@ -1,79 +1,12 @@
-# This is an ELF platform.
-SCRIPT_NAME=elf
-
-# Handle both big- and little-ended 32-bit MIPS objects.
-ARCH=mips
+. ${srcdir}/emulparams/elf32bmipn32.sh
OUTPUT_FORMAT="elf64-bigmips"
BIG_OUTPUT_FORMAT="elf64-bigmips"
LITTLE_OUTPUT_FORMAT="elf64-littlemips"
-
-# Note that the elf32 template is used for 64-bit emulations as well
-# as 32-bit emulations.
ELFSIZE=64
-TEMPLATE_NAME=elf32
-
-TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x100000
-ENTRY=__start
-
-# GOT-related settings.
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
- .srdata : { *(.srdata) }
-'
-# Magic symbols.
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
# IRIX6 defines these symbols. 0x40 is the size of the ELF header.
EXECUTABLE_SYMBOLS="
__dso_displacement = 0;
__elf_header = ${TEXT_START_ADDR};
__program_header_table = ${TEXT_START_ADDR} + 0x40;
"
-
-# There are often dynamic relocations against the .rodata section.
-# Setting DT_TEXTREL in the .dynamic section does not convince the
-# IRIX6 linker to permit relocations against the text segment.
-# Following the IRIX linker, we simply put .rodata in the data
-# segment.
-WRITABLE_RODATA=
-
-
-OTHER_RELOCATING_SECTIONS='
- .MIPS.events.text :
- {
- *(.MIPS.events.text)
- *(.MIPS.events.gnu.linkonce.t*)
- }
- .MIPS.content.text :
- {
- *(.MIPS.content.text)
- *(.MIPS.content.gnu.linkonce.t*)
- }
- .MIPS.events.data :
- {
- *(.MIPS.events.data)
- *(.MIPS.events.gnu.linkonce.d*)
- }
- .MIPS.content.data :
- {
- *(.MIPS.content.data)
- *(.MIPS.content.gnu.linkonce.d*)
- }
- .MIPS.events.rodata :
- {
- *(.MIPS.events.rodata)
- *(.MIPS.events.gnu.linkonce.r*)
- }
- .MIPS.content.rodata :
- {
- *(.MIPS.content.rodata)
- *(.MIPS.content.gnu.linkonce.r*)
- }
-'
Index: ld/emulparams/elf64btsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64btsmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf64btsmip.sh
--- elf64btsmip.sh 2001/08/09 14:25:59 1.2
+++ elf64btsmip.sh 2001/11/21 14:08:35
@@ -1,39 +1,20 @@
-# This is an ELF platform.
-SCRIPT_NAME=elf
+# If you change this file, please also look at files which source this one:
+# elf64ltsmip.sh
-# Handle both big- and little-ended 64-bit MIPS objects.
-ARCH=mips
+. ${srcdir}/emulparams/elf32bmipn32.sh
OUTPUT_FORMAT="elf64-tradbigmips"
BIG_OUTPUT_FORMAT="elf64-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
-
-# Note that the elf32 template is used for 64-bit emulations as well
-# as 32-bit emulations.
ELFSIZE=64
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-TEXT_START_ADDR=0x10000000
+GENERATE_SHLIB_SCRIPT=yes
DATA_ADDR=0x0400000000
-MAXPAGESIZE=0x100000
NONPAGED_TEXT_START_ADDR=0x10000000
SHLIB_TEXT_START_ADDR=0x0
TEXT_DYNAMIC=
-ENTRY=__start
-
-# GOT-related settings.
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-# Magic symbols.
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
+unset EXECUTABLE_SYMBOLS
+unset WRITABLE_RODATA
# Magic sections.
INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
Index: ld/emulparams/elf64hppa.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64hppa.sh,v
retrieving revision 1.15
diff -u -p -r1.15 elf64hppa.sh
--- elf64hppa.sh 2001/11/13 18:25:37 1.15
+++ elf64hppa.sh 2001/11/21 14:08:35
@@ -1,9 +1,10 @@
-SCRIPT_NAME=elf
-ELFSIZE=64
+. ${srcdir}/emulparams/hppa64linux.sh
OUTPUT_FORMAT="elf64-hppa"
LIB_PATH=/usr/lib/pa20_64:/opt/langtools/lib/pa20_64
TEXT_START_ADDR=0x4000000000001000
DATA_ADDR=0x8000000000001000
+TARGET_PAGE_SIZE=4096
+MAXPAGESIZE=4096
# The HP dynamic linker actually requires you set the start of text and
# data to some reasonable value. Of course nobody knows what reasoanble
@@ -11,43 +12,8 @@ DATA_ADDR=0x8000000000001000
SHLIB_TEXT_START_ADDR=0x4000000000001000
SHLIB_DATA_ADDR=0x8000000000001000
-TARGET_PAGE_SIZE=4096
-MAXPAGESIZE=4096
-ARCH=hppa
-MACHINE=hppa2.0w
-ENTRY="main"
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-# We really want multiple .stub sections, one for each input .text section,
-# but for now this is good enough.
-OTHER_READONLY_SECTIONS='.PARISC.unwind : { *(.PARISC.unwind) } '
-
-# The PA64 ELF port treats .plt sections differently than most. We also have
-# to create a .opd section. What most systems call the .got, we call the .dlt
-OTHER_READWRITE_SECTIONS='.opd : { *(.opd) } PROVIDE (__gp = .); .plt : { *(.plt) } .dlt : { *(.dlt) }'
-
-# The PA64 ELF port has two additional bss sections. huge bss and thread bss.
-# Make sure they end up in the appropriate location. We also have to set
-# __TLS_SIZE to the size of the thread bss section.
-OTHER_BSS_SECTIONS='.hbss : { *(.hbss) } .tbss : { *(.tbss) }'
-#OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));'
-OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = 0); PROVIDE(__TLS_INIT_SIZE = 0); PROVIDE(__TLS_INIT_START = 0); PROVIDE(__TLS_INIT_A = 0); PROVIDE(__TLS_PREALLOC_DTV_A = 0);'
-
-# HPs use .dlt where systems use .got. Sigh.
-OTHER_GOT_RELOC_SECTIONS='.rela.dlt : { *(.rela.dlt) }'
-
-# We're not actually providing a symbol anymore (due to the inability to be
-# safe in regards to shared libraries). So we just allocate the hunk of space
-# unconditionally, but do not mess around with the symbol table.
-DATA_START_SYMBOLS='. += 16;'
-
# The linker is required to define these two symbols.
EXECUTABLE_SYMBOLS='PROVIDE (__SYSTEM_ID = 0x214); PROVIDE (_FPU_STATUS = 0x0);'
-DATA_PLT=
-
-# .dynamic should be at the start of the .text segment.
-TEXT_DYNAMIC=
-
# The PA64 ELF port needs two additional initializer sections and also wants
# a start/end symbol pair for the .init and .fini sections.
INIT_START='KEEP (*(.HP.init)); PROVIDE (__preinit_start = .); KEEP (*(.preinit)); PROVIDE (__preinit_end = .); PROVIDE (__init_start = .);'
Index: ld/emulparams/elf64ltsmip.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64ltsmip.sh,v
retrieving revision 1.2
diff -u -p -r1.2 elf64ltsmip.sh
--- elf64ltsmip.sh 2001/08/09 14:25:59 1.2
+++ elf64ltsmip.sh 2001/11/21 14:08:35
@@ -1,44 +1,4 @@
-# This is an ELF platform.
-SCRIPT_NAME=elf
-
-# Handle both big- and little-ended 64-bit MIPS objects.
-ARCH=mips
+. ${srcdir}/emulparams/elf64btsmip.sh
OUTPUT_FORMAT="elf64-tradlittlemips"
BIG_OUTPUT_FORMAT="elf64-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
-
-# Note that the elf32 template is used for 64-bit emulations as well
-# as 32-bit emulations.
-ELFSIZE=64
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-
-TEXT_START_ADDR=0x10000000
-DATA_ADDR=0x0400000000
-MAXPAGESIZE=0x100000
-NONPAGED_TEXT_START_ADDR=0x10000000
-SHLIB_TEXT_START_ADDR=0x0
-TEXT_DYNAMIC=
-ENTRY=__start
-
-# GOT-related settings.
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_SDATA_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-
-# Magic symbols.
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-
-# Magic sections.
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
Index: ld/emulparams/elf64mmix.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf64mmix.sh,v
retrieving revision 1.1
diff -u -p -r1.1 elf64mmix.sh
--- elf64mmix.sh 2001/10/30 15:20:11 1.1
+++ elf64mmix.sh 2001/11/21 14:08:35
@@ -44,17 +44,17 @@ OTHER_TEXT_SECTIONS='
PROVIDE (Main = DEFINED (Main) ? Main : (DEFINED (_start) ? _start : _start.));
'
-OTHER_RELOCATING_SECTIONS='
+OTHER_SECTIONS="
.MMIX.reg_contents :
{
/* Note that this section always has a fixed VMA - that of its
first register * 8. */
*(.MMIX.reg_contents);
}
-'
+"
# FIXME: Also bit by the PROVIDE bug? If not, this could be
# EXECUTABLE_SYMBOLS.
# By default, put the high end of the stack where the register stack
# begins. They grow in opposite directions. */
-OTHER_SECTIONS='PROVIDE (__Stack_start = 0x6000000000000000);'
+OTHER_END_SYMBOLS="PROVIDE (__Stack_start = 0x6000000000000000);"
Index: ld/emulparams/h8300elf.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/h8300elf.sh,v
retrieving revision 1.1
diff -u -p -r1.1 h8300elf.sh
--- h8300elf.sh 2001/08/29 12:51:26 1.1
+++ h8300elf.sh 2001/11/21 14:08:35
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# h8300helf.sh h8300self.sh
+
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-h8300"
TEXT_START_ADDR=0x100
@@ -6,7 +9,4 @@ TARGET_PAGE_SIZE=128
ARCH=h8300
TEMPLATE_NAME=elf32
EMBEDDED=yes
-
-OTHER_RELOCATING_SECTIONS='
-.stack 0xfefc : { _stack = .; *(.stack) }
-'
+STACK_ADDR=0xfefc
Index: ld/emulparams/h8300helf.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/h8300helf.sh,v
retrieving revision 1.3
diff -u -p -r1.3 h8300helf.sh
--- h8300helf.sh 2001/09/07 17:35:04 1.3
+++ h8300helf.sh 2001/11/21 14:08:35
@@ -1,12 +1,3 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-h8300"
-TEXT_START_ADDR=0x100
-MAXPAGESIZE=2
-TARGET_PAGE_SIZE=128
+. ${srcdir}/emulparams/h8300elf.sh
ARCH="h8300:h8300h"
-TEMPLATE_NAME=elf32
-EMBEDDED=yes
-
-OTHER_RELOCATING_SECTIONS='
-.stack 0x2fefc : { _stack = .; *(.stack) }
-'
+STACK_ADDR=0x2fefc
Index: ld/emulparams/h8300self.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/h8300self.sh,v
retrieving revision 1.3
diff -u -p -r1.3 h8300self.sh
--- h8300self.sh 2001/09/07 17:35:04 1.3
+++ h8300self.sh 2001/11/21 14:08:35
@@ -1,12 +1,3 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-h8300"
-TEXT_START_ADDR=0x100
-MAXPAGESIZE=2
-TARGET_PAGE_SIZE=128
+. ${srcdir}/emulparams/h8300elf.sh
ARCH="h8300:h8300s"
-TEMPLATE_NAME=elf32
-EMBEDDED=yes
-
-OTHER_RELOCATING_SECTIONS='
-.stack 0x2fefc : { _stack = .; *(.stack) }
-'
+STACK_ADDR=0x2fefc
Index: ld/emulparams/hppa64linux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/hppa64linux.sh,v
retrieving revision 1.1
diff -u -p -r1.1 hppa64linux.sh
--- hppa64linux.sh 2001/06/27 08:42:29 1.1
+++ hppa64linux.sh 2001/11/21 14:08:35
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# elf64hppa.sh
+
SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-hppa-linux"
@@ -12,18 +15,31 @@ GENERATE_SHLIB_SCRIPT=yes
# We really want multiple .stub sections, one for each input .text section,
# but for now this is good enough.
-OTHER_READONLY_SECTIONS='.PARISC.unwind : { *(.PARISC.unwind) } '
+OTHER_READONLY_SECTIONS="
+ .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }"
# The PA64 ELF port treats .plt sections differently than most. We also have
# to create a .opd section. What most systems call the .got, we call the .dlt
-OTHER_READWRITE_SECTIONS='.opd : { *(.opd) } PROVIDE (__gp = .); .plt : { *(.plt) } .dlt : { *(.dlt) }'
+OTHER_READWRITE_SECTIONS="
+ .opd ${RELOCATING-0} : { *(.opd) }
+ ${RELOCATING+PROVIDE (__gp = .);}
+ .plt ${RELOCATING-0} : { *(.plt) }
+ .dlt ${RELOCATING-0} : { *(.dlt) }"
# The PA64 ELF port has two additional bss sections. huge bss and thread bss.
# Make sure they end up in the appropriate location. We also have to set
# __TLS_SIZE to the size of the thread bss section.
-OTHER_BSS_SECTIONS='.hbss : { *(.hbss) } .tbss : { *(.tbss) }'
+OTHER_BSS_SECTIONS="
+ .hbss ${RELOCATING-0} : { *(.hbss) }
+ .tbss ${RELOCATING-0} : { *(.tbss) }
+"
#OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));'
-OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = 0);'
+OTHER_BSS_END_SYMBOLS='
+ PROVIDE (__TLS_SIZE = 0);
+ PROVIDE (__TLS_INIT_SIZE = 0);
+ PROVIDE (__TLS_INIT_START = 0);
+ PROVIDE (__TLS_INIT_A = 0);
+ PROVIDE (__TLS_PREALLOC_DTV_A = 0);'
# HPs use .dlt where systems use .got. Sigh.
OTHER_GOT_RELOC_SECTIONS='.rela.dlt : { *(.rela.dlt) }'
Index: ld/emulparams/hppalinux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/hppalinux.sh,v
retrieving revision 1.7
diff -u -p -r1.7 hppalinux.sh
--- hppalinux.sh 2001/04/02 01:21:27 1.7
+++ hppalinux.sh 2001/11/21 14:08:35
@@ -8,7 +8,8 @@ ARCH=hppa
MACHINE=hppa1.1 # We use 1.1 specific features.
NOP=0x08000240
START="_start"
-OTHER_READONLY_SECTIONS='.PARISC.unwind : { *(.PARISC.unwind) } '
+OTHER_READONLY_SECTIONS="
+ .PARISC.unwind ${RELOCATING-0} : { *(.PARISC.unwind) }"
DATA_START_SYMBOLS='PROVIDE ($global$ = .);'
DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes
Index: ld/emulparams/m32relf.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/m32relf.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 m32relf.sh
--- m32relf.sh 1999/05/03 07:29:07 1.1.1.1
+++ m32relf.sh 2001/11/21 14:08:35
@@ -8,6 +8,5 @@ MACHINE=
MAXPAGESIZE=32
EMBEDDED=yes
-# Hmmm, there's got to be a better way. This sets the stack to the
-# top of simulator memory (8MB).
-OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = 0x800000);'
+# This sets the stack to the top of simulator memory (8MB).
+OTHER_END_SYMBOLS='PROVIDE (_stack = 0x800000);'
Index: ld/emulparams/mn10200.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/mn10200.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 mn10200.sh
--- mn10200.sh 1999/05/03 07:29:07 1.1.1.1
+++ mn10200.sh 2001/11/21 14:08:35
@@ -1,4 +1,6 @@
-MACHINE=
+# If you change this file, please also look at files which source this one:
+# mn10300.sh
+
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-mn10200"
TEXT_START_ADDR=0x0
@@ -8,9 +10,8 @@ MAXPAGESIZE=1
ENTRY=_start
EMBEDDED=yes
-# Hmmm, there's got to be a better way. This sets the stack to the
-# top of the simulator memory (2^19 bytes).
-OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x80000
# These are for compatibility with the COFF toolchain.
# XXX These should definitely disappear.
Index: ld/emulparams/mn10300.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/mn10300.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 mn10300.sh
--- mn10300.sh 1999/05/03 07:29:07 1.1.1.1
+++ mn10300.sh 2001/11/21 14:08:35
@@ -1,20 +1,3 @@
-MACHINE=
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/mn10200.sh
OUTPUT_FORMAT="elf32-mn10300"
-TEXT_START_ADDR=0x0
ARCH=mn10300
-MACHINE=
-MAXPAGESIZE=1
-ENTRY=_start
-EMBEDDED=yes
-
-# Hmmm, there's got to be a better way. This sets the stack to the
-# top of the simulator memory (2^19 bytes).
-OTHER_RELOCATING_SECTIONS='.stack 0x80000 : { _stack = .; *(.stack) }'
-
-# These are for compatibility with the COFF toolchain.
-# XXX These should definitely disappear.
-CTOR_START='___ctors = .;'
-CTOR_END='___ctors_end = .;'
-DTOR_START='___dtors = .;'
-DTOR_END='___dtors_end = .;'
Index: ld/emulparams/sh.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/sh.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 sh.sh
--- sh.sh 1999/05/03 07:29:07 1.1.1.1
+++ sh.sh 2001/11/21 14:08:35
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# shl.sh
+
SCRIPT_NAME=sh
OUTPUT_FORMAT="coff-sh"
TEXT_START_ADDR=0x8000
Index: ld/emulparams/shelf.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/shelf.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 shelf.sh
--- shelf.sh 1999/05/03 07:29:07 1.1.1.1
+++ shelf.sh 2001/11/21 14:08:35
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# shlelf.sh
+
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-sh"
TEXT_START_ADDR=0x1000
@@ -14,4 +17,4 @@ CTOR_START='___ctors = .;'
CTOR_END='___ctors_end = .;'
DTOR_START='___dtors = .;'
DTOR_END='___dtors_end = .;'
-OTHER_RELOCATING_SECTIONS='.stack 0x30000 : { _stack = .; *(.stack) }'
+STACK_ADDR=0x30000
Index: ld/emulparams/shelf_linux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/shelf_linux.sh,v
retrieving revision 1.1
diff -u -p -r1.1 shelf_linux.sh
--- shelf_linux.sh 2000/09/07 04:32:05 1.1
+++ shelf_linux.sh 2001/11/21 14:08:35
@@ -1,14 +1,2 @@
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/shlelf_linux.sh
OUTPUT_FORMAT="elf32-shbig-linux"
-TEXT_START_ADDR=0x400000
-MAXPAGESIZE=0x10000
-ARCH=sh
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-
-DATA_START_SYMBOLS='__data_start = . ;';
-
-OTHER_READWRITE_SECTIONS='
- .note.ABI-tag : { *(.note.ABI-tag) }
-'
Index: ld/emulparams/shl.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/shl.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 shl.sh
--- shl.sh 1999/05/03 07:29:07 1.1.1.1
+++ shl.sh 2001/11/21 14:08:35
@@ -1,5 +1,2 @@
-SCRIPT_NAME=sh
+. ${srcdir}/emulparams/sh.sh
OUTPUT_FORMAT="coff-shl"
-TEXT_START_ADDR=0x8000
-TARGET_PAGE_SIZE=128
-ARCH=sh
Index: ld/emulparams/shlelf.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/shlelf.sh,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 shlelf.sh
--- shlelf.sh 1999/05/03 07:29:07 1.1.1.1
+++ shlelf.sh 2001/11/21 14:08:35
@@ -1,17 +1,2 @@
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/shelf.sh
OUTPUT_FORMAT="elf32-shl"
-TEXT_START_ADDR=0x1000
-MAXPAGESIZE=128
-ARCH=sh
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-EMBEDDED=yes
-
-# These are for compatibility with the COFF toolchain.
-ENTRY=start
-CTOR_START='___ctors = .;'
-CTOR_END='___ctors_end = .;'
-DTOR_START='___dtors = .;'
-DTOR_END='___dtors_end = .;'
-OTHER_RELOCATING_SECTIONS='.stack 0x30000 : { _stack = .; *(.stack) }'
Index: ld/emulparams/shlelf_linux.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/shlelf_linux.sh,v
retrieving revision 1.1
diff -u -p -r1.1 shlelf_linux.sh
--- shlelf_linux.sh 2000/09/07 04:32:05 1.1
+++ shlelf_linux.sh 2001/11/21 14:08:35
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# shelf_linux.sh
+
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-sh-linux"
TEXT_START_ADDR=0x400000
@@ -9,6 +12,5 @@ GENERATE_SHLIB_SCRIPT=yes
DATA_START_SYMBOLS='__data_start = . ;';
-OTHER_READWRITE_SECTIONS='
- .note.ABI-tag : { *(.note.ABI-tag) }
-'
+OTHER_READWRITE_SECTIONS="
+ .note.ABI-tag ${RELOCATING-0} : { *(.note.ABI-tag) }"
Index: ld/scripttempl/elf.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf.sc,v
retrieving revision 1.22
diff -u -p -r1.22 elf.sc
--- elf.sc 2001/08/23 15:14:18 1.22
+++ elf.sc 2001/11/21 14:08:35
@@ -33,6 +33,8 @@
# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
# combination of .fini sections.
+# STACK_ADDR - start of a .stack section.
+# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
@@ -55,6 +57,7 @@
# .sbss .gnu.linkonce.sb.foo
# .sdata2 .gnu.linkonce.s2.foo
# .sbss2 .gnu.linkonce.sb2.foo
+# .debug_info .gnu.linkonce.wi.foo
#
# Each of these can also have corresponding .rel.* and .rela.* sections.
@@ -65,13 +68,13 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=$
test -z "${ELFSIZE}" && ELFSIZE=32
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=.
-INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
-PLT=".plt ${RELOCATING-0} : { *(.plt) }"
-DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
-RODATA=".rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }"
-SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }"
-SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }"
-CTOR=".ctors ${CONSTRUCTING-0} :
+INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
+PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
+RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
+SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
@@ -96,8 +99,7 @@ CTOR=".ctors ${CONSTRUCTING-0} :
KEEP (*(.ctors))
${CONSTRUCTING+${CTOR_END}}
}"
-
-DTOR=" .dtors ${CONSTRUCTING-0} :
+DTOR=".dtors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${DTOR_START}}
KEEP (*crtbegin.o(.dtors))
@@ -106,6 +108,11 @@ DTOR=" .dtors ${CONSTRUCTING-0} :
KEEP (*(.dtors))
${CONSTRUCTING+${DTOR_END}}
}"
+STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
+ {
+ ${RELOCATING+_stack = .;}
+ *(.stack)
+ }"
# if this is for an embedded system, don't add SIZEOF_HEADERS.
if [ -z "$EMBEDDED" ]; then
@@ -138,12 +145,12 @@ SECTIONS
${CREATE_SHLIB-${INTERP}}
${INITIAL_READONLY_SECTIONS}
${TEXT_DYNAMIC+${DYNAMIC}}
- .hash ${RELOCATING-0} : { *(.hash) }
- .dynsym ${RELOCATING-0} : { *(.dynsym) }
- .dynstr ${RELOCATING-0} : { *(.dynstr) }
- .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
- .gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
- .gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
+ .hash ${RELOCATING-0} : { *(.hash) }
+ .dynsym ${RELOCATING-0} : { *(.dynsym) }
+ .dynstr ${RELOCATING-0} : { *(.dynstr) }
+ .gnu.version ${RELOCATING-0} : { *(.gnu.version) }
+ .gnu.version_d ${RELOCATING-0}: { *(.gnu.version_d) }
+ .gnu.version_r ${RELOCATING-0}: { *(.gnu.version_r) }
EOF
if [ "x$COMBRELOC" = x ]; then
@@ -152,124 +159,44 @@ else
COMBRELOCCAT="cat > $COMBRELOC"
fi
eval $COMBRELOCCAT <<EOF
- .rel.init ${RELOCATING-0} : { *(.rel.init) }
- .rela.init ${RELOCATING-0} : { *(.rela.init) }
- .rel.text ${RELOCATING-0} :
- {
- *(.rel.text)
- ${RELOCATING+*(.rel.text.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.t.*)}
- }
- .rela.text ${RELOCATING-0} :
- {
- *(.rela.text)
- ${RELOCATING+*(.rela.text.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.t.*)}
- }
- .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
- .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
- .rel.rodata ${RELOCATING-0} :
- {
- *(.rel.rodata)
- ${RELOCATING+*(.rel.rodata.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.r.*)}
- }
- .rela.rodata ${RELOCATING-0} :
- {
- *(.rela.rodata)
- ${RELOCATING+*(.rela.rodata.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.r.*)}
- }
+ .rel.init ${RELOCATING-0} : { *(.rel.init) }
+ .rela.init ${RELOCATING-0} : { *(.rela.init) }
+ .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
+ .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
+ .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
+ .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
+ .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
+ .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
${OTHER_READONLY_RELOC_SECTIONS}
- .rel.data ${RELOCATING-0} :
- {
- *(.rel.data)
- ${RELOCATING+*(.rel.data.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.d.*)}
- }
- .rela.data ${RELOCATING-0} :
- {
- *(.rela.data)
- ${RELOCATING+*(.rela.data.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.d.*)}
- }
- .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
- .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
- .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
- .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
- .rel.got ${RELOCATING-0} : { *(.rel.got) }
- .rela.got ${RELOCATING-0} : { *(.rela.got) }
+ .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
+ .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
+ .rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
+ .rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
+ .rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
+ .rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
+ .rel.got ${RELOCATING-0} : { *(.rel.got) }
+ .rela.got ${RELOCATING-0} : { *(.rela.got) }
${OTHER_GOT_RELOC_SECTIONS}
- .rel.sdata ${RELOCATING-0} :
- {
- *(.rel.sdata)
- ${RELOCATING+*(.rel.sdata.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.s.*)}
- }
- .rela.sdata ${RELOCATING-0} :
- {
- *(.rela.sdata)
- ${RELOCATING+*(.rela.sdata.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.s.*)}
- }
- .rel.sbss ${RELOCATING-0} :
- {
- *(.rel.sbss)
- ${RELOCATING+*(.rel.sbss.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
- }
- .rela.sbss ${RELOCATING-0} :
- {
- *(.rela.sbss)
- ${RELOCATING+*(.rela.sbss.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.sb.*)}
- }
- .rel.sdata2 ${RELOCATING-0} :
- {
- *(.rel.sdata2)
- ${RELOCATING+*(.rel.sdata2.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.s2.*)}
- }
- .rela.sdata2 ${RELOCATING-0} :
- {
- *(.rela.sdata2)
- ${RELOCATING+*(.rela.sdata2.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.s2.*)}
- }
- .rel.sbss2 ${RELOCATING-0} :
- {
- *(.rel.sbss2)
- ${RELOCATING+*(.rel.sbss2.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.sb2.*)}
- }
- .rela.sbss2 ${RELOCATING-0} :
- {
- *(.rela.sbss2)
- ${RELOCATING+*(.rela.sbss2.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.sb2.*)}
- }
- .rel.bss ${RELOCATING-0} :
- {
- *(.rel.bss)
- ${RELOCATING+*(.rel.bss.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.b.*)}
- }
- .rela.bss ${RELOCATING-0} :
- {
- *(.rela.bss)
- ${RELOCATING+*(.rela.bss.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
- }
+ .rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
+ .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }
+ .rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
+ .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }
+ .rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
+ .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }
+ .rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
+ .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }
+ .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
+ .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
EOF
if [ -n "$COMBRELOC" ]; then
cat <<EOF
- .rel.dyn :
+ .rel.dyn ${RELOCATING-0} :
{
EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
cat <<EOF
}
- .rela.dyn :
+ .rela.dyn ${RELOCATING-0} :
{
EOF
sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
@@ -278,11 +205,11 @@ cat <<EOF
EOF
fi
cat <<EOF
- .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
- .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
+ .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
+ .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
${OTHER_PLT_RELOC_SECTIONS}
- .init ${RELOCATING-0} :
+ .init ${RELOCATING-0} :
{
${RELOCATING+${INIT_START}}
KEEP (*(.init))
@@ -290,18 +217,15 @@ cat <<EOF
} =${NOP-0}
${DATA_PLT-${BSS_PLT-${PLT}}}
- .text ${RELOCATING-0} :
+ .text ${RELOCATING-0} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
- *(.text)
- ${RELOCATING+*(.text.*)}
- *(.stub)
+ *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
- ${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
- .fini ${RELOCATING-0} :
+ .fini ${RELOCATING-0} :
{
${RELOCATING+${FINI_START}}
KEEP (*(.fini))
@@ -311,94 +235,86 @@ cat <<EOF
${RELOCATING+PROVIDE (_etext = .);}
${RELOCATING+PROVIDE (etext = .);}
${WRITABLE_RODATA-${RODATA}}
- .rodata1 ${RELOCATING-0} : { *(.rodata1) }
+ .rodata1 ${RELOCATING-0} : { *(.rodata1) }
${CREATE_SHLIB-${SDATA2}}
${CREATE_SHLIB-${SBSS2}}
- ${RELOCATING+${OTHER_READONLY_SECTIONS}}
+ ${OTHER_READONLY_SECTIONS}
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
- .data ${RELOCATING-0} :
+ .data ${RELOCATING-0} :
{
${RELOCATING+${DATA_START_SYMBOLS}}
- *(.data)
- ${RELOCATING+*(.data.*)}
- ${RELOCATING+*(.gnu.linkonce.d.*)}
+ *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
${CONSTRUCTING+SORT(CONSTRUCTORS)}
}
- .data1 ${RELOCATING-0} : { *(.data1) }
- .eh_frame : { KEEP (*(.eh_frame)) }
- .gcc_except_table : { *(.gcc_except_table) }
+ .data1 ${RELOCATING-0} : { *(.data1) }
+ .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) }
+ .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) }
${WRITABLE_RODATA+${RODATA}}
- ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
+ ${OTHER_READWRITE_SECTIONS}
${TEXT_DYNAMIC-${DYNAMIC}}
${RELOCATING+${CTOR}}
${RELOCATING+${DTOR}}
- .jcr : { KEEP (*(.jcr)) }
+ .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
${DATA_PLT+${PLT}}
${RELOCATING+${OTHER_GOT_SYMBOLS}}
- .got ${RELOCATING-0} : { *(.got.plt) *(.got) }
- ${RELOCATING+${OTHER_GOT_SECTIONS}}
+ .got ${RELOCATING-0} : { *(.got.plt) *(.got) }
+ ${OTHER_GOT_SECTIONS}
${CREATE_SHLIB+${SDATA2}}
${CREATE_SHLIB+${SBSS2}}
/* 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. */
- .sdata ${RELOCATING-0} :
+ .sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
- *(.sdata)
- ${RELOCATING+*(.sdata.*)}
- ${RELOCATING+*(.gnu.linkonce.s.*)}
+ *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
}
- ${RELOCATING+${OTHER_SDATA_SECTIONS}}
+ ${OTHER_SDATA_SECTIONS}
${RELOCATING+_edata = .;}
${RELOCATING+PROVIDE (edata = .);}
${RELOCATING+__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
- .sbss ${RELOCATING-0} :
+ .sbss ${RELOCATING-0} :
{
${RELOCATING+PROVIDE (__sbss_start = .);}
${RELOCATING+PROVIDE (___sbss_start = .);}
*(.dynsbss)
- *(.sbss)
- ${RELOCATING+*(.sbss.*)}
- ${RELOCATING+*(.gnu.linkonce.sb.*)}
+ *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
*(.scommon)
${RELOCATING+PROVIDE (__sbss_end = .);}
${RELOCATING+PROVIDE (___sbss_end = .);}
}
${BSS_PLT+${PLT}}
- .bss ${RELOCATING-0} :
+ .bss ${RELOCATING-0} :
{
*(.dynbss)
- *(.bss)
- ${RELOCATING+*(.bss.*)}
- ${RELOCATING+*(.gnu.linkonce.b.*)}
+ *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */
${RELOCATING+. = ALIGN(${ALIGNMENT});}
}
- ${RELOCATING+${OTHER_BSS_SECTIONS}}
+ ${OTHER_BSS_SECTIONS}
${RELOCATING+. = ALIGN(${ALIGNMENT});}
${RELOCATING+_end = .;}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
${RELOCATING+PROVIDE (end = .);}
/* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
+ .comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
@@ -417,7 +333,7 @@ cat <<EOF
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
- .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
@@ -430,10 +346,9 @@ cat <<EOF
.debug_funcnames 0 : { *(.debug_funcnames) }
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
-
- ${RELOCATING+${OTHER_RELOCATING_SECTIONS}}
- /* These must appear regardless of ${RELOCATING}. */
+ ${STACK_ADDR+${STACK}}
${OTHER_SECTIONS}
+ ${RELOCATING+${OTHER_END_SYMBOLS}}
}
EOF
Index: ld/scripttempl/elfi370.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elfi370.sc,v
retrieving revision 1.3
diff -u -p -r1.3 elfi370.sc
--- elfi370.sc 2001/08/17 09:51:08 1.3
+++ elfi370.sc 2001/11/21 14:08:35
@@ -92,7 +92,7 @@ SECTIONS
${RELOCATING+PROVIDE (etext = .);}
${CREATE_SHLIB-${SDATA2}}
${CREATE_SHLIB-${SBSS2}}
- ${RELOCATING+${OTHER_READONLY_SECTIONS}}
+ ${OTHER_READONLY_SECTIONS}
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. It would
@@ -118,7 +118,7 @@ SECTIONS
${CONSTRUCTING+CONSTRUCTORS}
}
.data1 ${RELOCATING-0} : { *(.data1) }
- ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
+ ${OTHER_READWRITE_SECTIONS}
.got1 ${RELOCATING-0} : { *(.got1) }
.dynamic ${RELOCATING-0} : { *(.dynamic) }
@@ -212,7 +212,6 @@ SECTIONS
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
- /* These must appear regardless of ${RELOCATING}. */
${OTHER_SECTIONS}
}
EOF
Index: ld/scripttempl/nw.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/nw.sc,v
retrieving revision 1.2
diff -u -p -r1.2 nw.sc
--- nw.sc 2001/08/17 09:51:08 1.2
+++ nw.sc 2001/11/21 14:08:35
@@ -87,7 +87,7 @@ SECTIONS
.dtors ${RELOCATING-0} : { *(.dtors) }
.rodata ${RELOCATING-0} : { *(.rodata) }
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
- ${RELOCATING+${OTHER_READONLY_SECTIONS}}
+ ${OTHER_READONLY_SECTIONS}
/* Read-write section, merged into data segment: */
${RELOCATING+. = ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};}
@@ -98,7 +98,7 @@ SECTIONS
${CONSTRUCTING+CONSTRUCTORS}
}
.data1 ${RELOCATING-0} : { *(.data1) }
- ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
+ ${OTHER_READWRITE_SECTIONS}
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
.dynamic ${RELOCATING-0} : { *(.dynamic) }
${DATA_PLT+${PLT}}
@@ -125,7 +125,6 @@ SECTIONS
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
- /* These must appear regardless of ${RELOCATING}. */
${OTHER_SECTIONS}
}
EOF