X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fkallsyms.c;h=d3d2e5341051809b01d13b75b352ed3d41f01d5c;hb=ac6babd26ce514e0017ec5809051ea6cdc44c8f6;hp=fe11df83d1fc91b3e6de8a7bdc4a06e25f3d0e2f;hpb=27b030d58c8e72fc7a95187a791bd9406e350f02;p=linux-2.6 diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index fe11df83d1..d3d2e53410 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -67,7 +67,7 @@ struct sym_entry { static struct sym_entry *table; static int size, cnt; -static unsigned long long _stext, _etext, _sinittext, _einittext; +static unsigned long long _stext, _etext, _sinittext, _einittext, _sextratext, _eextratext; static int all_symbols = 0; static char symbol_prefix_char = '\0'; @@ -139,6 +139,10 @@ read_symbol(FILE *in, struct sym_entry *s) _sinittext = s->addr; else if (strcmp(sym, "_einittext") == 0) _einittext = s->addr; + else if (strcmp(sym, "_sextratext") == 0) + _sextratext = s->addr; + else if (strcmp(sym, "_eextratext") == 0) + _eextratext = s->addr; else if (toupper(s->type) == 'A') { /* Keep these useful absolute symbols */ @@ -194,16 +198,18 @@ symbol_valid(struct sym_entry *s) * and inittext sections are discarded */ if (!all_symbols) { if ((s->addr < _stext || s->addr > _etext) - && (s->addr < _sinittext || s->addr > _einittext)) + && (s->addr < _sinittext || s->addr > _einittext) + && (s->addr < _sextratext || s->addr > _eextratext)) return 0; /* Corner case. Discard any symbols with the same value as - * _etext or _einittext, they can move between pass 1 and 2 - * when the kallsyms data is added. If these symbols move then - * they may get dropped in pass 2, which breaks the kallsyms - * rules. + * _etext _einittext or _eextratext; they can move between pass + * 1 and 2 when the kallsyms data are added. If these symbols + * move then they may get dropped in pass 2, which breaks the + * kallsyms rules. */ if ((s->addr == _etext && strcmp(s->sym + offset, "_etext")) || - (s->addr == _einittext && strcmp(s->sym + offset, "_einittext"))) + (s->addr == _einittext && strcmp(s->sym + offset, "_einittext")) || + (s->addr == _eextratext && strcmp(s->sym + offset, "_eextratext"))) return 0; }