aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorGary Guo <[email protected]>2022-12-05 21:50:00 +0000
committerMiguel Ojeda <[email protected]>2023-01-16 21:04:34 +0100
commitcb7d9defdafba4c1d463a09c9b09876066f81ee4 (patch)
tree583cda5deedf8d40249e431ecabb365c46e34cbb /tools/perf/scripts/python
parent8909a80e3f684fb274a171489c16e8f10c482e83 (diff)
rust: compiler_builtins: make stubs non-global
Currently we define a number of stubs for compiler-builtin intrinsics that compiled libcore generates. The defined stubs are weak so they will not conflict with genuine implementation of these intrinsics, but their effect is global and will cause non-libcore code that accidently generate these intrinsics calls compile and bug on runtime. Instead of defining a stub that can affect all code, this patch uses objcopy's `--redefine-sym` flag to redirect these calls (from libcore only) to a prefixed version (e.g. redirect `__multi3` to `__rust_multi3`), so we can define panciking stubs that are only visible to libcore. This patch was previously discussed on GitHub [1]. This approach was also independently proposed by Nick Desaulniers in [2]. Link: https://github.com/Rust-for-Linux/linux/pull/779 [1] Link: https://lore.kernel.org/lkml/CAKwvOdkc0Qhwu=gfe1+H23TnAa6jnO6A3ZCO687dH6mSrATmDA@mail.gmail.com/ Suggested-by: Nick Desaulniers <[email protected]> Acked-by: Nick Desaulniers <[email protected]> Signed-off-by: Gary Guo <[email protected]> Reviewed-by: Wei Liu <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions