aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-04-12 13:01:17 -0700
committerJames Bottomley <jejb@raven.il.steeleye.com>2003-04-12 13:01:17 -0700
commit4b4bd81a64ff2826bd964b78753172591df34612 (patch)
treec04aea1ef99bb3040a8af085fabe36a571452ab7 /scripts
parent77a9874a1428dc2c0abd4bf8ed3c892d9d92ba6f (diff)
downloadhistory-4b4bd81a64ff2826bd964b78753172591df34612.tar.gz
[PATCH] Put all functions in kallsyms
From: Rusty Russell <rusty@rustcorp.com.au> Introduce _sinittext and _einittext (cf. _stext and _etext), so kallsyms includes __init functions. TODO: Use huffman name compression and 16-bit offsets (see IDE oopser patch)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kallsyms.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 25ce910dcf757..43c110fe78291 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -21,7 +21,7 @@ struct sym_entry {
static struct sym_entry *table;
static int size, cnt;
-static unsigned long long _stext, _etext;
+static unsigned long long _stext, _etext, _sinittext, _einittext;
static void
usage(void)
@@ -51,10 +51,8 @@ read_symbol(FILE *in, struct sym_entry *s)
static int
symbol_valid(struct sym_entry *s)
{
- if (s->addr < _stext)
- return 0;
-
- if (s->addr > _etext)
+ if ((s->addr < _stext || s->addr > _etext)
+ && (s->addr < _sinittext || s->addr > _einittext))
return 0;
if (strstr(s->sym, "_compiled."))
@@ -85,6 +83,10 @@ read_map(FILE *in)
_stext = table[i].addr;
if (strcmp(table[i].sym, "_etext") == 0)
_etext = table[i].addr;
+ if (strcmp(table[i].sym, "_sinittext") == 0)
+ _sinittext = table[i].addr;
+ if (strcmp(table[i].sym, "_einittext") == 0)
+ _einittext = table[i].addr;
}
}