summaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
authorAndreas Hindborg <a.hindborg@samsung.com>2024-08-15 07:49:30 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-12 11:10:21 +0200
commitca647e8779502c15391b38b1a65c9a6165531c24 (patch)
tree5682dd6e6997047aff8e01d95c2251b0cb7ef796 /rust
parent7bb103055cf3c1507589ab693d2375fc693859b7 (diff)
downloadlinux-ca647e8779502c15391b38b1a65c9a6165531c24.tar.gz
linux-ca647e8779502c15391b38b1a65c9a6165531c24.tar.bz2
linux-ca647e8779502c15391b38b1a65c9a6165531c24.zip
rust: kbuild: fix export of bss symbols
[ Upstream commit b8673d56935c32a4e0a1a0b40951fdd313dbf340 ] Symbols in the bss segment are not currently exported. This is a problem for Rust modules that link against statics, that are resident in the kernel image. Thus export symbols in the bss segment. Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support") Signed-off-by: Andreas Hindborg <a.hindborg@samsung.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Tested-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://lore.kernel.org/r/20240815074519.2684107-2-nmi@metaspace.dk [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'rust')
-rw-r--r--rust/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/Makefile b/rust/Makefile
index 9321a4c83b71..28ba3b9ee18d 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -303,7 +303,7 @@ $(obj)/bindings/bindings_helpers_generated.rs: $(src)/helpers.c FORCE
quiet_cmd_exports = EXPORTS $@
cmd_exports = \
$(NM) -p --defined-only $< \
- | awk '/ (T|R|D) / {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@
+ | awk '/ (T|R|D|B) / {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@
$(obj)/exports_core_generated.h: $(obj)/core.o FORCE
$(call if_changed,exports)