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