diff options
Diffstat (limited to 'scripts/kallsyms.c')
-rw-r--r-- | scripts/kallsyms.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 1f11d848532a..8fb87003d5d3 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c | |||
@@ -41,7 +41,7 @@ struct sym_entry { | |||
41 | 41 | ||
42 | static struct sym_entry *table; | 42 | static struct sym_entry *table; |
43 | static unsigned int table_size, table_cnt; | 43 | static unsigned int table_size, table_cnt; |
44 | static unsigned long long _text, _stext, _etext, _sinittext, _einittext, _sextratext, _eextratext; | 44 | static unsigned long long _text, _stext, _etext, _sinittext, _einittext; |
45 | static int all_symbols = 0; | 45 | static int all_symbols = 0; |
46 | static char symbol_prefix_char = '\0'; | 46 | static char symbol_prefix_char = '\0'; |
47 | 47 | ||
@@ -99,10 +99,6 @@ static int read_symbol(FILE *in, struct sym_entry *s) | |||
99 | _sinittext = s->addr; | 99 | _sinittext = s->addr; |
100 | else if (strcmp(sym, "_einittext") == 0) | 100 | else if (strcmp(sym, "_einittext") == 0) |
101 | _einittext = s->addr; | 101 | _einittext = s->addr; |
102 | else if (strcmp(sym, "_sextratext") == 0) | ||
103 | _sextratext = s->addr; | ||
104 | else if (strcmp(sym, "_eextratext") == 0) | ||
105 | _eextratext = s->addr; | ||
106 | else if (toupper(stype) == 'A') | 102 | else if (toupper(stype) == 'A') |
107 | { | 103 | { |
108 | /* Keep these useful absolute symbols */ | 104 | /* Keep these useful absolute symbols */ |
@@ -165,18 +161,18 @@ static int symbol_valid(struct sym_entry *s) | |||
165 | * and inittext sections are discarded */ | 161 | * and inittext sections are discarded */ |
166 | if (!all_symbols) { | 162 | if (!all_symbols) { |
167 | if ((s->addr < _stext || s->addr > _etext) | 163 | if ((s->addr < _stext || s->addr > _etext) |
168 | && (s->addr < _sinittext || s->addr > _einittext) | 164 | && (s->addr < _sinittext || s->addr > _einittext)) |
169 | && (s->addr < _sextratext || s->addr > _eextratext)) | ||
170 | return 0; | 165 | return 0; |
171 | /* Corner case. Discard any symbols with the same value as | 166 | /* Corner case. Discard any symbols with the same value as |
172 | * _etext _einittext or _eextratext; they can move between pass | 167 | * _etext _einittext; they can move between pass 1 and 2 when |
173 | * 1 and 2 when the kallsyms data are added. If these symbols | 168 | * the kallsyms data are added. If these symbols move then |
174 | * move then they may get dropped in pass 2, which breaks the | 169 | * they may get dropped in pass 2, which breaks the kallsyms |
175 | * kallsyms rules. | 170 | * rules. |
176 | */ | 171 | */ |
177 | if ((s->addr == _etext && strcmp((char*)s->sym + offset, "_etext")) || | 172 | if ((s->addr == _etext && |
178 | (s->addr == _einittext && strcmp((char*)s->sym + offset, "_einittext")) || | 173 | strcmp((char *)s->sym + offset, "_etext")) || |
179 | (s->addr == _eextratext && strcmp((char*)s->sym + offset, "_eextratext"))) | 174 | (s->addr == _einittext && |
175 | strcmp((char *)s->sym + offset, "_einittext"))) | ||
180 | return 0; | 176 | return 0; |
181 | } | 177 | } |
182 | 178 | ||