diff options
Diffstat (limited to 'ld/testsuite/ld-aarch64/relr-got.s')
-rw-r--r-- | ld/testsuite/ld-aarch64/relr-got.s | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ld/testsuite/ld-aarch64/relr-got.s b/ld/testsuite/ld-aarch64/relr-got.s new file mode 100644 index 0000000..44e4463 --- /dev/null +++ b/ld/testsuite/ld-aarch64/relr-got.s @@ -0,0 +1,40 @@ +// Test GOT relocations with DT_RELR. + +.text +.global _start +_start: + adrp x0, :got:sym_local + ldr x0, [x0, :got_lo12:sym_local] + + adrp x0, :got:sym_hidden + ldr x0, [x0, :got_lo12:sym_hidden] + + adrp x0, :got:sym_global + ldr x0, [x0, :got_lo12:sym_global] + + adrp x0, :got:sym_global + ldr x0, [x0, :got_lo12:sym_global_abs] + + adrp x0, :got:sym_weak_undef + ldr x0, [x0, :got_lo12:sym_weak_undef] + + adrp x0, :got:_DYNAMIC + ldr x0, [x0, :got_lo12:_DYNAMIC] + +sym_local: + nop + +.global sym_hidden +.hidden sym_hidden +sym_hidden: + nop + +.global sym_global +sym_global: + nop + +.global sym_global_abs +.set sym_global_abs, 42 + +.global sym_weak_undef +.weak sym_weak_undef |