Page MenuHomePhabricator

Add RelocVisitor support for MachO
ClosedPublic

Authored by loladiro on Mar 7 2015, 11:56 PM.

Details

Summary

This commit adds partial support for MachO relocations to RelocVisitor.
A simple test case is added to show that relocations are indeed being
applied and that using llvm-dwarfdump on MachO files no longer errors.
Correctness is not yet tested, due to an unrelated bug in DebugInfo,
which will be fixed with appropriate testcase in a followup commit.

Diff Detail

Repository
rL LLVM

Event Timeline

loladiro updated this revision to Diff 21444.Mar 7 2015, 11:56 PM
loladiro retitled this revision from to Add RelocVisitor support for MachO.
loladiro updated this object.
loladiro edited the test plan for this revision. (Show Details)
loladiro added reviewers: lhames, friss.
loladiro set the repository for this revision to rL LLVM.
loladiro added a subscriber: Unknown Object (MLST).
majnemer added inline comments.
include/llvm/Object/RelocVisitor.h
21 ↗(On Diff #21444)

Please sort this after ELFObjectFile.h

loladiro updated this revision to Diff 21456.Mar 8 2015, 11:48 AM

Resort headers.

Bump. Could somebody look at the DWARFDebugLine bug fix at least? It doesn't have to do much with MachO (except that it's exposed by running it on the MachO test case). That's the major functional point that needs review here.

echristo accepted this revision.May 21 2015, 11:31 AM
echristo added a reviewer: echristo.
echristo added a subscriber: echristo.

Seems reasonable to me. The booleans to printLineInfoForInput should be annotated in the calls.

-eric

This revision is now accepted and ready to land.May 21 2015, 11:31 AM
loladiro updated this revision to Diff 26283.May 21 2015, 4:22 PM
loladiro updated this object.
loladiro edited the test plan for this revision. (Show Details)
loladiro edited edge metadata.

Rebased and split out the DWARF line info bugfix, which I will submit separately.

This revision was automatically updated to reflect the committed changes.