From: qwer trump <vivazsj@gmail.com>
To: linux-kbuild@vger.kernel.org
Subject: Problem with rust module
Date: Fri, 26 Apr 2024 17:45:55 +0800 [thread overview]
Message-ID: <CANcniXsneeNs+Hfr9PScU2aYPyvn6re=5T0Cu5dgAa4N_b7m4A@mail.gmail.com> (raw)
Hi, all
I try to compile a sample rust module with below Makefile:
obj-m += rust_minimal.o
all:
make -C ../.. M=$(PWD) modules
but failed with below message:
ERROR: modpost: too long symbol
"_RNvNtNtCschHAZg3Q02y_6kernel5print14format_strings4INFO"
[/linux-rust/samples/rust/rust_minimal.ko]
But I see there are many long symbols in Module.symvers. So I guess there's
something wrong with modpost.
The relevant code is as follows:
list_for_each_entry(s, &mod->unresolved_symbols, list) {
if (!s->module)
continue;
if (!s->crc_valid) {
warn("\"%s\" [%s.ko] has no CRC!\n",
s->name, mod->name);
continue;
}
if (strlen(s->name) >= MODULE_NAME_LEN) {
error("too long symbol \"%s\" [%s.ko]\n",
s->name, mod->name);
break;
}
MODULE_NAME_LEN is weird. Is the code right?
Thanks.
next reply other threads:[~2024-04-26 9:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 9:45 qwer trump [this message]
2024-04-26 11:25 ` Problem with rust module Miguel Ojeda
2024-04-28 1:00 ` qwer trump
2024-04-29 14:56 ` Masahiro Yamada
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='CANcniXsneeNs+Hfr9PScU2aYPyvn6re=5T0Cu5dgAa4N_b7m4A@mail.gmail.com' \
--to=vivazsj@gmail.com \
--cc=linux-kbuild@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;
as well as URLs for NNTP newsgroup(s).