[MCJIT] Make llvm-rtdyld process eh_frame sections in -verify mode (accidentally
authorLang Hames <lhames@gmail.com>
Wed, 3 Sep 2014 05:42:52 +0000 (05:42 +0000)
committerLang Hames <lhames@gmail.com>
Wed, 3 Sep 2014 05:42:52 +0000 (05:42 +0000)
left out of r217010).

Also remove a crufty debugging output statement that was accidentally left in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217011 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp
tools/llvm-rtdyld/llvm-rtdyld.cpp

index c42287a480ba891a32172f343cc8b4ac21bf0052..07e0d3ab64528e8896f2a972358eba652a0f7400 100644 (file)
@@ -860,7 +860,6 @@ void RuntimeDyldCheckerImpl::registerSection(
   const SectionEntry &Section = getRTDyld().Sections[SectionID];
   StringRef SectionName = Section.Name;
 
   const SectionEntry &Section = getRTDyld().Sections[SectionID];
   StringRef SectionName = Section.Name;
 
-  dbgs() << "Registering " << SectionName << "\n";
   Stubs[FileName][SectionName].SectionID = SectionID;
 }
 
   Stubs[FileName][SectionName].SectionID = SectionID;
 }
 
index f626a56cbb16bc33f9a26d4565e5d149a3c88c9a..462f6c171456a897b9ea446aa968690ba651f659 100644 (file)
@@ -411,6 +411,7 @@ static int linkAndVerify() {
   // Instantiate a dynamic linker.
   TrivialMemoryManager MemMgr;
   RuntimeDyld Dyld(&MemMgr);
   // Instantiate a dynamic linker.
   TrivialMemoryManager MemMgr;
   RuntimeDyld Dyld(&MemMgr);
+  Dyld.setProcessAllSections(true);
   RuntimeDyldChecker Checker(Dyld, Disassembler.get(), InstPrinter.get(),
                              llvm::dbgs());
 
   RuntimeDyldChecker Checker(Dyld, Disassembler.get(), InstPrinter.get(),
                              llvm::dbgs());
 
@@ -439,6 +440,9 @@ static int linkAndVerify() {
   // Resolve all the relocations we can.
   Dyld.resolveRelocations();
 
   // Resolve all the relocations we can.
   Dyld.resolveRelocations();
 
+  // Register EH frames.
+  Dyld.registerEHFrames();
+
   int ErrorCode = checkAllExpressions(Checker);
   if (Dyld.hasError()) {
     errs() << "RTDyld reported an error applying relocations:\n  "
   int ErrorCode = checkAllExpressions(Checker);
   if (Dyld.hasError()) {
     errs() << "RTDyld reported an error applying relocations:\n  "