diff options
author | Will Newton <will.newton@linaro.org> | 2013-11-25 14:44:59 +0000 |
---|---|---|
committer | Will Newton <will.newton@linaro.org> | 2013-11-26 15:25:11 +0000 |
commit | 4920638856fd2ee27d0f61330e75a05b8d719f02 (patch) | |
tree | 1e6e113e384be1311b35d9307fefc4877e860fad /ld | |
parent | b1ee0cc48909c2116709038e6e1f2ffa7c3bd99c (diff) | |
download | gdb-4920638856fd2ee27d0f61330e75a05b8d719f02.zip gdb-4920638856fd2ee27d0f61330e75a05b8d719f02.tar.gz gdb-4920638856fd2ee27d0f61330e75a05b8d719f02.tar.bz2 |
bfd/elfnn-aarch64.c: Handle static links with ifunc correctly.
The code for handling GOT references to ifunc symbols in static links
was missing.
bfd/ChangeLog:
2013-11-26 Will Newton <will.newton@linaro.org>
* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
Handle STT_GNU_IFUNC symbols correctly in static links.
ld/testsuite/ChangeLog:
2013-11-26 Will Newton <will.newton@linaro.org>
* ld-aarch64/aarch64-elf.exp: Add ifunc-22.
* ld-aarch64/ifunc-22.d: New file.
* ld-aarch64/ifunc-22.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/aarch64-elf.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/ifunc-22.d | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/ifunc-22.s | 14 |
4 files changed, 32 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 22a062d..bbd8eb3 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,5 +1,11 @@ 2013-11-26 Will Newton <will.newton@linaro.org> + * ld-aarch64/aarch64-elf.exp: Add ifunc-22. + * ld-aarch64/ifunc-22.d: New file. + * ld-aarch64/ifunc-22.s: Likewise. + +2013-11-26 Will Newton <will.newton@linaro.org> + * ld-aarch64/aarch64-elf.exp: Add ifunc-21 test. * ld-aarch64/ifunc-21.d: New file. * ld-aarch64/ifunc-21.s: Likewise. diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp index a6b3ea2..692bf34 100644 --- a/ld/testsuite/ld-aarch64/aarch64-elf.exp +++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp @@ -156,3 +156,4 @@ run_dump_test "ifunc-19a" run_dump_test "ifunc-19b" run_dump_test "ifunc-20" run_dump_test "ifunc-21" +run_dump_test "ifunc-22" diff --git a/ld/testsuite/ld-aarch64/ifunc-22.d b/ld/testsuite/ld-aarch64/ifunc-22.d new file mode 100644 index 0000000..f28b039 --- /dev/null +++ b/ld/testsuite/ld-aarch64/ifunc-22.d @@ -0,0 +1,11 @@ +#source: ifunc-22.s +#objdump: -s -j .got +#ld: -static +#target: aarch64*-*-* + +# Ensure GOT is populated correctly in static link + +.*: file format elf64-(little|big)aarch64 + +Contents of section \.got: + 4100f0 00000000 00000000 d0004000 00000000 ..........@..... diff --git a/ld/testsuite/ld-aarch64/ifunc-22.s b/ld/testsuite/ld-aarch64/ifunc-22.s new file mode 100644 index 0000000..69a87bb --- /dev/null +++ b/ld/testsuite/ld-aarch64/ifunc-22.s @@ -0,0 +1,14 @@ + .text + .type ifunc, @gnu_indirect_function + .global ifunc +ifunc: + ret + .size ifunc, .-ifunc + .type _start, @function + .globl _start +_start: + adrp x0, :got:ifunc + ldr x0, [x0, #:got_lo12:ifunc] + .size _start, .-_start + .data + .xword ifunc |