relocs.h 862 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef RELOCS_H
  3. #define RELOCS_H
  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. __attribute__((__format__(printf, 1, 2)))
  19. void die(char *fmt, ...) __attribute__((noreturn));
  20. #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
  21. enum symtype {
  22. S_ABS,
  23. S_REL,
  24. S_SEG,
  25. S_LIN,
  26. S_NSYMTYPES
  27. };
  28. void process_32(FILE *fp, int use_real_mode, int as_text,
  29. int show_absolute_syms, int show_absolute_relocs,
  30. int show_reloc_info);
  31. void process_64(FILE *fp, int use_real_mode, int as_text,
  32. int show_absolute_syms, int show_absolute_relocs,
  33. int show_reloc_info);
  34. #endif /* RELOCS_H */