1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef RELOCS_H 3*4882a593Smuzhiyun #define RELOCS_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #include <stdio.h> 6*4882a593Smuzhiyun #include <stdarg.h> 7*4882a593Smuzhiyun #include <stdlib.h> 8*4882a593Smuzhiyun #include <stdint.h> 9*4882a593Smuzhiyun #include <inttypes.h> 10*4882a593Smuzhiyun #include <string.h> 11*4882a593Smuzhiyun #include <errno.h> 12*4882a593Smuzhiyun #include <unistd.h> 13*4882a593Smuzhiyun #include <elf.h> 14*4882a593Smuzhiyun #include <byteswap.h> 15*4882a593Smuzhiyun #define USE_BSD 16*4882a593Smuzhiyun #include <endian.h> 17*4882a593Smuzhiyun #include <regex.h> 18*4882a593Smuzhiyun #include <tools/le_byteshift.h> 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun void die(char *fmt, ...) __attribute__((noreturn)); 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun enum symtype { 25*4882a593Smuzhiyun S_ABS, 26*4882a593Smuzhiyun S_REL, 27*4882a593Smuzhiyun S_SEG, 28*4882a593Smuzhiyun S_LIN, 29*4882a593Smuzhiyun S_NSYMTYPES 30*4882a593Smuzhiyun }; 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun void process_32(FILE *fp, int use_real_mode, int as_text, 33*4882a593Smuzhiyun int show_absolute_syms, int show_absolute_relocs, 34*4882a593Smuzhiyun int show_reloc_info); 35*4882a593Smuzhiyun void process_64(FILE *fp, int use_real_mode, int as_text, 36*4882a593Smuzhiyun int show_absolute_syms, int show_absolute_relocs, 37*4882a593Smuzhiyun int show_reloc_info); 38*4882a593Smuzhiyun #endif /* RELOCS_H */ 39