Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8a0e6656030ffe9bcb81b725e956917bafc7522d Commit: 8a0e6656030ffe9bcb81b725e956917bafc7522d Parent: 678402709602a5e62bb79454f0f41bd952373300 Author: Mike Frysinger <[EMAIL PROTECTED]> AuthorDate: Mon May 21 18:09:19 2007 +0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon May 21 09:50:22 2007 -0700
Blackfin arch: fix trace output for FLAT binaries Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]> Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- arch/blackfin/kernel/traps.c | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 9556b73..9932ede 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c @@ -59,9 +59,10 @@ static int printk_address(unsigned long address) struct vm_list_struct *vml; struct task_struct *p; struct mm_struct *mm; + unsigned long offset; #ifdef CONFIG_KALLSYMS - unsigned long offset = 0, symsize; + unsigned long symsize; const char *symname; char *modname; char *delim = ":"; @@ -106,12 +107,19 @@ static int printk_address(unsigned long address) 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); return printk("<0x%p> [ %s + 0x%lx ]", - (void*)address, name, - (unsigned long) - ((address - vma->vm_start) + - (vma->vm_pgoff << PAGE_SHIFT))); + (void*)address, name, offset); } vml = vml->next; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html