Commit 2c22d8baa98a92022acb85b0b7c6f4a60df55f47
Committed by
Andi Kleen
1 parent
ba10650a88
Exists in
master
and in
7 other branches
[PATCH] relocatable kernel: Fix kallsyms on avr32 after relocatable kernel changes
o On some platforms like avr32, section init comes before .text and not necessarily a symbol's relative position w.r.t _text is positive. In such cases assembler detects the overflow and emits warning. This patch fixes it. Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Andi Kleen <ak@suse.de> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff
scripts/kallsyms.c
... | ... | @@ -277,8 +277,12 @@ |
277 | 277 | output_label("kallsyms_addresses"); |
278 | 278 | for (i = 0; i < table_cnt; i++) { |
279 | 279 | if (toupper(table[i].sym[0]) != 'A') { |
280 | - printf("\tPTR\t_text + %#llx\n", | |
281 | - table[i].addr - _text); | |
280 | + if (_text <= table[i].addr) | |
281 | + printf("\tPTR\t_text + %#llx\n", | |
282 | + table[i].addr - _text); | |
283 | + else | |
284 | + printf("\tPTR\t_text - %#llx\n", | |
285 | + _text - table[i].addr); | |
282 | 286 | } else { |
283 | 287 | printf("\tPTR\t%#llx\n", table[i].addr); |
284 | 288 | } |