git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git]
/
arch
/
i386
/
boot
/
compressed
/
relocs.c
diff --git
a/arch/i386/boot/compressed/relocs.c
b/arch/i386/boot/compressed/relocs.c
index
468da89
..
ce4fda2
100644
(file)
--- a/
arch/i386/boot/compressed/relocs.c
+++ b/
arch/i386/boot/compressed/relocs.c
@@
-11,6
+11,7
@@
#include <endian.h>
#define MAX_SHDRS 100
#include <endian.h>
#define MAX_SHDRS 100
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
static Elf32_Ehdr ehdr;
static Elf32_Shdr shdr[MAX_SHDRS];
static Elf32_Sym *symtab[MAX_SHDRS];
static Elf32_Ehdr ehdr;
static Elf32_Shdr shdr[MAX_SHDRS];
static Elf32_Sym *symtab[MAX_SHDRS];
@@
-43,6
+44,8
@@
static int is_safe_abs_reloc(const char* sym_name)
/* Match found */
return 1;
}
/* Match found */
return 1;
}
+ if (strncmp(sym_name, "__crc_", 6) == 0)
+ return 1;
return 0;
}
return 0;
}
@@
-69,7
+72,7
@@
static const char *sym_type(unsigned type)
#undef SYM_TYPE
};
const char *name = "unknown sym type name";
#undef SYM_TYPE
};
const char *name = "unknown sym type name";
- if (type <
sizeof(type_name)/sizeof(type_name[0]
)) {
+ if (type <
ARRAY_SIZE(type_name
)) {
name = type_name[type];
}
return name;
name = type_name[type];
}
return name;
@@
-85,7
+88,7
@@
static const char *sym_bind(unsigned bind)
#undef SYM_BIND
};
const char *name = "unknown sym bind name";
#undef SYM_BIND
};
const char *name = "unknown sym bind name";
- if (bind <
sizeof(bind_name)/sizeof(bind_name[0]
)) {
+ if (bind <
ARRAY_SIZE(bind_name
)) {
name = bind_name[bind];
}
return name;
name = bind_name[bind];
}
return name;
@@
-102,7
+105,7
@@
static const char *sym_visibility(unsigned visibility)
#undef SYM_VISIBILITY
};
const char *name = "unknown sym visibility name";
#undef SYM_VISIBILITY
};
const char *name = "unknown sym visibility name";
- if (visibility <
sizeof(visibility_name)/sizeof(visibility_name[0]
)) {
+ if (visibility <
ARRAY_SIZE(visibility_name
)) {
name = visibility_name[visibility];
}
return name;
name = visibility_name[visibility];
}
return name;
@@
-126,7
+129,7
@@
static const char *rel_type(unsigned type)
#undef REL_TYPE
};
const char *name = "unknown type rel type name";
#undef REL_TYPE
};
const char *name = "unknown type rel type name";
- if (type <
sizeof(type_name)/sizeof(type_name[0]
)) {
+ if (type <
ARRAY_SIZE(type_name
)) {
name = type_name[type];
}
return name;
name = type_name[type];
}
return name;