diff options
author | Renlin Li <renlin.li@arm.com> | 2017-12-13 12:11:25 +0000 |
---|---|---|
committer | Renlin Li <renlin.li@arm.com> | 2017-12-13 15:15:50 +0000 |
commit | 79e741920446582bd0e09f3e2b9f899c258efa56 (patch) | |
tree | 1263cda68772ac90612d09e1ab2747c046a554d3 /ld/ChangeLog | |
parent | 9664701462aec634d304923df8dc9c52c5a92caf (diff) | |
download | fsf-binutils-gdb-79e741920446582bd0e09f3e2b9f899c258efa56.zip fsf-binutils-gdb-79e741920446582bd0e09f3e2b9f899c258efa56.tar.gz fsf-binutils-gdb-79e741920446582bd0e09f3e2b9f899c258efa56.tar.bz2 |
[BFD][AARCH64]Disallow R_AARCH64_ABS32(LP64) & R_AARCH64_ABS16 in const section of shared object.
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.
Diffstat (limited to 'ld/ChangeLog')
-rw-r--r-- | ld/ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index db025ee..d0b80d1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +2017-12-13 Renlin Li <renlin.li@arm.com> + + * testsuite/ld-aarch64/aarch64-elf.exp: Run new test cases. + * testsuite/ld-aarch64/emit-relocs-258-dyn-bad.d: New. + * testsuite/ld-aarch64/emit-relocs-258.s: New. + * testsuite/ld-aarch64/emit-relocs-259-dyn-bad.d: New. + * testsuite/ld-aarch64/emit-relocs-259.s: New. + * testsuite/ld-aarch64/gc-relocs-257.s: Put R_AARCH64_ABS32, + R_AARCH64_ABS16 data into data section. + 2017-12-07 Alan Modra <amodra@gmail.com> PR 22465 |