This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add compiler and linker hardening after the fact


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]