Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sysvabi64] Document requirements for tools wrt BTI #282

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Sep 17, 2024

  1. [sysvabi64] Document requirements for tools wrt BTI

    Add requirements for when a tool must generate a BTI instruction.
    This permits tools to elide BTI instructions when they can prove that
    no indirect branch to that location is possible from local information
    available to the tool.
    
    Static linkers are not allowed to assume that all direct branch
    targets have a BTI instruction. If a veneer is required then the
    static linker must generate additional BTI instructions if needed.
    
    A static linker is allowed to assume that a symbol that is exported
    to the dynamic symbol table has a BTI instruction.
    
    In practice this will permit compilers to remove BTI instructions from
    static functions that do not have their address taken and that address
    escapes the function.
    
    This matches the behavior of the GNU toolchain.
    
    Fixes ARM-software#196
    smithp35 committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    e5d8ae6 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. [sysvabi64] No BTI landing pads for absolute symbols.

    It is possible to provide a static linker with branch targets
    using absolute symbols. For example using --defsym. The static
    cannot disassemble the location of these symbols so it isn't
    possible to check whether A BTI landing pad is necessary, nor
    is it always possible to place a BTI landing pad within range
    of the absolute symbol address.
    
    A user providing the static linker with function addresses
    using absolute symbols is responsible for putting BTI
    compatible landing pads at the start of these addresses.
    smithp35 committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7c89cc7 View commit details
    Browse the repository at this point in the history