From: Michael Ellerman <mpe@ellerman.id.au>
To: rust-for-linux@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] rust: Export symbols in initialized data section
Date: Tue, 23 Mar 2021 14:26:21 +1100 [thread overview]
Message-ID: <20210323032624.1039422-2-mpe@ellerman.id.au> (raw)
In-Reply-To: <20210323032624.1039422-1-mpe@ellerman.id.au>
On powerpc some symbols end up in the initialized data section, which
means they aren't detected by the logic in cmd_export, leading to errors
such as:
ERROR: modpost: "_RNvNtCsbDqzXfLQacH_6kernel12module_param15PARAM_OPS_USIZE" [drivers/char/rust_example_4.ko] undefined!
nm represents the "initialized data section" with "D", so also look for
that when exporting symbols.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
rust/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/Makefile b/rust/Makefile
index eb8f12ce1644..4cddae9d4a25 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -73,7 +73,7 @@ $(objtree)/rust/bindings_generated.rs: $(srctree)/rust/kernel/bindings_helper.h
quiet_cmd_exports = EXPORTS $@
cmd_exports = \
$(NM) -p --defined-only $< \
- | grep -E ' (T|R) ' | cut -d ' ' -f 3 | grep -E '^(__rust_|_R)' \
+ | grep -E ' (T|R|D) ' | cut -d ' ' -f 3 | grep -E '^(__rust_|_R)' \
| xargs -n1 -Isymbol \
echo 'EXPORT_SYMBOL$(exports_target_type)(symbol);' > $@
--
2.25.1
next prev parent reply other threads:[~2021-03-23 3:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 3:26 [PATCH 0/4] Rust for Linux for ppc64le Michael Ellerman
2021-03-23 3:26 ` Michael Ellerman [this message]
2021-03-23 3:26 ` [PATCH 2/4] rust: Add powerpc64 as a 64-bit target_arch in c_types.rs Michael Ellerman
2021-03-23 3:26 ` [PATCH 3/4] powerpc/rust: Add target.json for ppc64le Michael Ellerman
2021-03-23 9:28 ` Miguel Ojeda
2021-03-23 3:26 ` [PATCH 4/4] rust: Enable " Michael Ellerman
2021-03-23 10:02 ` [PATCH 0/4] Rust for Linux " Miguel Ojeda
2021-03-23 12:15 ` Michael Ellerman
2021-03-23 14:26 ` Miguel Ojeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210323032624.1039422-2-mpe@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=rust-for-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®