This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Tweak the names we give to archive members
ClosedPublic

Authored by int3 on Apr 20 2023, 11:56 AM.

Details

Reviewers
oontvoo
Group Reviewers
Restricted Project
Commits
rG9df7daa5ef91: [lld-macho] Tweak the names we give to archive members
Summary

In particular, make it foo.a(foo.o)$ARCHIVE_OFFSET. The goal is to
make it more similar to both ld64 implementation, which uses the
foo.a(foo.o)$MODULE_ID format. We dump some of these names in LTO
code, so matching ld64's format is helpful. This format is also more
similar to LLD-ELF's, which is foo.a(foo.o at $ARCHIVE_OFFSET).

Diff Detail

Event Timeline

int3 created this revision.Apr 20 2023, 11:56 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 20 2023, 11:56 AM
int3 requested review of this revision.Apr 20 2023, 11:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2023, 11:56 AM
oontvoo accepted this revision.Apr 20 2023, 12:11 PM
oontvoo added a subscriber: oontvoo.

LG!

(FWIW, I think ELF's format is more human-readable ... perhaps if consistency were the goal, we should choose to be consistent with other LLD ports? /shrug)

This revision is now accepted and ready to land.Apr 20 2023, 12:11 PM
int3 added a comment.Apr 20 2023, 1:31 PM

I agree it's more readable but following ld64 is more useful for us 😅

also LLD-COFF doesn't match LLD-ELF's format either

This revision was automatically updated to reflect the committed changes.