Change class PackLinuxI386elf : public PackLinuxI386

into   class PackLinuxElf32x86 : public PackLinuxElf32Le : public PackLinuxElf32
which makes the code for compressing ELF (for direct-to-memory decompression)
cleaner because ELF has some of the class tree to itself.
This assumes PROT_EXEC|PROT_WRITE ought to work.
This is checked at runtime, and if it fails then
give a message on stderr and exit(127).

Modify --force-execve so that runtime avoids PROT_EXEC|PROT_WRITE.
Then executables compressed with --force-execve will run under
PaX, grSecurity, and strict SELinux.
This commit is contained in:
John Reiser
2006-05-21 13:58:24 -07:00
parent 69a00c0ab3
commit d2718e99a4
26 changed files with 1049 additions and 969 deletions
+2 -2
View File
@@ -212,14 +212,14 @@ static Packer* try_packers(InputFile *f, try_function func)
}
#endif
if (opt->o_unix.use_ptinterp) {
if ((p = func(new PackLinuxI386interp(f),f)) != NULL)
if ((p = func(new PackLinuxElf32x86interp(f),f)) != NULL)
return p;
}
if ((p = func(new PackLinuxElf64amd(f),f)) != NULL)
return p;
if ((p = func(new PackLinuxElf32ppc(f),f)) != NULL)
return p;
if ((p = func(new PackLinuxI386elf(f),f)) != NULL)
if ((p = func(new PackLinuxElf32x86(f),f)) != NULL)
return p;
if ((p = func(new PackLinuxI386sh(f),f)) != NULL)
return p;