Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

FRV: fix the extern declaration of kallsyms_num_syms

Fix the extern declaration of kallsyms_num_syms to indicate that the symbol
does not reside in the small-data storage space, and so may not be accessed
relative to the small data base register.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

David Howells and committed by
Linus Torvalds
9e6c1e63 8853c202

+6 -1
+6 -1
kernel/kallsyms.c
··· 32 32 33 33 /* These will be re-linked against their real values during the second link stage */ 34 34 extern const unsigned long kallsyms_addresses[] __attribute__((weak)); 35 - extern const unsigned long kallsyms_num_syms __attribute__((weak)); 36 35 extern const u8 kallsyms_names[] __attribute__((weak)); 36 + 37 + /* tell the compiler that the count isn't in the small data section if the arch 38 + * has one (eg: FRV) 39 + */ 40 + extern const unsigned long kallsyms_num_syms 41 + __attribute__((weak, section(".rodata"))); 37 42 38 43 extern const u8 kallsyms_token_table[] __attribute__((weak)); 39 44 extern const u16 kallsyms_token_index[] __attribute__((weak));