|
From: | Nick Clifton |
Subject: | Re: bug in addr2line with -j option |
Date: | Tue, 22 Dec 2015 15:03:58 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
Hi Amir,
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
This is not a bug, it is a feature. When the -j option is used to restrict the searches to a named section, it also changes the meaning of the numeric arguments given to addr2line. Without -j those arguments are absolute addresses. With -j those arguments are offsets from the start of the section. Hence if you try:
add2line -e helloworld -j .text 0x456 You will probably get the result you were expecting. Cheers Nick
[Prev in Thread] | Current Thread | [Next in Thread] |