summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@in.ibm.com>2006-12-07 02:14:10 +0100
committerAndi Kleen <andi@basil.nowhere.org>2006-12-07 02:14:10 +0100
commit2c22d8baa98a92022acb85b0b7c6f4a60df55f47 (patch)
treef37268c7540ad822166e398a6ac6a2e09c2f43fb /scripts
parentba10650a880c2df23bd1db6c0570ddb66f389641 (diff)
downloadlinux-3.10-2c22d8baa98a92022acb85b0b7c6f4a60df55f47.tar.gz
linux-3.10-2c22d8baa98a92022acb85b0b7c6f4a60df55f47.tar.bz2
linux-3.10-2c22d8baa98a92022acb85b0b7c6f4a60df55f47.zip
[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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kallsyms.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 4c1ad0acbb4..f359b730c2c 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -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);
}