HomeFreeBSD

libpmcstat: Fix a few ARM-specific issues with function symbols.

Description

libpmcstat: Fix a few ARM-specific issues with function symbols.

  • Refine the checks for ARM mapping symbols and apply them on arm64 as well as 32-bit arm. In particular, mapping symbols can have additional characters and are not strictly limited to just "$a" but can append additional characters (e.g. "$a.1"). Add "$x" to the list of mapping symbol prefixes.
  • Clear the LSB of function symbol addresses. Thumb function addresses set the LSB to enable Thumb mode. However, the actual function starts at the aligned address with LSB clear. Not clearing the LSB can cause pmcannotate to pass misaligned addresses to objdump when extracting disassembly.

Reviewed by: andrew
Obtained from: CheriBSD
Sponsored by: University of Cambridge, Google, Inc.
Differential Revision: https://reviews.freebsd.org/D34416

Details

Provenance
jhbAuthored on Mar 10 2022, 11:39 PM
Reviewer
andrew
Differential Revision
D34416: libpmcstat: Fix a few ARM-specific issues with function symbols.
Parents
rG904a13759cf6: ddb: Add 'show gic <name>' and 'show all gics' commands.
Branches
Unknown
Tags
Unknown