diff options
author | David Howells <dhowells@redhat.com> | 2007-07-20 12:02:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-20 15:01:34 -0400 |
commit | 0b1937ac0ef1541c0ea44e6f81c33d2f59803957 (patch) | |
tree | edf587df9329cd84659f772aadaabec1dd0a426e | |
parent | 03ce11048b3832f5f0c471ccdb3363a870a14ac1 (diff) |
FRV: Fix linkage problems
Make it possible to use __start_notes and __stop_notes without getting a GPREL
overflow error from the FRV linker.
Small variables that would otherwise be in .data or .bss may, depending on the
arch, be placed in special sections (.sdata or .sbss) that permit single
instruction references on fixed instruction width machines.
__start_notes and __stop_notes aren't really char variables, and certainly
don't refer to data in .data or .bss. Making them type "void" fools the
compiler into not assuming anything about them.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/ksysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c index 2565e1b6dd7b..d0e5c48e18c7 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c | |||
@@ -65,8 +65,8 @@ KERNEL_ATTR_RO(kexec_crash_loaded); | |||
65 | /* | 65 | /* |
66 | * Make /sys/kernel/notes give the raw contents of our kernel .notes section. | 66 | * Make /sys/kernel/notes give the raw contents of our kernel .notes section. |
67 | */ | 67 | */ |
68 | extern const char __start_notes __attribute__((weak)); | 68 | extern const void __start_notes __attribute__((weak)); |
69 | extern const char __stop_notes __attribute__((weak)); | 69 | extern const void __stop_notes __attribute__((weak)); |
70 | #define notes_size (&__stop_notes - &__start_notes) | 70 | #define notes_size (&__stop_notes - &__start_notes) |
71 | 71 | ||
72 | static ssize_t notes_read(struct kobject *kobj, struct bin_attribute *bin_attr, | 72 | static ssize_t notes_read(struct kobject *kobj, struct bin_attribute *bin_attr, |