[Bug middle-end/85751] New: RFE: option to align code using breakpoint instructions when unreachable
hpa at zytor dot com
gcc-bugzilla@gcc.gnu.org
Fri May 11 18:52:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85751
Bug ID: 85751
Summary: RFE: option to align code using breakpoint
instructions when unreachable
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: hpa at zytor dot com
Target Milestone: ---
For most (all?) targets, there exists a breakpoint or other trap instruction
which can be inserted at any point in the code stream, e.g. 0xcc (int3) on x86.
Currently, gcc aligns code by the default platform option, which is some kind
of NOP, as the assembler can't know if a fallthrough is possible.
It would be preferable to pad with a trapping instruction *if* the padding area
is unreachable and not subject to fallthrough.
This does not require any binutils changes, as the align directives already
optionally support specifying the value of the padding bytes.
More information about the Gcc-bugs
mailing list