You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow section override when using patchable-function-entries
Sometimes it is necessary to group patchable function entrypoint
records in distinct linker sections. This is the case for some bpf
functions within the linux kernel which shouldn't be visible to
ftrace.
Extend `-Zpatchable-function-entry` to accept an argument of the form
`prefix_nops,total_nops,record_section`, which places all entry
record into a user specified section.
Likewise, extend the `patchable_function_entry` attribute to accept an
optional `section="name"` option to place a function into a specific
section.
This is made possible by llvm attribute `patchable-function-entry-section`
added in llvm 21.
Copy file name to clipboardExpand all lines: compiler/rustc_session/src/options.rs
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -784,7 +784,7 @@ mod desc {
784
784
pub(crate)const parse_passes:&str = "a space-separated list of passes, or `all`";
785
785
pub(crate)const parse_panic_strategy:&str = "either `unwind`, `abort`, or `immediate-abort`";
786
786
pub(crate)const parse_on_broken_pipe:&str = "either `kill`, `error`, or `inherit`";
787
-
pub(crate)const parse_patchable_function_entry:&str = "either two comma separated integers (total_nops,prefix_nops), with prefix_nops <= total_nops, or one integer (total_nops)";
787
+
pub(crate)const parse_patchable_function_entry:&str = "a comma separated list of (prefix_nops,total_nops,section_name), (prefix_nops,total_nops), or (total_nops). Where prefix_nops <= total_nops where 0 < total_nops <= 255 and prefix_nops <= total_nops";
0 commit comments