diff options
Diffstat (limited to 'ld/testsuite/ld-aarch64')
-rw-r--r-- | ld/testsuite/ld-aarch64/aarch64-elf.exp | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/rela-abs-relative-be.d | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/rela-abs-relative-opt.d | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/rela-abs-relative.d | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/rela-abs-relative.s | 16 |
5 files changed, 59 insertions, 0 deletions
diff --git a/ld/testsuite/ld-aarch64/aarch64-elf.exp b/ld/testsuite/ld-aarch64/aarch64-elf.exp index b9c4133..b27da52 100644 --- a/ld/testsuite/ld-aarch64/aarch64-elf.exp +++ b/ld/testsuite/ld-aarch64/aarch64-elf.exp @@ -285,6 +285,10 @@ run_dump_test "dt_textrel" run_dump_test "plt_mapping_symbol" +run_dump_test "rela-abs-relative" +run_dump_test "rela-abs-relative-be" +run_dump_test "rela-abs-relative-opt" + set aarch64elflinktests { {"ld-aarch64/so with global symbol" "-shared" "" "" {copy-reloc-so.s} {} "copy-reloc-so.so"} diff --git a/ld/testsuite/ld-aarch64/rela-abs-relative-be.d b/ld/testsuite/ld-aarch64/rela-abs-relative-be.d new file mode 100644 index 0000000..88ba58d --- /dev/null +++ b/ld/testsuite/ld-aarch64/rela-abs-relative-be.d @@ -0,0 +1,13 @@ +#name: rela-abs-relative (big endian) +#source: rela-abs-relative.s +#ld: -shared -Ttext-segment=0x100000 -Tdata=0x200000 -Trelocs.ld +#target: aarch64_be-*-* +#objdump: -dR -j .data +#... + +Disassembly of section .data: + +.* <a>: + 200000: 00 00 00 00 ca fe ca fe 00 00 00 00 00 01 00 ca.* + 200008: R_AARCH64_RELATIVE \*ABS\*\+0x100ca + 200010: 00 00 00 00 de ad de ad.* diff --git a/ld/testsuite/ld-aarch64/rela-abs-relative-opt.d b/ld/testsuite/ld-aarch64/rela-abs-relative-opt.d new file mode 100644 index 0000000..a1e5ca0 --- /dev/null +++ b/ld/testsuite/ld-aarch64/rela-abs-relative-opt.d @@ -0,0 +1,13 @@ +#name: rela-abs-relative --no-apply-dynamic-relocs +#source: rela-abs-relative.s +#ld: -shared -Ttext-segment=0x100000 -Tdata=0x200000 -Trelocs.ld --no-apply-dynamic-relocs +#notarget: aarch64_be-*-* +#objdump: -dR -j .data +#... + +Disassembly of section .data: + +.* <a>: + 200000: fe ca fe ca 00 00 00 00 00 00 00 00 00 00 00 00.* + 200008: R_AARCH64_RELATIVE \*ABS\*\+0x100ca + 200010: ad de ad de 00 00 00 00.* diff --git a/ld/testsuite/ld-aarch64/rela-abs-relative.d b/ld/testsuite/ld-aarch64/rela-abs-relative.d new file mode 100644 index 0000000..aba876b --- /dev/null +++ b/ld/testsuite/ld-aarch64/rela-abs-relative.d @@ -0,0 +1,13 @@ +#name: rela-abs-relative +#source: rela-abs-relative.s +#ld: -shared -Ttext-segment=0x100000 -Tdata=0x200000 -Trelocs.ld +#notarget: aarch64_be-*-* +#objdump: -dR -j .data +#... + +Disassembly of section .data: + +.* <a>: + 200000: fe ca fe ca 00 00 00 00 ca 00 01 00 00 00 00 00.* + 200008: R_AARCH64_RELATIVE \*ABS\*\+0x100ca + 200010: ad de ad de 00 00 00 00.* diff --git a/ld/testsuite/ld-aarch64/rela-abs-relative.s b/ld/testsuite/ld-aarch64/rela-abs-relative.s new file mode 100644 index 0000000..d4c4663 --- /dev/null +++ b/ld/testsuite/ld-aarch64/rela-abs-relative.s @@ -0,0 +1,16 @@ + .section .rodata + .align 3 + .type string1, %object + .size string1, 8 +local_foo: + .string "local_foo" + + .section .data,"aw",%progbits + .align 3 + .global a + .type a, %object + .size a, 24 +a: + .xword 0xcafecafe + .xword local_foo + 0xca + .xword 0xdeaddead |