mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
brandelf.py: do not write "Linux" any longer as newer ldd's (e.g.
from glibc-common-2.5-10.fc6) do not like this.
This commit is contained in:
parent
87844254d1
commit
6e5f5732b5
|
|
@ -29,11 +29,11 @@
|
|||
|
||||
|
||||
#define STUB_I386_LINUX_ELF_FOLD_SIZE 1691
|
||||
#define STUB_I386_LINUX_ELF_FOLD_ADLER32 0xe27fd53e
|
||||
#define STUB_I386_LINUX_ELF_FOLD_CRC32 0x75829ac3
|
||||
#define STUB_I386_LINUX_ELF_FOLD_ADLER32 0x5710d32e
|
||||
#define STUB_I386_LINUX_ELF_FOLD_CRC32 0xcf21929e
|
||||
|
||||
unsigned char stub_i386_linux_elf_fold[1691] = {
|
||||
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
|
||||
127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
|
||||
2, 0, 3, 0, 1, 0, 0, 0,128, 16,192, 0, 52, 0, 0, 0, /* 0x 10 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x 20 */
|
||||
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16,192, 0, /* 0x 30 */
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@
|
|||
|
||||
|
||||
#define STUB_I386_LINUX_ELF_EXECVE_FOLD_SIZE 931
|
||||
#define STUB_I386_LINUX_ELF_EXECVE_FOLD_ADLER32 0x488877dc
|
||||
#define STUB_I386_LINUX_ELF_EXECVE_FOLD_CRC32 0x399780ea
|
||||
#define STUB_I386_LINUX_ELF_EXECVE_FOLD_ADLER32 0xdce475cc
|
||||
#define STUB_I386_LINUX_ELF_EXECVE_FOLD_CRC32 0x512b1d3a
|
||||
|
||||
unsigned char stub_i386_linux_elf_execve_fold[931] = {
|
||||
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
|
||||
127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
|
||||
2, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, /* 0x 10 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x 20 */
|
||||
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 16, 64, 0, /* 0x 30 */
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@
|
|||
|
||||
|
||||
#define STUB_I386_LINUX_ELF_INTERP_FOLD_SIZE 1519
|
||||
#define STUB_I386_LINUX_ELF_INTERP_FOLD_ADLER32 0xe82498de
|
||||
#define STUB_I386_LINUX_ELF_INTERP_FOLD_CRC32 0xd7e223de
|
||||
#define STUB_I386_LINUX_ELF_INTERP_FOLD_ADLER32 0xbf8496ce
|
||||
#define STUB_I386_LINUX_ELF_INTERP_FOLD_CRC32 0xe6675cdc
|
||||
|
||||
unsigned char stub_i386_linux_elf_interp_fold[1519] = {
|
||||
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
|
||||
127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
|
||||
2, 0, 3, 0, 1, 0, 0, 0,116, 0, 1, 0, 52, 0, 0, 0, /* 0x 10 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x 20 */
|
||||
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, /* 0x 30 */
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@
|
|||
|
||||
|
||||
#define STUB_I386_LINUX_ELF_SHELL_FOLD_SIZE 1194
|
||||
#define STUB_I386_LINUX_ELF_SHELL_FOLD_ADLER32 0x63b3f90a
|
||||
#define STUB_I386_LINUX_ELF_SHELL_FOLD_CRC32 0xe2bc019d
|
||||
#define STUB_I386_LINUX_ELF_SHELL_FOLD_ADLER32 0xd981f6fa
|
||||
#define STUB_I386_LINUX_ELF_SHELL_FOLD_CRC32 0x5d287cd0
|
||||
|
||||
unsigned char stub_i386_linux_elf_shell_fold[1194] = {
|
||||
127, 69, 76, 70, 1, 1, 1, 0, 76,105,110,117,120, 0, 0, 0, /* 0x 0 */
|
||||
127, 69, 76, 70, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 0 */
|
||||
2, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, /* 0x 10 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 32, 0, 2, 0, 0, 0, /* 0x 20 */
|
||||
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 1, /* 0x 30 */
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ def do_file(fn):
|
|||
elif opts.bfdname == "elf32-i386" and opts.elfosabi == "linux":
|
||||
if e_ident[4:7] != "\x01\x01\x01":
|
||||
raise Exception, "%s is not %s" % (fn, opts.bfdname)
|
||||
write("\x00Linux\x00\x00\x00")
|
||||
##write("\x00Linux\x00\x00\x00")
|
||||
write("\x00" * 9)
|
||||
elif opts.bfdname == "elf32-i386" and opts.elfosabi == "openbsd":
|
||||
if e_ident[4:7] != "\x01\x01\x01":
|
||||
raise Exception, "%s is not %s" % (fn, opts.bfdname)
|
||||
|
|
@ -75,11 +76,13 @@ def do_file(fn):
|
|||
elif opts.bfdname == "elf32-powerpc" and opts.elfosabi == "linux":
|
||||
if e_ident[4:7] != "\x01\x02\x01":
|
||||
raise Exception, "%s is not %s" % (fn, opts.bfdname)
|
||||
write("\x00Linux\x00\x00\x00")
|
||||
##write("\x00Linux\x00\x00\x00")
|
||||
write("\x00" * 9)
|
||||
elif opts.bfdname == "elf64-x86_64" and opts.elfosabi == "linux":
|
||||
if e_ident[4:7] != "\x02\x01\x01":
|
||||
raise Exception, "%s is not %s" % (fn, opts.bfdname)
|
||||
write("\x00Linux\x00\x00\x00")
|
||||
##write("\x00Linux\x00\x00\x00")
|
||||
write("\x00" * 9)
|
||||
else:
|
||||
done = 0
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user