Skip to content

Commit 3b8eb1a

Browse files
committed
Added error-on-unsupported constraint
1 parent f0d3599 commit 3b8eb1a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

text/3543-patchable-function-entry.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,16 @@ This flag sets the default nop padding for all functions in the crate. Notably,
7979

8080
`prefix` is calculated as `offset`. `entry` is calculated as `nop_count - offset`. This unusual mode of specification is intended to mimic the compiler flags of `clang` and `gcc` for ease of build system integration.
8181

82+
Specifying the compiler flag for a backend or architecture which does not support this feature will result in an error.
83+
8284
## Attribute `#[patchable_function_entry]`
8385

8486
This attribute allows specification of either the `prefix` or `entry` values or both, using the format `#[patchable_function_entry(prefix(n), entry(n))]`. If either is left unspecified, it overrides them to a default value of 0.
8587

8688
As this is specified via an attribute, it will persist across crate boundaries unlike the compiler flag.
8789

90+
Specifying any amount of padding other than 0 in an attribute will result in an error on backends or architectures which do not support this feature.
91+
8892
# Drawbacks
8993
[drawbacks]: #drawbacks
9094

0 commit comments

Comments
 (0)