relocs.h 787 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef RELOCS_H
  2. #define RELOCS_H
  3. #include <stdio.h>
  4. #include <stdarg.h>
  5. #include <stdlib.h>
  6. #include <stdint.h>
  7. #include <inttypes.h>
  8. #include <string.h>
  9. #include <errno.h>
  10. #include <unistd.h>
  11. #include <elf.h>
  12. #include <byteswap.h>
  13. #define USE_BSD
  14. #include <endian.h>
  15. #include <regex.h>
  16. void die(char *fmt, ...);
  17. /*
  18. * Introduced for MIPSr6
  19. */
  20. #ifndef R_MIPS_PC21_S2
  21. #define R_MIPS_PC21_S2 60
  22. #endif
  23. #ifndef R_MIPS_PC26_S2
  24. #define R_MIPS_PC26_S2 61
  25. #endif
  26. #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
  27. enum symtype {
  28. S_ABS,
  29. S_REL,
  30. S_SEG,
  31. S_LIN,
  32. S_NSYMTYPES
  33. };
  34. void process_32(FILE *fp, int as_text, int as_bin,
  35. int show_reloc_info, int keep_relocs);
  36. void process_64(FILE *fp, int as_text, int as_bin,
  37. int show_reloc_info, int keep_relocs);
  38. #endif /* RELOCS_H */