This is an archive of the discontinued LLVM Phabricator instance.

[mach-o] wire up a dylib's install-name in more places
AbandonedPublic

Authored by t.p.northover on Jun 30 2014, 7:44 AM.

Details

Reviewers
kledzik
Summary

Hi,

This adds support for installName to the various transformations an object file may go through. I *think* LC_ID_DYLIB commands will be interepreted and written correctly after this.

I know we were trying to keep tests contained in a single file and avoid using "Inputs/", but I can't think of a way to combine the two yaml files into a single one and get lld to act on them correctly.

Does it look OK?

Cheers.

Tim.

Diff Detail

Event Timeline

t.p.northover retitled this revision from to [mach-o] wire up a dylib's install-name in more places.
t.p.northover updated this object.
t.p.northover edited the test plan for this revision. (Show Details)
t.p.northover added a reviewer: kledzik.
t.p.northover added a subscriber: Unknown Object (MLST).
kledzik edited edge metadata.Jun 30 2014, 2:20 PM

One other thing to fix: If a dylib is built and there is no -install_name on the command line, whatever path is passed to -o should be used as the install name.

Also what case of multiple yaml docs in one test case file is not working (and leading you to use Inputs/ files)/

lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
349–353

LC_ID_DYLIB traditionally goes after the LC_SEGMENT commands. So, just move this code up in the function.

713–729

Same here. Move this up so LC_ID_DYLIB lands after LC_SEGMENT commands.

FYI, the timestamp should always be 1. The two _versions come from command line arguments.

t.p.northover abandoned this revision.Jul 8 2016, 2:01 PM