This is slightly easier to read IMHO.
The main motivation is that with this a SharedSymbol doen't need a section, which reduces the size of SymbolUnion.
Paths
| Differential D46103
Replace SharedSymbols with Defined when creating copy relocations ClosedPublic Authored by • espindola on Apr 25 2018, 10:19 PM.
Details
Diff Detail Event TimelineComment Actions This seems makes things slightly simpler, so LGTM. Suggestions are below.
This revision is now accepted and ready to land.Apr 26 2018, 2:34 AM Comment Actions Rebased and address some of the review comments. This now move SharedSymbol from 80 to 72 bytes and Defined stays at 72. With this the peak allocation when linking chromium goes from 568.1 to 564.2 MB.
Comment Actions LGTM Nice! I actually once tried to do the same thing but didn't succeed. It's nice to see you made it!
Revision Contents
Diff 144160 ELF/LinkerScript.cpp
ELF/MapFile.cpp
ELF/Relocations.cpp
ELF/Symbols.h
ELF/Symbols.cpp
ELF/SyntheticSections.h
ELF/SyntheticSections.cpp
ELF/Writer.cpp
test/ELF/map-file.s
|
Please write a function comment to explain that a copy-relocated shared symbol is virtually the same as a defined symbol in a BSS section, so we replace the symbol as such.