summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2003-07-18 05:22:58 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-07-18 05:22:58 -0700
commita232e5e1e04ea592595ffef42222791bacbb7cda (patch)
treea4d77c5f0c291c4b86089d9b76c24e302cd47e15 /include
parentd3e6935a87da6a2776396fc2887f040cdc22096f (diff)
[PATCH] Centralize Linker Symbols
Richard Henderson point out a while back that linker generated symbols should be declared as: "char _text[]" so that the compiler can't make assumptions about them sitting in small sections, etc. Centralize these defintions in asm/sections.h (where some already are on x86).
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/sections.h9
-rw-r--r--include/asm-i386/hw_irq.h5
2 files changed, 7 insertions, 7 deletions
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index fe290e3349be..ce400f39ba25 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -3,9 +3,10 @@
/* References to section boundaries */
-extern char _text, _etext;
-extern char _data, _edata;
-extern char __bss_start;
-extern char __init_begin, __init_end;
+extern char _text[], _stext[], _etext[];
+extern char _data[], _sdata[], _edata[];
+extern char __bss_start[];
+extern char __init_begin[], __init_end[];
+extern char _sinittext[], _einittext[];
#endif /* _ASM_GENERIC_SECTIONS_H_ */
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h
index 30e4cfa8395b..eaee6b7cd24f 100644
--- a/include/asm-i386/hw_irq.h
+++ b/include/asm-i386/hw_irq.h
@@ -16,6 +16,7 @@
#include <linux/profile.h>
#include <asm/atomic.h>
#include <asm/irq.h>
+#include <asm/sections.h>
/*
* Various low-level irq details needed by irq.c, process.c,
@@ -63,8 +64,6 @@ extern unsigned long io_apic_irqs;
extern atomic_t irq_err_count;
extern atomic_t irq_mis_count;
-extern char _stext, _etext;
-
#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs))
/*
@@ -95,7 +94,7 @@ static inline void x86_do_profile(struct pt_regs * regs)
if (!((1<<smp_processor_id()) & prof_cpu_mask))
return;
- eip -= (unsigned long) &_stext;
+ eip -= (unsigned long)_stext;
eip >>= prof_shift;
/*
* Don't ignore out-of-bounds EIP values silently,