[lld] LLD: Fix getFdePC with sdata2 or sdata4 (PR #92228)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Sun May 19 23:57:31 PDT 2024
================
@@ -612,10 +612,23 @@ uint64_t EhFrameSection::getFdePc(uint8_t *buf, size_t fdeOff,
// the .eh_frame section.
size_t off = fdeOff + 8;
uint64_t addr = readFdeAddr(buf + off, enc & 0xf);
- if ((enc & 0x70) == DW_EH_PE_absptr)
- return addr;
- if ((enc & 0x70) == DW_EH_PE_pcrel)
- return addr + getParent()->addr + off + outSecOff;
+ if ((enc & 0x70) == DW_EH_PE_absptr) {
+ if ((enc & 0xf) == DW_EH_PE_sdata2)
----------------
wzssyqa wrote:
Ohh, yes. we won't support any platform with 16bit absptr with ELF.
https://github.com/llvm/llvm-project/pull/92228
More information about the llvm-commits
mailing list