Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / tools / lib / symbol / kallsyms.h
diff --git a/kernel/tools/lib/symbol/kallsyms.h b/kernel/tools/lib/symbol/kallsyms.h
new file mode 100644 (file)
index 0000000..6084f5e
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef __TOOLS_KALLSYMS_H_
+#define __TOOLS_KALLSYMS_H_ 1
+
+#include <elf.h>
+#include <linux/ctype.h>
+#include <linux/types.h>
+
+#ifndef KSYM_NAME_LEN
+#define KSYM_NAME_LEN 256
+#endif
+
+static inline u8 kallsyms2elf_type(char type)
+{
+       if (type == 'W')
+               return STB_WEAK;
+
+       return isupper(type) ? STB_GLOBAL : STB_LOCAL;
+}
+
+int kallsyms__parse(const char *filename, void *arg,
+                   int (*process_symbol)(void *arg, const char *name,
+                                         char type, u64 start));
+
+#endif /* __TOOLS_KALLSYMS_H_ */