Commit 2c22d8ba authored by Vivek Goyal's avatar Vivek Goyal Committed by Andi Kleen

[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: default avatarVivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent ba10650a
...@@ -277,8 +277,12 @@ static void write_src(void) ...@@ -277,8 +277,12 @@ static void write_src(void)
output_label("kallsyms_addresses"); output_label("kallsyms_addresses");
for (i = 0; i < table_cnt; i++) { for (i = 0; i < table_cnt; i++) {
if (toupper(table[i].sym[0]) != 'A') { if (toupper(table[i].sym[0]) != 'A') {
if (_text <= table[i].addr)
printf("\tPTR\t_text + %#llx\n", printf("\tPTR\t_text + %#llx\n",
table[i].addr - _text); table[i].addr - _text);
else
printf("\tPTR\t_text - %#llx\n",
_text - table[i].addr);
} else { } else {
printf("\tPTR\t%#llx\n", table[i].addr); printf("\tPTR\t%#llx\n", table[i].addr);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment