Skip to content

Commit b8673d5

Browse files
metaspaceojeda
authored andcommitted
rust: kbuild: fix export of bss symbols
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: 2f7ab12 ("Kbuild: add Rust support") Signed-off-by: Andreas Hindborg <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Tested-by: Alice Ryhl <[email protected]> Reviewed-by: Gary Guo <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 47ac09b commit b8673d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ $(obj)/bindings/bindings_helpers_generated.rs: $(src)/helpers.c FORCE
305305
quiet_cmd_exports = EXPORTS $@
306306
cmd_exports = \
307307
$(NM) -p --defined-only $< \
308-
| awk '/ (T|R|D) / {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@
308+
| awk '/ (T|R|D|B) / {printf "EXPORT_SYMBOL_RUST_GPL(%s);\n",$$3}' > $@
309309

310310
$(obj)/exports_core_generated.h: $(obj)/core.o FORCE
311311
$(call if_changed,exports)

0 commit comments

Comments
 (0)