aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1999-09-10 06:30:37 +0000
committerJeff Law <law@redhat.com>1999-09-10 06:30:37 +0000
commit904ecb2d787a2b9e501232d4e3852dc9659fca77 (patch)
tree05f5e7ec58a7d12d7c4c71cb0e3389d90aa1b947 /ld/scripttempl
parentfc4cc5bb8ff13611dc99ec51ecd9d02b3c85c04b (diff)
downloadgdb-904ecb2d787a2b9e501232d4e3852dc9659fca77.zip
gdb-904ecb2d787a2b9e501232d4e3852dc9659fca77.tar.gz
gdb-904ecb2d787a2b9e501232d4e3852dc9659fca77.tar.bz2
* emulparms/elf64hppa.sh (OTHER_READONLY_SECTIONS): Put stubs before
unwinders so that they are closer to the text section. (OTHER_BSS_SECTIONS): Define. (EXECUTABLE_SYMBOLS): Provide __SYSTEM_ID and _FPU_STATUS. (INIT_START, INIT_END): Define. (FINI_START, FINI_END): Define. * scripttempl/elf.sc: Add support for INIT_START, INIT_END, FINI_START, FINI_END and OTHER_BSS_SECTIONS.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/elf.sc21
1 files changed, 19 insertions, 2 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 3ffd3e1..57f60a9 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -8,6 +8,7 @@
# OTHER_TEXT_SECTIONS - these get put in .text when relocating
# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
# (e.g., .PARISC.global)
+# OTHER_BSS_SECTIONS - other than .bss .sbss ...
# OTHER_SECTIONS - at the end
# EXECUTABLE_SYMBOLS - symbols that must be defined for an
# executable (e.g., _DYNAMIC_LINK)
@@ -26,6 +27,10 @@
# start address of shared library.
# INPUT_FILES - INPUT command of files to always include
# WRITABLE_RODATA - if set, the .rodata section should be writable
+# INIT_START, INIT_END - statements just before and just after
+# combination of .init sections.
+# FINI_START, FINI_END - statements just before and just after
+# combination of .fini sections.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
@@ -169,7 +174,13 @@ SECTIONS
.rel.plt ${RELOCATING-0} : { *(.rel.plt) }
.rela.plt ${RELOCATING-0} : { *(.rela.plt) }
- .init ${RELOCATING-0} : { KEEP (*(.init)) } =${NOP-0}
+ .init ${RELOCATING-0} :
+ {
+ ${INIT_START}
+ KEEP (*(.init))
+ ${INIT_END}
+ } =${NOP-0}
+
${DATA_PLT-${PLT}}
.text ${RELOCATING-0} :
{
@@ -184,7 +195,12 @@ SECTIONS
} =${NOP-0}
${RELOCATING+_etext = .;}
${RELOCATING+PROVIDE (etext = .);}
- .fini ${RELOCATING-0} : { KEEP (*(.fini)) } =${NOP-0}
+ .fini ${RELOCATING-0} :
+ {
+ ${FINI_START}
+ KEEP (*(.fini))
+ ${FINI_END}
+ } =${NOP-0}
${WRITABLE_RODATA-${RODATA}}
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
${RELOCATING+${OTHER_READONLY_SECTIONS}}
@@ -233,6 +249,7 @@ SECTIONS
.bss section disappears because there are no input sections. */
${RELOCATING+. = ALIGN(${ALIGNMENT});}
}
+ ${RELOCATING+${OTHER_BSS_SECTIONS}}
${RELOCATING+. = ALIGN(${ALIGNMENT});}
${RELOCATING+_end = .;}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}}