H. Peter Anvin | c889ba8 | 2013-04-16 16:02:58 -0700 | [diff] [blame] | 1 | #ifndef RELOCS_H |
| 2 | #define RELOCS_H |
| 3 | |
| 4 | #include <stdio.h> |
| 5 | #include <stdarg.h> |
| 6 | #include <stdlib.h> |
| 7 | #include <stdint.h> |
| 8 | #include <inttypes.h> |
| 9 | #include <string.h> |
| 10 | #include <errno.h> |
| 11 | #include <unistd.h> |
| 12 | #include <elf.h> |
| 13 | #include <byteswap.h> |
| 14 | #define USE_BSD |
| 15 | #include <endian.h> |
| 16 | #include <regex.h> |
| 17 | #include <tools/le_byteshift.h> |
| 18 | |
Peter Foley | adee870 | 2016-11-26 17:22:29 -0500 | [diff] [blame] | 19 | void die(char *fmt, ...) __attribute__((noreturn)); |
H. Peter Anvin | c889ba8 | 2013-04-16 16:02:58 -0700 | [diff] [blame] | 20 | |
| 21 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
| 22 | |
| 23 | enum symtype { |
| 24 | S_ABS, |
| 25 | S_REL, |
| 26 | S_SEG, |
| 27 | S_LIN, |
| 28 | S_NSYMTYPES |
| 29 | }; |
| 30 | |
| 31 | void process_32(FILE *fp, int use_real_mode, int as_text, |
Michael Davidson | 214a887 | 2014-01-21 12:32:23 -0800 | [diff] [blame] | 32 | int show_absolute_syms, int show_absolute_relocs, |
| 33 | int show_reloc_info); |
H. Peter Anvin | c889ba8 | 2013-04-16 16:02:58 -0700 | [diff] [blame] | 34 | void process_64(FILE *fp, int use_real_mode, int as_text, |
Michael Davidson | 214a887 | 2014-01-21 12:32:23 -0800 | [diff] [blame] | 35 | int show_absolute_syms, int show_absolute_relocs, |
| 36 | int show_reloc_info); |
H. Peter Anvin | c889ba8 | 2013-04-16 16:02:58 -0700 | [diff] [blame] | 37 | #endif /* RELOCS_H */ |