]> err.no Git - linux-2.6/blobdiff - arch/x86/boot/compressed/relocs.c
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer...
[linux-2.6] / arch / x86 / boot / compressed / relocs.c
index 2d77ee728f92188f5ea01b2bc27542857be92a74..edaadea90aafcf9876256bcac9db5d68823874ea 100644 (file)
@@ -27,26 +27,21 @@ static unsigned long *relocs;
  * absolute relocations present w.r.t these symbols.
  */
 static const char* safe_abs_relocs[] = {
-               "__kernel_vsyscall",
-               "__kernel_rt_sigreturn",
-               "__kernel_sigreturn",
-               "SYSENTER_RETURN",
-               "VDSO_NOTE_MASK",
                "xen_irq_disable_direct_reloc",
                "xen_save_fl_direct_reloc",
 };
 
 static int is_safe_abs_reloc(const char* sym_name)
 {
-       int i, array_size;
-
-       array_size = sizeof(safe_abs_relocs)/sizeof(char*);
+       int i;
 
-       for(i = 0; i < array_size; i++) {
+       for(i = 0; i < ARRAY_SIZE(safe_abs_relocs); i++) {
                if (!strcmp(sym_name, safe_abs_relocs[i]))
                        /* Match found */
                        return 1;
        }
+       if (strncmp(sym_name, "VDSO", 4) == 0)
+               return 1;
        if (strncmp(sym_name, "__crc_", 6) == 0)
                return 1;
        return 0;
@@ -196,7 +191,7 @@ static void read_ehdr(FILE *fp)
                die("Cannot read ELF header: %s\n",
                        strerror(errno));
        }
-       if (memcmp(ehdr.e_ident, ELFMAG, 4) != 0) {
+       if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) {
                die("No ELF magic\n");
        }
        if (ehdr.e_ident[EI_CLASS] != ELFCLASS32) {