Add compiler and linker hardening after the fact

Ian Lance Taylor iant@google.com
Sat Mar 24 04:48:00 GMT 2012


John Reiser <jreiser@bitwagon.com> writes:

> In effect every executable has space to add another ElfXX_Phdr,
> because the entire Phdr table can be moved to the old EOF
> (leaving the original ElfXX_Phdr table as un-referenced "garbage"):
> just set ElfXX_Ehdr.e_phoff = stbuf.st_size, then append the new
> Phdr table.

It's a good idea but there are some kernels that will fail to execute
such an executable.  It will probably work on GNU/Linux, though.

Ian



More information about the Binutils mailing list