Stephen Kell
Stephen Kell
Another trick might be to eliminate uniqtypes from a meta-DSO if they are defined by the meta-DSO of a DSO that is DT_NEEDED by the first DSO. That requires care:...
Doing the DT_NEEDED trick means we would have to be careful about loading meta-DSOs in dependency order.
It also poses a problem for aliases: if a DSO introduces a new alias for a type defined elsewhere, its definition of that uniqtype can't be pruned, and indeed will...
All this is departing from the 'let the linker do the uniquing' idea that was so appealing originally. I guess run-time uniquing by the ld.so is a different cost model...
Also it wouldn't reduce the number of dynsyms, as the pruned uniqtypes would still be present as UNDs. It would reduce the number of superfluous overridden defined uniqtype objects. That...
There are edge cases that will break if we make non-freestanding uniqtype libs. Basically we are second-guessing the LD_LIBRARY_PATH of the user invoking the program. So it breaks e.g. if...
One idea would be to generate freestanding meta-DSOs but heuristically place the uniqtypes so that the ones we expect to be duplicated by a depended-on library are colocated, and those...
Note also that I now have a "base" repository, toolsub, for re-usable elements of toolchain subversion (https://github.com/stephenrkell/toolsub). A basic linker plugin probably belongs in there, with the liballocs-specific one built...
I am increasingly keen to get this done, maybe this summer. At the same time, we should clean up the overall toolchain, including nastinesses such as ```usedtypes``` modifying each .o...
Revisiting this, I can see at least two possible ways to eliminate the need for a stubs library. - link with ```-z undefs``` so that unresolved syms are fine (loses...