This is the mail archive of the
mailing list for the binutils project.
Re: Add compiler and linker hardening after the fact
John Reiser <email@example.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.