It turns out that postThunkContents() is only used for
sorting symbols in .symtab.
Though we can instead move the logic to finalizeContents,
postpone calling it and then get rid of postThunkContents() completely.
Differential D49547
[ELF] - Get rid of postThunkContents(). grimar on Jul 19 2018, 8:05 AM. Authored by
Details It turns out that postThunkContents() is only used for Though we can instead move the logic to finalizeContents,
Diff Detail Event TimelineComment Actions Looks reasonable to me. I've made a suggestion that might simplify a bit further, I've not tried or tested it though. Apologies for the late response; I've had this stuck in a draft state for a while, must have forgotten to press submit.
Comment Actions Thanks for the feedback, Peter!
Comment Actions LGTM. Probably worth waiting a bit to see if Rui has any opinions.
|
If the only line of code that SymbolTableSection (SHT_SYMTAB) and SymbolTableBaseSection (SHT_DYNSYM) share is getParent()->Link ... Would it be possible to move sortSymTabSymbols into SymbolTableSection::finalizeContents() add the getParent()->Link and let the virtual call mechanism replace the test?