kallsyms.h 532 B

1234567891011121314151617181920212223242526
  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_binding(char type)
  10. {
  11. if (type == 'W')
  12. return STB_WEAK;
  13. return isupper(type) ? STB_GLOBAL : STB_LOCAL;
  14. }
  15. u8 kallsyms2elf_type(char type);
  16. int kallsyms__parse(const char *filename, void *arg,
  17. int (*process_symbol)(void *arg, const char *name,
  18. char type, u64 start));
  19. #endif /* __TOOLS_KALLSYMS_H_ */