* [PATCH] FRV: Fix linkage problems
@ 2007-07-20 16:02 David Howells
2007-07-20 19:55 ` Roland McGrath
0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2007-07-20 16:02 UTC (permalink / raw)
To: torvalds, akpm, roland; +Cc: linux-kernel, dhowells
From: David Howells <dhowells@redhat.com>
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>
---
kernel/ksysfs.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index 2565e1b..d0e5c48 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -65,8 +65,8 @@ KERNEL_ATTR_RO(kexec_crash_loaded);
/*
* Make /sys/kernel/notes give the raw contents of our kernel .notes section.
*/
-extern const char __start_notes __attribute__((weak));
-extern const char __stop_notes __attribute__((weak));
+extern const void __start_notes __attribute__((weak));
+extern const void __stop_notes __attribute__((weak));
#define notes_size (&__stop_notes - &__start_notes)
static ssize_t notes_read(struct kobject *kobj, struct bin_attribute *bin_attr,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-20 19:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-20 16:02 [PATCH] FRV: Fix linkage problems David Howells
2007-07-20 19:55 ` Roland McGrath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®