In this patch, all symbols are resolved normally and then wrap options
are applied. Renaming is implemented by mutating Body pointers of
Symbols. (As a result, Symtab.find(SymbolName)->getName() may return
a string that's different from SymbolName, but that is by design.
I designed the symbol and the symbol table to allow this kind of
operations.)
Details
- Reviewers
grimar
Diff Detail
Event Timeline
ELF/Options.td | ||
---|---|---|
114 | gold and bfd help descriptions says "Use wrapper functions for SYMBOL". | |
ELF/Symbols.h | ||
109 | Not sure here about naming. We already have setter named: void setBackref(Symbol *P) { Backref = P; } but your getter is named getSymbol. May be would be better to name them consistently (setBackref,getBackref or setSymbol,getSymbol) or even just do Backref member to be public and remove getter and setter ? | |
test/ELF/wrap.s | ||
5 | What about also testing alias and --wrap forms ? |
ELF/Symbols.h | ||
---|---|---|
109 | Yeah, there's a confusion on the naming scheme here. The root problem is that we split a symbol into Symbol and SymbolBody, but we often just say "symbol" to talk about the latter. getSymbol() is the right name because it's a member function of SymbolBody to retrieve a Symbol for that SymbolBody. I have no clear idea about what to do here. We might want to change setBackref to setSymbol, but I'm not sure if it helps improve readability. I'd like to keep it as is for now until we find a better name. |
gold and bfd help descriptions says "Use wrapper functions for SYMBOL".
Thats probably not just consistent but also a bit closer to what flag do since there are 2 wrappers used: real_XXX and wrap_XXX, not just only one