aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMike Frysinger <michael.frysinger@analog.com>2007-05-21 06:09:19 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-21 12:50:22 -0400
commit8a0e6656030ffe9bcb81b725e956917bafc7522d (patch)
tree3e1936b4ddffce43b29d7f44a1dca67e84b58068 /arch/blackfin
parent678402709602a5e62bb79454f0f41bd952373300 (diff)
Blackfin arch: fix trace output for FLAT binaries
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/traps.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c
index 9556b73de808..9932edee8cb4 100644
--- a/arch/blackfin/kernel/traps.c
+++ b/arch/blackfin/kernel/traps.c
@@ -59,9 +59,10 @@ static int printk_address(unsigned long address)
59 struct vm_list_struct *vml; 59 struct vm_list_struct *vml;
60 struct task_struct *p; 60 struct task_struct *p;
61 struct mm_struct *mm; 61 struct mm_struct *mm;
62 unsigned long offset;
62 63
63#ifdef CONFIG_KALLSYMS 64#ifdef CONFIG_KALLSYMS
64 unsigned long offset = 0, symsize; 65 unsigned long symsize;
65 const char *symname; 66 const char *symname;
66 char *modname; 67 char *modname;
67 char *delim = ":"; 68 char *delim = ":";
@@ -106,12 +107,19 @@ static int printk_address(unsigned long address)
106 sizeof(_tmpbuf)); 107 sizeof(_tmpbuf));
107 } 108 }
108 109
110 /* FLAT does not have its text aligned to the start of
111 * the map while FDPIC ELF does ...
112 */
113 if (current->mm &&
114 (address > current->mm->start_code) &&
115 (address < current->mm->end_code))
116 offset = address - current->mm->start_code;
117 else
118 offset = (address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT);
119
109 write_unlock_irq(&tasklist_lock); 120 write_unlock_irq(&tasklist_lock);
110 return printk("<0x%p> [ %s + 0x%lx ]", 121 return printk("<0x%p> [ %s + 0x%lx ]",
111 (void*)address, name, 122 (void*)address, name, offset);
112 (unsigned long)
113 ((address - vma->vm_start) +
114 (vma->vm_pgoff << PAGE_SHIFT)));
115 } 123 }
116 124
117 vml = vml->next; 125 vml = vml->next;