ABI specifies the allowed range for the result of these relocations as 2^(n-1) <= X < 2^n.
In addition, this patch makes tests for these relocations precise.
Paths
| Differential D14957
[ELF/AArch64] Fix overflow checks for R_AARCH64_{ABS,PREL}{16,32} relocations. ClosedPublic Authored by ikudrin on Nov 24 2015, 8:45 AM.
Details
Summary ABI specifies the allowed range for the result of these relocations as 2^(n-1) <= X < 2^n. In addition, this patch makes tests for these relocations precise.
Diff Detail
Event Timelineikudrin added a parent revision: D14943: [ELF] Factor out relocation checks into separate functions..Nov 24 2015, 8:45 AM
Comment Actions
ruiu edited edge metadata. Comment ActionsLGTM
This revision is now accepted and ready to land.Nov 25 2015, 10:29 AM Closed by commit rL254146: [ELF/AArch64] Fix overflow checks for R_AARCH64_{ABS,PREL}{16,32} relocations. (authored by ikudrin). · Explain WhyNov 26 2015, 2:08 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 41220 lld/trunk/ELF/Target.cpp
lld/trunk/test/ELF/aarch64-abs16-error.s
lld/trunk/test/ELF/aarch64-abs16.s
lld/trunk/test/ELF/aarch64-abs32-error.s
lld/trunk/test/ELF/aarch64-abs32.s
lld/trunk/test/ELF/aarch64-data-relocs.s
lld/trunk/test/ELF/aarch64-prel16-error.s
lld/trunk/test/ELF/aarch64-prel16.s
lld/trunk/test/ELF/aarch64-prel32-error.s
lld/trunk/test/ELF/aarch64-prel32.s
|