diff options
author | Gideon Israel Dsouza <gidisrael@gmail.com> | 2014-04-07 18:39:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:36:11 -0400 |
commit | 52f5684c8e1ec7463192aba8e2916df49807511a (patch) | |
tree | f8e6061de05014e89e58638f626831f2c38af971 /kernel/kallsyms.c | |
parent | ce816fa88cca083c47ab9000b2138a83043a78be (diff) |
kernel: use macros from compiler.h instead of __attribute__((...))
To increase compiler portability there is <linux/compiler.h> which
provides convenience macros for various gcc constructs. Eg: __weak for
__attribute__((weak)). I've replaced all instances of gcc attributes
with the right macro in the kernel subsystem.
Signed-off-by: Gideon Israel Dsouza <gidisrael@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kallsyms.c')
-rw-r--r-- | kernel/kallsyms.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index 3127ad52cdb2..cb0cf37dac3a 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
24 | #include <linux/ctype.h> | 24 | #include <linux/ctype.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/compiler.h> | ||
26 | 27 | ||
27 | #include <asm/sections.h> | 28 | #include <asm/sections.h> |
28 | 29 | ||
@@ -36,8 +37,8 @@ | |||
36 | * These will be re-linked against their real values | 37 | * These will be re-linked against their real values |
37 | * during the second link stage. | 38 | * during the second link stage. |
38 | */ | 39 | */ |
39 | extern const unsigned long kallsyms_addresses[] __attribute__((weak)); | 40 | extern const unsigned long kallsyms_addresses[] __weak; |
40 | extern const u8 kallsyms_names[] __attribute__((weak)); | 41 | extern const u8 kallsyms_names[] __weak; |
41 | 42 | ||
42 | /* | 43 | /* |
43 | * Tell the compiler that the count isn't in the small data section if the arch | 44 | * Tell the compiler that the count isn't in the small data section if the arch |
@@ -46,10 +47,10 @@ extern const u8 kallsyms_names[] __attribute__((weak)); | |||
46 | extern const unsigned long kallsyms_num_syms | 47 | extern const unsigned long kallsyms_num_syms |
47 | __attribute__((weak, section(".rodata"))); | 48 | __attribute__((weak, section(".rodata"))); |
48 | 49 | ||
49 | extern const u8 kallsyms_token_table[] __attribute__((weak)); | 50 | extern const u8 kallsyms_token_table[] __weak; |
50 | extern const u16 kallsyms_token_index[] __attribute__((weak)); | 51 | extern const u16 kallsyms_token_index[] __weak; |
51 | 52 | ||
52 | extern const unsigned long kallsyms_markers[] __attribute__((weak)); | 53 | extern const unsigned long kallsyms_markers[] __weak; |
53 | 54 | ||
54 | static inline int is_kernel_inittext(unsigned long addr) | 55 | static inline int is_kernel_inittext(unsigned long addr) |
55 | { | 56 | { |