This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Include symbol sizes in mapfile
ClosedPublic

Authored by int3 on Oct 13 2022, 8:26 AM.

Details

Reviewers
oontvoo
Group Reviewers
Restricted Project
Commits
rGbdd0cec5697f: [lld-macho] Include symbol sizes in mapfile
Summary

This matches ld64's behavior.

Additionally, I edited the "Dead Stripped Symbols" header to omit "Address" --
this also matches ld64.

Diff Detail

Event Timeline

int3 created this revision.Oct 13 2022, 8:26 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 13 2022, 8:26 AM
int3 requested review of this revision.Oct 13 2022, 8:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2022, 8:26 AM
oontvoo accepted this revision.Oct 13 2022, 8:40 AM
oontvoo added a subscriber: oontvoo.

LG

lld/test/MachO/map-file.s
62

why do dead symbols need sizes and not addresses? (is that LD64's output too?)

This revision is now accepted and ready to land.Oct 13 2022, 8:40 AM
int3 added inline comments.Oct 13 2022, 8:42 AM
lld/test/MachO/map-file.s
62

I mean, there are no addresses to emit for dead symbols since they don't appear in the output, but they do still have sizes based on their size in the input object file :)

and yes this is what ld64 does too

This revision was automatically updated to reflect the committed changes.