Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
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 
0019 void die(char *fmt, ...);
0020 
0021 /*
0022  * Introduced for MIPSr6
0023  */
0024 #ifndef R_MIPS_PC21_S2
0025 #define R_MIPS_PC21_S2      60
0026 #endif
0027 
0028 #ifndef R_MIPS_PC26_S2
0029 #define R_MIPS_PC26_S2      61
0030 #endif
0031 
0032 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
0033 
0034 enum symtype {
0035     S_ABS,
0036     S_REL,
0037     S_SEG,
0038     S_LIN,
0039     S_NSYMTYPES
0040 };
0041 
0042 void process_32(FILE *fp, int as_text, int as_bin,
0043         int show_reloc_info, int keep_relocs);
0044 void process_64(FILE *fp, int as_text, int as_bin,
0045         int show_reloc_info, int keep_relocs);
0046 #endif /* RELOCS_H */