Bug 18487

Summary: ARM "special symbols" reported in preference to more useful ones
Product: binutils Reporter: Ben Avison <bavisonpmbz>
Component: binutilsAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED WONTFIX    
Severity: normal CC: compnerd, nickc
Priority: P2    
Version: 2.24   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Ben Avison 2015-06-04 14:21:37 UTC
addr2line has changed its behaviour so that it reports "special symbols" where they are colocated with normal ones. By "special symbols" I mean $a, $t, $d which are inserted into ARM objects wherever there is a boundary between ARM-state and Thumb-state code and data. Typically there are many of these in any given object file.

The one that tripped me up can be illustrated as follows. In addr2line 2.22:

$ objdump -d ./test | grep _fini | tail -n1 | cut -d" " -f1 | xargs addr2line -fe ./test | head -n1
_fini

And with the same ./test binary but addr2line 2.24:

$ objdump -d ./test | grep _fini | tail -n1 | cut -d" " -f1 | xargs addr2line -fe ./test | head -n1
$a

I can't find any evidence that this was a deliberate change, though if it was it would be useful to have a switch to restore the previous behaviour. As it stands, it has completely broken gperftools profiling.

If anyone knows any good workarounds (e.g. how to strip the special symbols out of the object file) I'd love to hear, thanks.
Comment 1 Nick Clifton 2015-06-16 13:16:47 UTC
Hi Ben,

  This problem has been fixed in the 2.25 binutils release.

Cheers
  Nick