Skip to content

Commit

Permalink
clarified documentation / help
Browse files Browse the repository at this point in the history
  • Loading branch information
nebulark committed Jun 3, 2024
1 parent df751da commit 21f138e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ mod desc {
pub const parse_panic_strategy: &str = "either `unwind` or `abort`";
pub const parse_on_broken_pipe: &str = "either `kill`, `error`, or `inherit`";
pub const parse_patchable_function_entry: &str =
"total_nops and optionally prefix_nops (defaulting prefix_nops=0)";
"either two comma separated integers (total_nops,prefix_nops) or one integer (total_nops)";
pub const parse_opt_panic_strategy: &str = parse_panic_strategy;
pub const parse_oom_strategy: &str = "either `panic` or `abort`";
pub const parse_relro_level: &str = "one of: `full`, `partial`, or `off`";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

--------------------

The `-Z patchable-function-entry=M,N` or `-Z patchable-function-entry=M`
compiler flag enables nop padding of function entries with M nops, with
an offset for the entry of the function at N nops. In the second form,
N defaults to 0.
The `-Z patchable-function-entry=total_nops,prefix_nops` or `-Z patchable-function-entry=total_nops`
compiler flag enables nop padding of function entries with 'total_nops' nops, with
an offset for the entry of the function at 'prefix_nops' nops. In the second form,
'prefix_nops' defaults to 0.

As an illustrative example, `-Z patchable-function-entry=3,2` would produce:

Expand Down

0 comments on commit 21f138e

Please sign in to comment.