mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
79e7419204
R_AARCH64_ABS64, R_AARCH64_ABS32 and R_AARCH64_ABS16 are data relocations supported in AArch64 elf ABI. R_AARCH64_ABS64 under LP64 is allowed in shared object and a dynamic relocation entry will be generated. This allows the dynamic linker to do further symbol resolution. R_AARCH64_ABS32 likewise is allowed in shared object, however under ILP32 abi. The original behavior for R_AARCH64_ABS32 under LP64 is that, it's allowed in shared object and silently resolved at static linking time. No dynamic relocation entry is generate for it. R_AARCH64_ABS16 is allowed in shared object under both L64 and ILP32. It's resolved at static linking time as well. Under LP64, the address should be 64-bit. R_AARCH64_ABS32 relocation indicates an address that is only sized 32 bits which is meaningless in LP64 shared object. It's useful to error out. I have checked glibc dynamic linker code, R_AARCH64_ABS16 is not supported at all. So R_AARCH64_ABS16 should be reject in shared object completely. In this patch, R_AARCH64_ABS32 is rejected under LP64 in constant section of shared object. R_AARCH64_ABS16 is rejected in constant section of shared object in both ABI. This will sometimes provide useful information for buggy code.
11 lines
115 B
ArmAsm
11 lines
115 B
ArmAsm
.text
|
|
and x0, x0, x0
|
|
and x0, x0, #0x1
|
|
.xword tempy2
|
|
|
|
.data
|
|
.word tempy
|
|
.hword tempy3
|
|
.hword tempy3+8
|
|
|