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
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils