bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug in addr2line with -j option


From: Amir Haroush
Subject: bug in addr2line with -j option
Date: Thu, 17 Dec 2015 17:37:42 +0200

Hi

I just found some small issue where addr2line finds the symbols if it searches all sections but when call with '-j .text' (i.e. a single section where the symbol in there) it doesn't finds it.

addr2linw without -j
addr2line -e helloworld 0x123456
helloworld.c:51

addr2line with -j
addr2line -e helloworld -j .text 0x123456
??:0

in addr2line.c
I noticed a difference the the callback that handles all sections:
1) find_address_in_section()
between the function that handle a single section:
2) find_offset_in_section().

so I just copy the missing code from (1) to (2) and all works just fine.

attached patch.diff and config.status.

addr2line version:
GNU addr2line (GNU Binutils) 2.25.1
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

Hope this will help.

Thanks
Amir Haroush

Attachment: patch.diff
Description: Text document

Attachment: config.status
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]