aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>1995-02-17 18:09:23 +0000
committerMichael Meissner <gnu@the-meissners.org>1995-02-17 18:09:23 +0000
commit1e4b4b1c03da681e18fab8ed832c3465a728907a (patch)
tree6c02cae02d4a5fa5ba43c65627479d819f0b5a8c /ld
parent5836732bf5537a11e97ce635d67f312ccc25d972 (diff)
downloadfsf-binutils-gdb-1e4b4b1c03da681e18fab8ed832c3465a728907a.zip
fsf-binutils-gdb-1e4b4b1c03da681e18fab8ed832c3465a728907a.tar.gz
fsf-binutils-gdb-1e4b4b1c03da681e18fab8ed832c3465a728907a.tar.bz2
Add support for .got1 and .got2 sections; Offset _GLOBAL_OFFSET_TABLE_ by 32768 from GOT start.
Diffstat (limited to 'ld')
-rw-r--r--ld/scripttempl/elfppc.sc23
1 files changed, 16 insertions, 7 deletions
diff --git a/ld/scripttempl/elfppc.sc b/ld/scripttempl/elfppc.sc
index fc5973e..1f9537a 100644
--- a/ld/scripttempl/elfppc.sc
+++ b/ld/scripttempl/elfppc.sc
@@ -57,6 +57,10 @@ SECTIONS
.rela.rodata ${RELOCATING-0} : { *(.rela.rodata) }
.rel.got ${RELOCATING-0} : { *(.rel.got) }
.rela.got ${RELOCATING-0} : { *(.rela.got) }
+ .rel.got1 ${RELOCATING-0} : { *(.rel.got1) }
+ .rela.got1 ${RELOCATING-0} : { *(.rela.got1) }
+ .rel.got2 ${RELOCATING-0} : { *(.rel.got2) }
+ .rela.got2 ${RELOCATING-0} : { *(.rela.got2) }
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
.rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
.rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
@@ -95,14 +99,19 @@ SECTIONS
}
.data1 ${RELOCATING-0} : { *(.data1) }
${RELOCATING+${OTHER_READWRITE_SECTIONS}}
- .ctors ${RELOCATING-0} : { *(.ctors) }
- .dtors ${RELOCATING-0} : { *(.dtors) }
+ .ctors ${RELOCATING-0} : { *(.ctors) }
+ .dtors ${RELOCATING-0} : { *(.dtors) }
- /* FIXME: _GLOBAL_OFFSET_TABLE_ should really be set to the GOT + 32k on
- machines whose addressing uses sign extended 16-bit literals (ie, most
- RISC machines) and just the GOT on machines that either zero extend
- literals (ie, the 88k), or use a full word literal field (ie, i386). */
- ${RELOCATING+_GLOBAL_OFFSET_TABLE_ = .;}
+ ${RELOCATING+_GOT1_START_ = .;}
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ ${RELOCATING+_GOT1_END_ = .;}
+
+ ${RELOCATING+_GOT2_START_ = .;}
+ .got2 ${RELOCATING-0} : { *(.got2) }
+ ${RELOCATING+_GOT2_END_ = .;}
+
+ ${RELOCATING+_GOT_START_ = .;}
+ ${RELOCATING+_GLOBAL_OFFSET_TABLE_ = . + 32768;}
${RELOCATING+_SDA_BASE_ = .;}
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
${RELOCATING+_GOT_END_ = .;}