Skip to content

Remaining case of using BKPT ARM instruction #69

Description

@slipher

#60 gets rid of most cases of using the BKPT instruction, but there is one rare case where it can still be generated. A construction called a "constant pool" is used to store data that is not meant to be executed in the code section. The data is an instruction pointer offset. It can only be generated if the executable has over 32 MB of code, for jumps to a far away address. Ideally this case would be replaced with a UDF instruction like the others.

The toolchain (I believe the linker) and the validator would need corresponding changes to replace BKPT with UDF for this constant pool case. Probably it's not worth doing since changing the toolchain is annoying and no one is using >32MB executables. Also even when it is used, the instruction is never meant to be executed. So I'm just documenting this without expecting to actually do it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions