This change adds support in llvm-objcopy for GNU objcopy's --localize-hidden option. This option changes every hidden or internal symbol into a local symbol.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
tools/llvm-objcopy/llvm-objcopy.cpp | ||
---|---|---|
197 | nit: This block should be probably above the RemovePred since RemovePred is related to lines 199-304. |
test/tools/llvm-objcopy/localize-hidden.test | ||
---|---|---|
36 | Why do you have so many different symbols here? Also, you should have symbols with hidden visibility with both local and weak bindings, to show that a) local symbols remain unchanged, and b) weak symbols are changed. Finally, a symbol with STV_PROTECTED visibility should also be included to show that it is not localized. | |
tools/llvm-objcopy/Object.cpp | ||
184–188 | I'd add blank lines either side of this block. |
- Moved RemovePred decl as recommended
- Added spaces around a bit of code
- Made some big changes to the test. I added weak and local hidden symbols. I changed their names because I couldn't keep track of anything. I changed a symbol to be protected. I believe it should meet the requirements originally desired.
Why do you have so many different symbols here?
Also, you should have symbols with hidden visibility with both local and weak bindings, to show that a) local symbols remain unchanged, and b) weak symbols are changed.
Finally, a symbol with STV_PROTECTED visibility should also be included to show that it is not localized.