Add -Zfunction-return={keep,thunk-extern}
option
This is intended to be used for Linux kernel RETHUNK builds. With this commit (optionally backported to Rust 1.73.0), plus a patched Linux kernel to pass the flag, I get a RETHUNK build with Rust enabled that is `objtool`-warning-free and is able to boot in QEMU and load a sample Rust kernel module. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
d3c9964c20
commit
2d476222e8
17 changed files with 215 additions and 9 deletions
|
@ -89,6 +89,7 @@ enum LLVMRustAttribute {
|
|||
AllocatedPointer = 38,
|
||||
AllocAlign = 39,
|
||||
SanitizeSafeStack = 40,
|
||||
FnRetThunkExtern = 41,
|
||||
};
|
||||
|
||||
typedef struct OpaqueRustString *RustStringRef;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue