summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-09-30 21:29:54 +0000
committerTim Northover <tnorthover@apple.com>2014-09-30 21:29:54 +0000
commitcf78d37fd65f273e3db55c585105e3f310cadf39 (patch)
tree5371262ceecd6743184306b9663c346ab52d5e3b /lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
parente1c79749ca96a704556c46a8e9140244a9bbdfed (diff)
downloadbcm5719-llvm-cf78d37fd65f273e3db55c585105e3f310cadf39.tar.gz
bcm5719-llvm-cf78d37fd65f273e3db55c585105e3f310cadf39.zip
[mach-o] create __unwind_info section on x86_64
This is a minimally useful pass to construct the __unwind_info section in a final object from the various __compact_unwind inputs. Currently it doesn't produce any compressed pages, only works for x86_64 and will fail if any function ends up without __compact_unwind. rdar://problem/18208653 llvm-svn: 218703
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
index 790559f10db..396742456ff 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
@@ -220,6 +220,7 @@ const MachOFinalSectionFromAtomType sectsToAtomType[] = {
ENTRY("__TEXT", "__stub_helper", S_REGULAR, typeStubHelper),
ENTRY("__TEXT", "__gcc_except_tab", S_REGULAR, typeLSDA),
ENTRY("__TEXT", "__eh_frame", S_COALESCED, typeCFI),
+ ENTRY("__TEXT", "__unwind_info", S_REGULAR, typeProcessedUnwindInfo),
ENTRY("__DATA", "__data", S_REGULAR, typeData),
ENTRY("__DATA", "__const", S_REGULAR, typeConstData),
ENTRY("__DATA", "__cfstring", S_REGULAR, typeCFString),
@@ -565,7 +566,8 @@ void Util::copySectionContent(NormalizedFile &file) {
for (AtomInfo &ai : si->atomsAndOffsets) {
uint8_t *atomContent = reinterpret_cast<uint8_t*>
(&sectionContent[ai.offsetInSection]);
- _archHandler.generateAtomContent(*ai.atom, r, addrForAtom, atomContent);
+ _archHandler.generateAtomContent(*ai.atom, r, addrForAtom,
+ _context.baseAddress(), atomContent);
}
}
}
OpenPOWER on IntegriCloud