[llvm-readobj/elf] - Fix the PREL31 relocation computation used for dumping arm32 unwind info (-u).
This is a part of https://bugs.llvm.org/show_bug.cgi?id=47581. We have the following computation: ``` (1) uint64_t Location = Address & 0x7fffffff; (2) if (Location & 0x04000000) (3) Location |= (uint64_t) ~0x7fffffff; (4) return Location + Place; ``` At line 2 there is a mistype. The constant should be `0x40000000`, not `0x04000000`, because the intention here is to sign extend the `Location`, which is the 31 bit signed value. Differential revision: https://reviews.llvm.org/D88407
Loading
Please sign in to comment