diff options
Diffstat (limited to 'ld/testsuite/ld-arm')
-rw-r--r-- | ld/testsuite/ld-arm/arm-elf.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/pie-bind-locally-a.s | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/pie-bind-locally-b.s | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/pie-bind-locally.d | 9 |
4 files changed, 21 insertions, 0 deletions
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index 02a35f4..2b1e5b8 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -345,6 +345,7 @@ run_dump_test "movw-shared-3" run_dump_test "movw-shared-4" run_dump_test "rel32-reject" run_dump_test "rel32-reject-pie" +run_dump_test "pie-bind-locally" # Exclude non-ARM-EABI targets. diff --git a/ld/testsuite/ld-arm/pie-bind-locally-a.s b/ld/testsuite/ld-arm/pie-bind-locally-a.s new file mode 100644 index 0000000..76a2f67 --- /dev/null +++ b/ld/testsuite/ld-arm/pie-bind-locally-a.s @@ -0,0 +1,5 @@ + .text + .align 2 + .global _start +_start: + .word _start(GOT) diff --git a/ld/testsuite/ld-arm/pie-bind-locally-b.s b/ld/testsuite/ld-arm/pie-bind-locally-b.s new file mode 100644 index 0000000..8e6ff4f --- /dev/null +++ b/ld/testsuite/ld-arm/pie-bind-locally-b.s @@ -0,0 +1,6 @@ + .section .data.rel,"aw",%progbits + .align 2 + .type q, %object + .size q, 4 +q: + .word _start diff --git a/ld/testsuite/ld-arm/pie-bind-locally.d b/ld/testsuite/ld-arm/pie-bind-locally.d new file mode 100644 index 0000000..7ea031c --- /dev/null +++ b/ld/testsuite/ld-arm/pie-bind-locally.d @@ -0,0 +1,9 @@ +#source: pie-bind-locally-a.s +#source: pie-bind-locally-b.s +#ld: -pie +#readelf: -Wr + +Relocation section '\.rel\.dyn' at offset .* contains 2 entries: +[ ]+Offset[ ]+Info[ ]+Type[ ]+.* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_ARM_RELATIVE[ ].* +[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_ARM_RELATIVE[ ].* |