Skip to content

[Bug? or Feature request?] Fix CFI write with Pointer Authentication #946

@splhack

Description

@splhack

Environment

Steps to Reproduce

  • Compile Android arm64 code with -mbranch-protection=pac-ret
  • dump_syms the-built-ELF > symfile

Expected Result

STACK CFI INIT 1c7c 58 .cfa: sp 0 + .ra: x30
STACK CFI 1c8c .cfa: x29 16 + .ra: .cfa -8 + ^ x29: .cfa -16 + ^

Actual Result

STACK CFI INIT 1c7c 58 .cfa: sp 0 +

Problem

STACK CFI INIT line does not contain .ra and probably because of that, STACK CFI line is not written.

I think https://github.com/gimli-rs/gimli probably parses Dwarf correctly and extracts Pointer Authentication instructions as UnknownCallFrameInstruction(DwCfa(45)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions