diff options
author | Ryan Prichard <rprichard@google.com> | 2019-10-16 16:11:58 -0700 |
---|---|---|
committer | Ryan Prichard <rprichard@google.com> | 2019-10-17 23:12:05 -0700 |
commit | 9ef61a287a68f25477920345a74359f3f5bb3764 (patch) | |
tree | 6ae91d9826f1c010c7ac43944eb4de54a54c760d /libc/malloc_debug/malloc_debug.cpp | |
parent | 2ab4e0f9995f0cd47a31d01d09d736a4ca5706a5 (diff) |
Remove broken arm64 PREL/ABS relocations
Specifically, remove:
- R_AARCH64_ABS32
- R_AARCH64_ABS16
- R_AARCH64_PREL64
- R_AARCH64_PREL32
- R_AARCH64_PREL16
These relocations never currently appear in dynamic ELF files, and the
linker didn't handle them correctly. The AArch64 ELF ABI document
classifies them as "static relocations", which dynamic linkers don't need
to handle. (The document also classifies R_AARCH64_ABS64 as static,
though, and that relocation is common in DSOs. Perhaps static linkers
can't use R_AARCH64_GLOB_DAT to relocate data outside the GOT.)
Previously, for {ABS,PREL}{32,16}, Bionic always failed with an
out-of-range error. e.g. For {ABS,PREL}16, the value had to satisfy two
conditions:
- be at least (Elf64_Addr)INT16_MIN, i.e. 0xffff_ffff_ffff_8000
- be at most (Elf64_Addr)UINT16_MAX, i.e. 0xffff
The PREL relocations should have used sym_addr + addend - reloc, not
sym_addr + addend - rel->r_offset.
Bug: http://b/19197129
Test: bionic unit tests
Change-Id: I791da8ac471b3fb108cf77405c222f6e4bd34ae4
Diffstat (limited to 'libc/malloc_debug/malloc_debug.cpp')
0 files changed, 0 insertions, 0 deletions