[RuntimeDyld] Teach RuntimeDyldMachO how to handle scattered VANILLA relocs on

i386.

This fixes two more MCJIT regression tests on i386:

  ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
  ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll

The implementation of processScatteredVANILLA is tasteless (*ba-dum-ching*),
but I'm working on a substantial tidy-up of RuntimeDyldMachO that should
improve things.

This patch also fixes a type-o in RuntimeDyldMachO::processSECTDIFFRelocation,
and teaches that method to skip over the PAIR reloc following the SECTDIFF.

<rdar://problem/16961886>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209478 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Lang Hames
2014-05-22 22:30:13 +00:00
parent ff93350aa6
commit 8f33e4c5e4
2 changed files with 61 additions and 9 deletions

View File

@@ -71,6 +71,12 @@ private:
ObjectImage &ObjImg,
ObjSectionToIDMap &ObjSectionToID);
relocation_iterator processI386ScatteredVANILLA(
unsigned SectionID,
relocation_iterator RelI,
ObjectImage &ObjImg,
ObjSectionToIDMap &ObjSectionToID);
struct EHFrameRelatedSections {
EHFrameRelatedSections()
: EHFrameSID(RTDYLD_INVALID_SECTION_ID),