kallsyms.h 495 B

123456789101112131415161718192021222324
  1. #ifndef __TOOLS_KALLSYMS_H_
  2. #define __TOOLS_KALLSYMS_H_ 1
  3. #include <elf.h>
  4. #include <linux/ctype.h>
  5. #include <linux/types.h>
  6. #ifndef KSYM_NAME_LEN
  7. #define KSYM_NAME_LEN 256
  8. #endif
  9. static inline u8 kallsyms2elf_type(char type)
  10. {
  11. if (type == 'W')
  12. return STB_WEAK;
  13. return isupper(type) ? STB_GLOBAL : STB_LOCAL;
  14. }
  15. int kallsyms__parse(const char *filename, void *arg,
  16. int (*process_symbol)(void *arg, const char *name,
  17. char type, u64 start));
  18. #endif /* __TOOLS_KALLSYMS_H_ */