mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
32f573bcb3
Emit *GLOB_DAT instead of *RELATIVE relocs for protected data in shared objects. This is needed for the fix of glibc bug 17711: https://sourceware.org/bugzilla/show_bug.cgi?id=17711 bfd: PR ld/18705 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define. ld/testsuite: PR ld/18705 * ld-aarch64/protected-data.d: New. * ld-aarch64/protected-data.s: New. * ld-aarch64/aarch64-elf.exp: Add new test.
19 lines
244 B
ArmAsm
19 lines
244 B
ArmAsm
.data
|
|
.protected var
|
|
.global var
|
|
.align 2
|
|
.type var, %object
|
|
.size var, 4
|
|
var:
|
|
.word 1
|
|
|
|
.text
|
|
.align 2
|
|
.global getaddr
|
|
.type getaddr, %function
|
|
getaddr:
|
|
adrp x0, :got:var
|
|
ldr x0, [x0, #:got_lo12:var]
|
|
ret
|
|
.size getaddr, .-getaddr
|