0001
0002 #ifndef RELOCS_H
0003 #define RELOCS_H
0004
0005 #include <stdio.h>
0006 #include <stdarg.h>
0007 #include <stdlib.h>
0008 #include <stdint.h>
0009 #include <inttypes.h>
0010 #include <string.h>
0011 #include <errno.h>
0012 #include <unistd.h>
0013 #include <elf.h>
0014 #include <byteswap.h>
0015 #define USE_BSD
0016 #include <endian.h>
0017 #include <regex.h>
0018 #include <tools/le_byteshift.h>
0019
0020 __attribute__((__format__(printf, 1, 2)))
0021 void die(char *fmt, ...) __attribute__((noreturn));
0022
0023 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
0024
0025 enum symtype {
0026 S_ABS,
0027 S_REL,
0028 S_SEG,
0029 S_LIN,
0030 S_NSYMTYPES
0031 };
0032
0033 void process_32(FILE *fp, int use_real_mode, int as_text,
0034 int show_absolute_syms, int show_absolute_relocs,
0035 int show_reloc_info);
0036 void process_64(FILE *fp, int use_real_mode, int as_text,
0037 int show_absolute_syms, int show_absolute_relocs,
0038 int show_reloc_info);
0039 #endif