]> git.baikalelectronics.ru Git - kernel.git/commit
perf symbols: Fix annotation of thumb code
authorDr. David Alan Gilbert <david.gilbert@linaro.org>
Fri, 21 Jan 2011 16:40:19 +0000 (16:40 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 21 Jan 2011 18:32:18 +0000 (16:32 -0200)
commit4e56413f547bc59d9e1a6cbeda4edc454d2552f1
tree99a517cf2c980b4f75568e65b4750c9f7db1f2a6
parent78f2f58eeddf7dbd3cebf59564862a9016f834fc
perf symbols: Fix annotation of thumb code

In ARM's Thumb mode the bottom bit of the symbol address is set to mark
the function as Thumb; the instructions are in reality 2 or 4 byte on 2
byte alignments, and when the +1 address is used in annotate it causes
objdump to disassemble invalid instructions.

The patch removes that bottom bit during symbol loading.

Many thinks to Dave Martin for comments on an initial version of the
patch.

(For reference this corresponds to this bug
https://bugs.launchpad.net/linux-linaro/+bug/677547 )

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Dave Martin <dave.martin@linaro.org>
LKML-Reference: <20110121163922.GA31398@davesworkthinkpad>
Signed-off-by: Dr. David Alan Gilbert <david.gilbert@linaro.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol.c