From c889ba801dc3b3a0155fa77d567f2c3a6097de1c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 16 Apr 2013 16:02:58 -0700 Subject: x86, relocs: Refactor the relocs tool to merge 32- and 64-bit ELF Refactor the relocs tool so that the same tool can handle 32- and 64-bit ELF. Signed-off-by: H. Peter Anvin Cc: Kees Cook Link: http://lkml.kernel.org/r/1365797627-20874-5-git-send-email-keescook@chromium.org --- arch/x86/tools/relocs.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 arch/x86/tools/relocs.h (limited to 'arch/x86/tools/relocs.h') diff --git a/arch/x86/tools/relocs.h b/arch/x86/tools/relocs.h new file mode 100644 index 000000000000..07cdb1eca4fa --- /dev/null +++ b/arch/x86/tools/relocs.h @@ -0,0 +1,36 @@ +#ifndef RELOCS_H +#define RELOCS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define USE_BSD +#include +#include +#include + +void die(char *fmt, ...); + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + +enum symtype { + S_ABS, + S_REL, + S_SEG, + S_LIN, + S_NSYMTYPES +}; + +void process_32(FILE *fp, int use_real_mode, int as_text, + int show_absolute_syms, int show_absolute_relocs); +void process_64(FILE *fp, int use_real_mode, int as_text, + int show_absolute_syms, int show_absolute_relocs); + +#endif /* RELOCS_H */ -- cgit v1.2.1