Re: Capabilities done right [diff against 2.3.1]

Theodore Y. Ts'o (tytso@mit.edu)
Tue, 18 May 1999 17:02:08 -0400 (EDT)


Date: Tue, 18 May 1999 13:48:56 -0700 (PDT)
From: Jeremy Fitzhardinge <jeremy@goop.org>

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.

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.

Why it is it impossible to apply to existing executables? Sure, you'd
have to pull apart the ELF executable and add some extra code (which
would obviously be architecture speccific, since it would include
machine code) to the text segment, but I don't think it's *impossible*.

- Ted

-
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/