diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2003-07-18 05:22:58 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-18 05:22:58 -0700 |
| commit | a232e5e1e04ea592595ffef42222791bacbb7cda (patch) | |
| tree | a4d77c5f0c291c4b86089d9b76c24e302cd47e15 /kernel | |
| parent | d3e6935a87da6a2776396fc2887f040cdc22096f (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 'kernel')
| -rw-r--r-- | kernel/extable.c | 2 | ||||
| -rw-r--r-- | kernel/profile.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/kernel/extable.c b/kernel/extable.c index d49099854024..6f1fb8c6b75b 100644 --- a/kernel/extable.c +++ b/kernel/extable.c @@ -17,10 +17,10 @@ */ #include <linux/module.h> #include <asm/uaccess.h> +#include <asm/sections.h> extern const struct exception_table_entry __start___ex_table[]; extern const struct exception_table_entry __stop___ex_table[]; -extern char _stext[], _etext[], _sinittext[], _einittext[]; /* Given an address, look for it in the exception tables. */ const struct exception_table_entry *search_exception_tables(unsigned long addr) diff --git a/kernel/profile.c b/kernel/profile.c index 4f6d22ce33f2..5c02ac0fbbda 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -8,8 +8,7 @@ #include <linux/bootmem.h> #include <linux/notifier.h> #include <linux/mm.h> - -extern char _stext, _etext; +#include <asm/sections.h> unsigned int * prof_buffer; unsigned long prof_len; @@ -36,7 +35,7 @@ void __init profile_init(void) return; /* only text is profiled */ - prof_len = (unsigned long) &_etext - (unsigned long) &_stext; + prof_len = _etext - _stext; prof_len >>= prof_shift; size = prof_len * sizeof(unsigned int) + PAGE_SIZE - 1; |
