Skip to content

Commit

Permalink
[PATCH] relocatable kernel: Fix kallsyms on avr32 after relocatable k…
Browse files Browse the repository at this point in the history
…ernel 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>
  • Loading branch information
Vivek Goyal authored and Andi Kleen committed Dec 7, 2006
1 parent ba10650 commit 2c22d8b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/kallsyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,12 @@ static void write_src(void)
output_label("kallsyms_addresses");
for (i = 0; i < table_cnt; i++) {
if (toupper(table[i].sym[0]) != 'A') {
printf("\tPTR\t_text + %#llx\n",
table[i].addr - _text);
if (_text <= table[i].addr)
printf("\tPTR\t_text + %#llx\n",
table[i].addr - _text);
else
printf("\tPTR\t_text - %#llx\n",
_text - table[i].addr);
} else {
printf("\tPTR\t%#llx\n", table[i].addr);
}
Expand Down

0 comments on commit 2c22d8b

Please sign in to comment.