diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/bug.h | 16 | ||||
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 8 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index c92ae0f166ff..47e3561638b1 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -4,6 +4,22 @@ | |||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | 5 | ||
6 | #ifdef CONFIG_BUG | 6 | #ifdef CONFIG_BUG |
7 | |||
8 | #ifdef CONFIG_GENERIC_BUG | ||
9 | #ifndef __ASSEMBLY__ | ||
10 | struct bug_entry { | ||
11 | unsigned long bug_addr; | ||
12 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
13 | const char *file; | ||
14 | unsigned short line; | ||
15 | #endif | ||
16 | unsigned short flags; | ||
17 | }; | ||
18 | #endif /* __ASSEMBLY__ */ | ||
19 | |||
20 | #define BUGFLAG_WARNING (1<<0) | ||
21 | #endif /* CONFIG_GENERIC_BUG */ | ||
22 | |||
7 | #ifndef HAVE_ARCH_BUG | 23 | #ifndef HAVE_ARCH_BUG |
8 | #define BUG() do { \ | 24 | #define BUG() do { \ |
9 | printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \ | 25 | printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \ |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 4d4c62d11059..6e9fcebbf89f 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -218,6 +218,14 @@ | |||
218 | .stab.indexstr 0 : { *(.stab.indexstr) } \ | 218 | .stab.indexstr 0 : { *(.stab.indexstr) } \ |
219 | .comment 0 : { *(.comment) } | 219 | .comment 0 : { *(.comment) } |
220 | 220 | ||
221 | #define BUG_TABLE \ | ||
222 | . = ALIGN(8); \ | ||
223 | __bug_table : AT(ADDR(__bug_table) - LOAD_OFFSET) { \ | ||
224 | __start___bug_table = .; \ | ||
225 | *(__bug_table) \ | ||
226 | __stop___bug_table = .; \ | ||
227 | } | ||
228 | |||
221 | #define NOTES \ | 229 | #define NOTES \ |
222 | .notes : { *(.note.*) } :note | 230 | .notes : { *(.note.*) } :note |
223 | 231 | ||