mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-20 00:57:21 +07:00
c889ba801d
Refactor the relocs tool so that the same tool can handle 32- and 64-bit ELF. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: Kees Cook <keescook@chromium.org> Link: http://lkml.kernel.org/r/1365797627-20874-5-git-send-email-keescook@chromium.org
37 lines
710 B
C
37 lines
710 B
C
#ifndef RELOCS_H
|
|
#define RELOCS_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdarg.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include <inttypes.h>
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include <unistd.h>
|
|
#include <elf.h>
|
|
#include <byteswap.h>
|
|
#define USE_BSD
|
|
#include <endian.h>
|
|
#include <regex.h>
|
|
#include <tools/le_byteshift.h>
|
|
|
|
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 */
|