From a232e5e1e04ea592595ffef42222791bacbb7cda Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 18 Jul 2003 05:22:58 -0700 Subject: [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). --- include/asm-generic/sections.h | 9 +++++---- include/asm-i386/hw_irq.h | 5 ++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'include') 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 #include #include +#include /* * 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<>= prof_shift; /* * Don't ignore out-of-bounds EIP values silently, -- cgit v1.2.3