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>
This commit is contained in:
parent
6784027096
commit
8a0e665603
1 changed files with 13 additions and 5 deletions
|
@ -59,9 +59,10 @@ static int printk_address(unsigned long address)
|
||||||
struct vm_list_struct *vml;
|
struct vm_list_struct *vml;
|
||||||
struct task_struct *p;
|
struct task_struct *p;
|
||||||
struct mm_struct *mm;
|
struct mm_struct *mm;
|
||||||
|
unsigned long offset;
|
||||||
|
|
||||||
#ifdef CONFIG_KALLSYMS
|
#ifdef CONFIG_KALLSYMS
|
||||||
unsigned long offset = 0, symsize;
|
unsigned long symsize;
|
||||||
const char *symname;
|
const char *symname;
|
||||||
char *modname;
|
char *modname;
|
||||||
char *delim = ":";
|
char *delim = ":";
|
||||||
|
@ -106,12 +107,19 @@ static int printk_address(unsigned long address)
|
||||||
sizeof(_tmpbuf));
|
sizeof(_tmpbuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FLAT does not have its text aligned to the start of
|
||||||
|
* the map while FDPIC ELF does ...
|
||||||
|
*/
|
||||||
|
if (current->mm &&
|
||||||
|
(address > current->mm->start_code) &&
|
||||||
|
(address < current->mm->end_code))
|
||||||
|
offset = address - current->mm->start_code;
|
||||||
|
else
|
||||||
|
offset = (address - vma->vm_start) + (vma->vm_pgoff << PAGE_SHIFT);
|
||||||
|
|
||||||
write_unlock_irq(&tasklist_lock);
|
write_unlock_irq(&tasklist_lock);
|
||||||
return printk("<0x%p> [ %s + 0x%lx ]",
|
return printk("<0x%p> [ %s + 0x%lx ]",
|
||||||
(void*)address, name,
|
(void*)address, name, offset);
|
||||||
(unsigned long)
|
|
||||||
((address - vma->vm_start) +
|
|
||||||
(vma->vm_pgoff << PAGE_SHIFT)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vml = vml->next;
|
vml = vml->next;
|
||||||
|
|
Loading…
Add table
Reference in a new issue