-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
@ianlancetaylor commented in CL 20165:
The single slowest operation a linker can do is traverse the symbol table and look at every symbol. The single biggest improvement in link time in the gold linker was changing the number of symbol table traversals from about 25 to about 3. Yet cmd/link traverses the entire symbol table all the time. It's not good.
@crawshaw replied:
Agreed. There are a couple of other not good features:
- LSym has a Type word, but it's not filled out until some nebulous intermediate pass, so lots of code (like this) ends up string matching on the symbol name prefix.
- dodata does some odd build-a-linked-list, then sort-the-linked-list-into-segments game.
I think these problems and the many traversals could be fixed by the object file reader assigning Type and building useful link-wide slices when a symbol is read in. But it is pretty major surgery I'm not ready to perform.
I've moved this to an issue, since folks look for work and ideas in issues.
cc @mwhudson who likes object files. :)