I don't get why such symbols are kept. Also it's always possible to use --keep-file-symbols if they shouldn't be stripped for whatever reason
Details
- Reviewers
jakehehrlich rupprecht jhenderson • espindola alexander-shaposhnikov paulsemel - Commits
- rZORG47cd75bb2e08: [llvm-objcopy] Strip file symbols with --strip-unneeded
rG47cd75bb2e08: [llvm-objcopy] Strip file symbols with --strip-unneeded
rGec767b0b4acf: [llvm-objcopy] Strip file symbols with --strip-unneeded
rL361231: [llvm-objcopy] Strip file symbols with --strip-unneeded
Diff Detail
- Repository
- rL LLVM
Event Timeline
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
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.
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?