Re: [RFC PATCH 3/3] LoongArch: Handle table jump option for RUST

From
Miguel Ojeda <hidden>
Date
2025-09-03 10:28:33
Also in
lkml, loongarch
Reply to
Tiezhu Yang, 2025-09-03
On Wed, Sep 3, 2025 at 11:53 AM Tiezhu Yang [off-list ref] wrote:
When compiling with LLVM and CONFIG_RUST is set, there exist objtool
warnings "sibling call from callable instruction with modified stack
frame" in rust/core.o and rust/kernel.o.
Thanks for fixing this! I have seen it for a long time in my CI:

I think this is:

    Reported-by: Miguel Ojeda [off-list ref]
    Closes: https://lore.kernel.org/rust-for-linux/CANiq72mNeCuPkCDrG2db3w=AX+O-zYrfprisDPmRac_qh65Dmg@mail.gmail.com/ (local)

Perhaps consider adding an example of the warning in the log for
future Lore searches:

    rust/core.o: warning: objtool:
_RNvXs1_NtNtCs5QSdWC790r4_4core5ascii10ascii_charNtB5_9AsciiCharNtNtB9_3fmt5Debug3fmt+0x54:
sibling call from callable instruction with modified stack frame
(1) Please install rustc 1.78.0 (without annotate-tablejump option) or
1.87.0 (with annotate-tablejump option), do not use the latest version
for now, otherwise there may be build error:
Nightly is not a released version, and it is expected that it breaks
from time to time. Even beta may break. We are ~2 months away from
that release.

In any case, I don't think this information is related to this commit.
quoted hunk ↗ jump to hunk
+config RUSTC_HAS_ANNOTATE_TABLEJUMP
+       depends on RUST
+       def_bool $(rustc-option,-Cllvm-args=--loongarch-annotate-tablejump)
I think this may be fine given it is `-Cllvm-args` and anyway
LoongArch doesn't use a `target.json` (which is great!), but please
double-check reading what I wrote in 46e24a545cdb ("rust:
kasan/kbuild: fix missing flags on first build") just in case.

I hope this helps!

Cheers,
Miguel
Thread (8 messages) 8 messages, 2 authors, last reply 2025-09-04
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help