[PATCH] [x86_64] Don't truncate PC-relative relocations in ELF EH frames to 32 bits

Joerg Sonnenberger joerg at NetBSD.org
Tue Nov 18 05:34:03 PST 2014


================
Comment at: lib/MC/MCObjectFileInfo.cpp:278
@@ +277,3 @@
+    if (RelocM == Reloc::PIC_) {
+      FDECFIEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
+        ((CMModel == CodeModel::Small || CMModel == CodeModel::Medium)
----------------
Why do we need the DW_EH_PE_indirect in the case of Small/Medium?

Thinking again, I think it should be:

Small/Medium: pcrel + sdata4
otherwise: pcrel + sdata8

http://reviews.llvm.org/D6079






More information about the llvm-commits mailing list