diff options
author | Jim Wilson <jimw@sifive.com> | 2017-12-05 14:42:12 -0800 |
---|---|---|
committer | Jim Wilson <jimw@sifive.com> | 2017-12-05 14:42:12 -0800 |
commit | 0527614a9b805d1f640f477f51f9780403487ef8 (patch) | |
tree | 29b58cc3bf00cae87e174790c32bc5fd2db6fbe8 /ld/emulparams | |
parent | 858c9d13240e695bc3b750368f5d4e524b12112e (diff) | |
download | gdb-0527614a9b805d1f640f477f51f9780403487ef8.zip gdb-0527614a9b805d1f640f477f51f9780403487ef8.tar.gz gdb-0527614a9b805d1f640f477f51f9780403487ef8.tar.bz2 |
Really fix riscv shared library __global_pointer$ problem.
ld/
* emulparams/elf32lriscv-defs.sh (SDATA_START_SYMBOLS): Remove HIDDEN.
Don't define __global_pointer$ when CREATE_SHLIB.
* testsuite/ld-riscv-elf/gp-hidden-64.rd,
* testsuite/ld-riscv-elf/gp-hidden-lib.rd,
* testsuite/ld-riscv-elf/gp-hidden-lib.s,
* testsuite/ld-riscv-elf/gp-hidden-ver-64.rd,
* testsuite/ld-riscv-elf/gp-hidden-ver.rd,
* testsuite/ld-riscv-elf/gp-hidden-ver.s,
* testsuite/ld-riscv-elf/gp-hidden-ver.ver,
* testsuite/ld-riscv-elf/gp-hidden.rd,
* testsuite/ld-riscv-elf/gp-hidden.s,
* testsuite/ld-riscv-elf/gp-hidden.sd: Delete.
* testsuite/ld-riscv-elf/gp-test-lib.sd,
* testsuite/ld-riscv-elf/gp-test.s,
* testsuite/ld-riscv-elf/gp-test.sd: New.
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Rewrite gp tests.
Diffstat (limited to 'ld/emulparams')
-rw-r--r-- | ld/emulparams/elf32lriscv-defs.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/emulparams/elf32lriscv-defs.sh b/ld/emulparams/elf32lriscv-defs.sh index 5b41d5c..29ed6d8 100644 --- a/ld/emulparams/elf32lriscv-defs.sh +++ b/ld/emulparams/elf32lriscv-defs.sh @@ -23,7 +23,8 @@ TEXT_START_ADDR=0x10000 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)" -SDATA_START_SYMBOLS="HIDDEN (__global_pointer$ = . + 0x800); +SDATA_START_SYMBOLS="__global_pointer$ = . + 0x800;" +SDATA_START_SYMBOLS="${CREATE_SHLIB-${SDATA_START_SYMBOLS}} *(.srodata.cst16) *(.srodata.cst8) *(.srodata.cst4) *(.srodata.cst2) *(.srodata .srodata.*)" INITIAL_READONLY_SECTIONS=".interp : { *(.interp) } ${CREATE_PIE-${INITIAL_READONLY_SECTIONS}}" |