[lld] r253869 - Fix Elf_Rel processing for .eh_frame.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 07:28:28 PST 2015
Author: rafael
Date: Mon Nov 23 09:28:28 2015
New Revision: 253869
URL: http://llvm.org/viewvc/llvm-project?rev=253869&view=rev
Log:
Fix Elf_Rel processing for .eh_frame.
Thanks to Simon for the bug report.
Added:
lld/trunk/test/ELF/eh-frame-rel.s
Modified:
lld/trunk/ELF/OutputSections.cpp
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=253869&r1=253868&r2=253869&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Mon Nov 23 09:28:28 2015
@@ -1003,7 +1003,7 @@ template <class ELFT> void EHOutputSecti
if (RelSec->sh_type == SHT_RELA)
S->relocate(Buf, nullptr, EObj.relas(RelSec));
else
- S->relocate(Buf, nullptr, EObj.relas(RelSec));
+ S->relocate(Buf, nullptr, EObj.rels(RelSec));
}
}
Added: lld/trunk/test/ELF/eh-frame-rel.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/eh-frame-rel.s?rev=253869&view=auto
==============================================================================
--- lld/trunk/test/ELF/eh-frame-rel.s (added)
+++ lld/trunk/test/ELF/eh-frame-rel.s Mon Nov 23 09:28:28 2015
@@ -0,0 +1,7 @@
+// REQUIRES: x86
+// RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o
+// RUN: ld.lld %t.o %t.o -o %t -shared
+// We used to try to read the relocations as RELA and error out
+
+ .cfi_startproc
+ .cfi_endproc
More information about the llvm-commits
mailing list