UBI: Unsorted Block Images
[safe/jmp/linux-2.6] / include / linux / kallsyms.h
index ad71ac0..1cebcbc 100644 (file)
 /* Lookup the address for a symbol. Returns 0 if not found. */
 unsigned long kallsyms_lookup_name(const char *name);
 
+extern int kallsyms_lookup_size_offset(unsigned long addr,
+                                 unsigned long *symbolsize,
+                                 unsigned long *offset);
+
 /* Lookup an address.  modname is set to NULL if it's in the kernel. */
 const char *kallsyms_lookup(unsigned long addr,
                            unsigned long *symbolsize,
@@ -28,6 +32,13 @@ static inline unsigned long kallsyms_lookup_name(const char *name)
        return 0;
 }
 
+static inline int kallsyms_lookup_size_offset(unsigned long addr,
+                                             unsigned long *symbolsize,
+                                             unsigned long *offset)
+{
+       return 0;
+}
+
 static inline const char *kallsyms_lookup(unsigned long addr,
                                          unsigned long *symbolsize,
                                          unsigned long *offset,
@@ -64,4 +75,18 @@ static inline void print_symbol(const char *fmt, unsigned long addr)
                       __builtin_extract_return_addr((void *)addr));
 }
 
+#ifndef CONFIG_64BIT
+#define print_ip_sym(ip)               \
+do {                                   \
+       printk("[<%08lx>]", ip);        \
+       print_symbol(" %s\n", ip);      \
+} while(0)
+#else
+#define print_ip_sym(ip)               \
+do {                                   \
+       printk("[<%016lx>]", ip);       \
+       print_symbol(" %s\n", ip);      \
+} while(0)
+#endif
+
 #endif /*_LINUX_KALLSYMS_H*/