[PATCH] D17733: [ELF] Fix reading of PC values of FDEs
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 29 23:35:53 PST 2016
atanasyan added inline comments.
================
Comment at: ELF/OutputSections.cpp:675
@@ -676,2 +674,3 @@
case DW_EH_PE_sdata2:
- return FdeOff + read16<E>(F.PCRel);
+ PC = read16<E>(F.PCRel);
+ break;
----------------
rafael wrote:
> This might be shorter as a lambda so that you can just return PC.
Do you mean something like that?
```
auto Adjust = [=](uint64_t PC) {
return IsRelative ? PC + EhVA + F.Off + 8 : PC;
};
...
case DW_EH_PE_sdata4:
return Adjust(read32<E>(F.PCRel));
```
================
Comment at: test/ELF/eh-frame-hdr-abs-fde.s:21
@@ +20,3 @@
+# CHECK-NEXT: 10138 02000b0c 1d000000 00000014 0000001c
+# ^-- 'z'
+# ^-- 'L' - LSDA encoding
----------------
rafael wrote:
> Can you use objdump to get a parsed content?
It looks like I need to fix the llvm-objdump first. Now it shows `Augmentation data` as a regular string but it might contain non-printable characters. GNU objdump shows it as hex numbers.
Repository:
rL LLVM
http://reviews.llvm.org/D17733
More information about the llvm-commits
mailing list