This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Print archive names in linker map
ClosedPublic

Authored by int3 on Mar 8 2023, 3:50 PM.

Details

Reviewers
smeenai
Group Reviewers
Restricted Project
Commits
rG5b21395cc242: [lld-macho] Print archive names in linker map
Summary

If a symbol is pulled in from an archive, we should include the archive
name in the map file output. This is what ld64 does.

Note that we aren't using toString(InputFile*) here because it
includes the install name for dylibs in its output, and ld64's map file
does not contain those.

Diff Detail

Event Timeline

int3 created this revision.Mar 8 2023, 3:50 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 8 2023, 3:50 PM
int3 requested review of this revision.Mar 8 2023, 3:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2023, 3:50 PM
int3 updated this revision to Diff 503908.Mar 9 2023, 1:09 PM

make static

smeenai accepted this revision.Mar 10 2023, 1:30 PM
smeenai added a subscriber: smeenai.

Note that we aren't using toString(InputFile*) here because it

includes the install name for dylibs in its output, and ld64's map file
does not contain those.

Could you include this comment somewhere in the code as well, so that it's more easily accessible? Otherwise LGTM

This revision is now accepted and ready to land.Mar 10 2023, 1:30 PM
This revision was automatically updated to reflect the committed changes.