NetBSD version 5 requires PT_NOTE for PaX. Also adjust other *BSD and PT_NOTE.

[Tested OK on FreeBSD 8.1, NetBSD 5.1, OpenBSD 4.8.  Cleanup needed.]
This commit is contained in:
John Reiser
2010-11-16 21:13:42 -08:00
parent dfc2efe8a6
commit e6357b81eb
17 changed files with 5108 additions and 2460 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ void PackLinuxElf32x86interp::pack1(OutputFile *fo, Filter &)
h3.phdr[2].p_align = 1;
if (opt->o_unix.make_ptinterp) { // unusual "once per release"
elfout = h3;
*(cprElfHdr3 *)&elfout = h3;
elfout.ehdr.e_phnum = 1;
fo->write(&elfout, elfout.ehdr.e_ehsize + elfout.ehdr.e_phentsize);
}