This is an archive of the discontinued LLVM Phabricator instance.

Move GOTPass and StubsPass from Core to MachO
ClosedPublic

Authored by kledzik on Jul 8 2014, 2:56 PM.

Details

Summary

When I originally wrote the GOT and Stubs Passes I had hoped
they were generic enough to be usable by all platforms. But ELF
is using private Passes to create PLT entries and I don't think
COFF needs these Passes. I'd plan to change the interface to these
Passes to make it easier to add architectures in mach-o. As
a first step, I'd like to move these Passes out of "Core" and make
them mach-o specific.

Diff Detail

Event Timeline

kledzik updated this revision to Diff 11173.Jul 8 2014, 2:56 PM
kledzik retitled this revision from to Move GOTPass and StubsPass from Core to MachO.
kledzik updated this object.
kledzik edited the test plan for this revision. (Show Details)
kledzik added a subscriber: Unknown Object (MLST).
ruiu edited edge metadata.Jul 8 2014, 3:01 PM

I support this.

Instead of deleting test files (you removed two files), can you move them to the mach-o directory?

Those tests need the glue code also deleted from CoreLinkingContext.cpp. That glue code identifies call sites, etc and specific to the flavor. I'll be adding new mach-o specific test cases for the passes as part of the refactoring I'm planning.

This came about because I was adding ARM support to mach-o and realized I would need to copy and paste lots of code from x86[_64] mach-o support. I'd rather refactor it so there is less copying needed.

ruiu accepted this revision.Jul 8 2014, 3:13 PM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 8 2014, 3:13 PM
shankarke accepted this revision.Jul 8 2014, 4:32 PM
shankarke edited edge metadata.
kledzik closed this revision.Jul 9 2014, 2:16 PM

committed in r212652

lib/ReaderWriter/MachO/StubsPass.cpp