This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objcopy] Strip file symbols with --strip-unneeded
ClosedPublic

Authored by evgeny777 on May 7 2019, 7:38 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

evgeny777 created this revision.May 7 2019, 7:38 AM

Does this match GNU objcopy's behaviour? If GNU strips them, we should probably too. If not, we shouldn't.

Does this match GNU objcopy's behaviour? If GNU strips them, we should probably too. If not, we shouldn't.

Yes, GNU objcopy seems to remove STT_FILE symbols even in relocatable objects

jhenderson accepted this revision.May 7 2019, 9:06 AM

This looks good to me, but it would be worth getting a second pair of eyes from one of the other contributors. Additionally, I'd like to have a better idea of why the decision was made to keep file symbols originally, since it was an explicit case before. I see you originally added it in https://reviews.llvm.org/rL353919.

This revision is now accepted and ready to land.May 7 2019, 9:06 AM

I see you originally added it in https://reviews.llvm.org/rL353919.

It was in fact added in https://reviews.llvm.org/D46896. In r353919 I just moved the code to a separate function.

I see you originally added it in https://reviews.llvm.org/rL353919.

It was in fact added in https://reviews.llvm.org/D46896. In r353919 I just moved the code to a separate function.

Oh, my bad. Sorry, I didn't look hard enough. Still worth seeing if anybody else has anything to chime in with before this goes in, so I'd give it a day before committing, if that's okay?

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMay 21 2019, 2:08 AM