Skip to content
Snippets Groups Projects
Commit 8bd1796d authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Ingo Molnar
Browse files

x86: relocs ELF handling - use SELFMAG instead of numeric constant


Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Cc: akpm@linux-foundation.org
Cc: hpa@zytor.com
Cc: mingo@elte.hu
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent ecb783ea
No related branches found
No related tags found
No related merge requests found
...@@ -191,7 +191,7 @@ static void read_ehdr(FILE *fp) ...@@ -191,7 +191,7 @@ static void read_ehdr(FILE *fp)
die("Cannot read ELF header: %s\n", die("Cannot read ELF header: %s\n",
strerror(errno)); strerror(errno));
} }
if (memcmp(ehdr.e_ident, ELFMAG, 4) != 0) { if (memcmp(ehdr.e_ident, ELFMAG, SELFMAG) != 0) {
die("No ELF magic\n"); die("No ELF magic\n");
} }
if (ehdr.e_ident[EI_CLASS] != ELFCLASS32) { if (ehdr.e_ident[EI_CLASS] != ELFCLASS32) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment