diff options
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-aarch64/aarch64-elf.exp | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/rela-idempotent.d | 19 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/rela-idempotent.s | 14 |
3 files changed, 35 insertions, 0 deletions
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp index ec55bf4..b025fcb 100644 --- a/ld/testsuite/ld-aarch64/aarch64-elf.exp +++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp @@ -401,6 +401,8 @@ run_dump_test_lp64 "rela-abs-relative" run_dump_test_lp64 "rela-abs-relative-be" run_dump_test_lp64 "rela-abs-relative-opt" +run_dump_test_lp64 "rela-idempotent" + run_dump_test_lp64 "pie-bind-locally" run_dump_test "property-bti-pac1" diff --git a/ld/testsuite/ld-aarch64/rela-idempotent.d b/ld/testsuite/ld-aarch64/rela-idempotent.d new file mode 100644 index 0000000..f3b5ffb --- /dev/null +++ b/ld/testsuite/ld-aarch64/rela-idempotent.d @@ -0,0 +1,19 @@ +#name: rela-idempotent +#source: rela-idempotent.s +#target: [check_shared_lib_support] +#ld: -shared -Ttext-segment=0x100000 -Tdata=0x200000 -Trelocs.ld +#notarget: aarch64_be-*-* +#objdump: -dR -j .data +#... + +Disassembly of section .data: + +.* <l>: + 200000: 00200032.* + 200000: R_AARCH64_RELATIVE \*ABS\*\+0x200032 + 200004: 00000000.* + +.* <q>: + 200008: 00200054.* + 200008: R_AARCH64_RELATIVE \*ABS\*\+0x200054 + 20000c: 00000000.* diff --git a/ld/testsuite/ld-aarch64/rela-idempotent.s b/ld/testsuite/ld-aarch64/rela-idempotent.s new file mode 100644 index 0000000..7cb5dff --- /dev/null +++ b/ld/testsuite/ld-aarch64/rela-idempotent.s @@ -0,0 +1,14 @@ +# this checks that aarch64 RELA relocs are ignoring existing section +# content of the relocated place + .text + .global _start +_start: + ret + + .data + .p2align 4 +l: .long 0x11111111, 0x22222222 +q: .quad 0x4444444433333333 + + .reloc l, BFD_RELOC_64, q+42 + .reloc q, BFD_RELOC_64, l+84 |