If the '-wrap' switch is used, all undefined references to 'symbol' will be resolved to '_ _wrap_symbol'.
Similarly, undefined references to '_ _real_symbol' will be resolved to 'symbol'.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This patch needs redesigning because we don't want to look up hash tables more than once for each symbol. In this patch, names for undefined symbols are looked up twice -- once in the InputFile.cpp and the other in SymbolTable.cpp.
Comment Actions
We have to look up for different names for defined and undefined symbols, so we can't use just one hash map.
In most cases, when the -wrap switch is not used and UndefSymNameReplacement is empty, addition lookup will be very cheap, without calculating a hash value at all. On the other hand, we can use just std::map which expected to work really quick in our case.