August 17th, 2007
A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux
The most awesome thing I've read in a while.
Also: ld has its own scripting language. It turns out that you can use this to mush shared libraries together and the like, but this gives the rather odd possibility that a shared library could merely be a script.
If the linker cannot recognize the format of an object file, it will
assume that it is a linker script. A script specified in this way aug-
ments the main linker script used for the link (either the default
linker script or the one specified by using -T). This feature permits
the linker to link against a file which appears to be an object or an
archive, but actually merely defines some symbol values, or uses
"INPUT" or "GROUP" to load other objects. Note that specifying a
script in this way merely augments the main linker script; use the -T
option to replace the default linker script entirely.
I wonder sometimes if any of my bosses would understand how useful a useless day at work can be.