Making the constructor come first would be awkward. You could do it at link
time if you can be certain the appropriate .o file comes first, but that's not
likely. You could reorder the ctors after linking, but only if you can
identify the right one to move, which sounds hard. Or you could make up a
special .ctor section (.ctor.caps) and change the linker script to merge it
into the ctors as the very first entry.
Setting it up so that an external program can list/change the data is pretty
easy - you just make up an ELF section for it, and store it there.
The downside of this scheme is that its pretty much impossible to apply to
existing executables, so you have to recompile. For most people, its easier to
recompile and replace the kernel than recompile and replace everything else.
J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/