From 6e5f5732b50af824cad2c4d0d55bae10f7674420 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Wed, 31 Jan 2007 05:58:17 +0100 Subject: [PATCH] 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. --- src/stub/i386-linux.elf-fold.h | 6 +++--- src/stub/i386-linux.elf.execve-fold.h | 6 +++--- src/stub/i386-linux.elf.interp-fold.h | 6 +++--- src/stub/i386-linux.elf.shell-fold.h | 6 +++--- src/stub/scripts/brandelf.py | 9 ++++++--- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/stub/i386-linux.elf-fold.h b/src/stub/i386-linux.elf-fold.h index 64bc871c..bfa12947 100644 --- a/src/stub/i386-linux.elf-fold.h +++ b/src/stub/i386-linux.elf-fold.h @@ -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 */ diff --git a/src/stub/i386-linux.elf.execve-fold.h b/src/stub/i386-linux.elf.execve-fold.h index e55b1ff8..3b9b6935 100644 --- a/src/stub/i386-linux.elf.execve-fold.h +++ b/src/stub/i386-linux.elf.execve-fold.h @@ -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 */ diff --git a/src/stub/i386-linux.elf.interp-fold.h b/src/stub/i386-linux.elf.interp-fold.h index 04ccfb60..0970937b 100644 --- a/src/stub/i386-linux.elf.interp-fold.h +++ b/src/stub/i386-linux.elf.interp-fold.h @@ -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 */ diff --git a/src/stub/i386-linux.elf.shell-fold.h b/src/stub/i386-linux.elf.shell-fold.h index 4d3b1ba3..d1fbfad9 100644 --- a/src/stub/i386-linux.elf.shell-fold.h +++ b/src/stub/i386-linux.elf.shell-fold.h @@ -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 */ diff --git a/src/stub/scripts/brandelf.py b/src/stub/scripts/brandelf.py index eacc8c1f..c9beb4f9 100644 --- a/src/stub/scripts/brandelf.py +++ b/src/stub/scripts/brandelf.py @@ -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: