Teach emitElf about PT_PAX_FLAGS
authorPeter Foley <pefoley2@pefoley.com>
Sun, 1 May 2016 17:02:06 +0000 (13:02 -0400)
committerPeter Foley <pefoley2@pefoley.com>
Fri, 6 May 2016 15:27:33 +0000 (11:27 -0400)
commit2a468261be1162bf91096659752f953539bdee0e
tree1496b2d86a51cb8448c217240dee2a0aa8d5df5a
parent8840c6d2b58f65f8286b9178be6cd3a5e8614d7f
Teach emitElf about PT_PAX_FLAGS

When rewriting binaries that have originally been built by the Gentoo
Linux toolchain, dyninst needs to know about the PT_PAX_FLAGS field that
is added to the elf header.

Since
http://git.dyninst.org/?p=dyninst.git;a=commit;h=91bdb5e73fd7a05c7750263efa9fb24e0a39c011
Using dyninst causes the UNKNOWN assert to trigger on PT_PAX_FLAGS.
Add the correct constant to the switch statement to allow these
binaries to be rewritten.

The correct constant was retrieved from
https://pax.grsecurity.net/binutils-2.19-pt-pax-flags-200811041810.patch
symtabAPI/src/emitElf-64.C
symtabAPI/src/emitElf-64.h