summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/ArchHandler.h
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/ArchHandler.h
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/ArchHandler.h')
-rw-r--r--lld/lib/ReaderWriter/MachO/ArchHandler.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/MachO/ArchHandler.h b/lld/lib/ReaderWriter/MachO/ArchHandler.h
index 9118535085c..df063167699 100644
--- a/lld/lib/ReaderWriter/MachO/ArchHandler.h
+++ b/lld/lib/ReaderWriter/MachO/ArchHandler.h
@@ -53,6 +53,20 @@ public:
/// Used by GOTPass to update GOT References
virtual void updateReferenceToGOT(const Reference *, bool targetIsNowGOT) {}
+ /// Does this architecture make use of __unwind_info sections for exception
+ /// handling? If so, it will need a separate pass to create them.
+ virtual bool needsCompactUnwind() = 0;
+
+ /// Returns the kind of reference to use to synthesize a 32-bit image-offset
+ /// value, used in the __unwind_info section.
+ virtual Reference::KindValue imageOffsetKind() = 0;
+
+ /// Returns the kind of reference to use to synthesize a 32-bit image-offset
+ /// indirect value. Used for personality functions in the __unwind_info
+ /// section.
+ virtual Reference::KindValue imageOffsetKindIndirect() = 0;
+
+
/// Used by normalizedFromAtoms() to know where to generated rebasing and
/// binding info in final executables.
virtual bool isPointer(const Reference &) = 0;
@@ -126,6 +140,7 @@ public:
/// Copy raw content then apply all fixup References on an Atom.
virtual void generateAtomContent(const DefinedAtom &atom, bool relocatable,
FindAddressForAtom findAddress,
+ uint64_t imageBaseAddress,
uint8_t *atomContentBuffer) = 0;
/// Used in -r mode to convert a Reference to a mach-o relocation.
OpenPOWER on IntegriCloud