https://www.youtube.com/watch?v=uxbJo5DDpWY&feature=player_d...
Basically, a wheel is perfect. Nothing we have developed so far is a wheel. We should not stop trying to learn how to write these low level things, because these are the people that might come up with better things in the future.
In Modula, each module had an "init" section. The Modula linker traced the dependencies of the "init" sections and arranged for them to be executed in a valid order. If there was a dependency loop, that was an error. That's way ahead of the C/C++ rules on order of initialization.
Elimination of duplicate code at link time is possible. For template and generic instantiations, this can be a big win, especially for C++.
Some linkers support "weak links" - if A has a weak link to B, and there are no strong links to B, B is not loaded and the link is null. This is useful for optional components which need some kind of startup.
Quoting dead comment:
vegedor 17 hours ago | link [dead]
GCC with --flto, literally link-time-optimizations, is new to me and seems to be good. It turns everything it can into constants, even inlines functions from pointer calls and resolves them if the arguments are also constant. That didn't work for me without it. Dunno if that's std compliant.
Writing a memory allocator is a nice exercise but it's also fundamental research: by toying around, because of sheer interest, with what everyone else takes for granted you might come up with something that changes things for all, big time.
For example, memory allocators were considered a "well enough solved" problem for a long time until suddenly we had a rush of new, experimental, and/or optimized allocators like jemalloc, tcmalloc etc. While they might not be revolutionary they still blast the old 80's/90's implementations like no tomorrow.