This is the third part of the series to use SymbolBody for locals.
Details
Diff Detail
Event Timeline
This is very similar to a change that I have locally.
ELF/Symbols.cpp | ||
---|---|---|
79–82 | This covers a special case, and I don't think absence of the input section always means that we want TocBase. Can you move this InputSectionBase::relocate like this? // PPC64 has a special relocation representing the TOC base pointer // that does not have a corresponding symbol. if (Config->EMachine == EM_PPC64 && RI.getType(false) == R_PPC64_TOC) { uintX_t SymVA = getPPC64TocBase() + A; Target->relocateOne(BufLoc, BufEnd, Type, AddrLoc, SymVA, 0); continue; } | |
95–98 | In this case Addend is taken into consideration. | |
103 | ... and adding an addend again? Is this correct? |
ELF/Symbols.cpp | ||
---|---|---|
33 | I think it makes more sense to keep it as a member function of SymbolBody. |
ELF/Symbols.cpp | ||
---|---|---|
103 | Addend is passed by reference and a new value may be assigned in getSymVA. So, doesn't this expression depend on the order of evaluation? If Addend is evaluated first and then the function is called, you will get a different value, no? |
I think it makes more sense to keep it as a member function of SymbolBody.