Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
ELF/MarkLive.cpp | ||
---|---|---|
42 ↗ | (On Diff #54885) | So this code movement is just to move code to the file where it is used (plus a small cleanup), right? |
165–168 ↗ | (On Diff #54885) | Is this order safe? If getSymbols happens to return non-shared symbols and shared symbols in this order, then you would clear IsUsedInRegularObj bit for all shared symbols, wouldn't you? |
test/ELF/gc-sections-shared.s | ||
---|---|---|
9 ↗ | (On Diff #54885) | This matches the gold and bfd behaviour? I would actually expect the .so to keep bar2 alive. After all, if a symbol in a .so can force us to export a symbol from an executable, why shouldn't it for us to keep it alive? That is similar to us not gcing section that contribute to the dynamic table of a .so. |
This matches the gold and bfd behaviour?
bfd exports foo and bar. gold exports foo, bar and bar2.
I would actually expect the .so to keep bar2 alive. After all, if a symbol in a .so can force us to export a symbol from an executable, why shouldn't it for us to keep it alive?
That is what I am testing with the definition of bar. In this case, we are testing that we are removing bar2 from dynsym because it ends up being an unused reference.
- Add utility function to replace boilerplate get-target-of-relocation code
ELF/MarkLive.cpp | ||
---|---|---|
28 ↗ | (On Diff #55029) | We still need it in (e.g.) InputSection<ELFT>::getThunksSize(). |
ELF/OutputSections.cpp | ||
1155 ↗ | (On Diff #55029) | I found that the two lines that retrieved the replacement SymbolBody were duplicated in several places, so I pulled that out into a utility function and updated the users. The rest of the code is only duplicated here and in MarkLive, so it's probably simplest to keep the duplication. |
ELF/ICF.cpp | ||
---|---|---|
250 ↗ | (On Diff #55111) | No, removed. |