* Could not insert module: Exec format error
@ 2021-03-20 10:20 Santosh Sivaraj
2021-03-20 17:24 ` Miguel Ojeda
0 siblings, 1 reply; 4+ messages in thread
From: Santosh Sivaraj @ 2021-03-20 10:20 UTC (permalink / raw)
To: rust-for-linux
I am very much new to Rust for Linux. My first attempt to build the kernel with
rust support, and insert the example rust module failed with the following
error.
santosh@x86-vm ~ $ modprobe rust_example.ko
modprobe: FATAL: Module rust_example.ko not found in directory /lib/modules/5.12.0-rc3+
santosh@x86-vm ~ $ modprobe rust_example
modprobe: ERROR: could not insert 'rust_example': Operation not permitted
santosh@x86-vm ~ $ sudo modprobe rust_example
modprobe: ERROR: could not insert 'rust_example': Exec format error
santosh@x86-vm ~ $ sudo modprobe rust_example_2
modprobe: ERROR: could not insert 'rust_example_2': Exec format error
santosh@x86-vm ~ $ sudo modprobe rust_example_3
modprobe: ERROR: could not insert 'rust_example_3': Exec format error
santosh@x86-vm ~ $
I followed the 'quick-start.rst' by the letter. What am I doing wrong?
I am building the kernel on a x86 host and running it on a x86 qemu VM.
Thanks,
Santosh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Could not insert module: Exec format error
2021-03-20 10:20 Could not insert module: Exec format error Santosh Sivaraj
@ 2021-03-20 17:24 ` Miguel Ojeda
2021-03-22 2:31 ` Santosh Sivaraj
0 siblings, 1 reply; 4+ messages in thread
From: Miguel Ojeda @ 2021-03-20 17:24 UTC (permalink / raw)
To: Santosh Sivaraj; +Cc: rust-for-linux
Hi Santosh,
On Sat, Mar 20, 2021 at 12:25 PM Santosh Sivaraj <santosh@fossix.org> wrote:
>
> I am building the kernel on a x86 host and running it on a x86 qemu VM.
Is that by chance 32-bit x86?
Cheers,
Miguel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Could not insert module: Exec format error
2021-03-20 17:24 ` Miguel Ojeda
@ 2021-03-22 2:31 ` Santosh Sivaraj
2021-03-22 2:33 ` Miguel Ojeda
0 siblings, 1 reply; 4+ messages in thread
From: Santosh Sivaraj @ 2021-03-22 2:31 UTC (permalink / raw)
To: Miguel Ojeda; +Cc: rust-for-linux
Hi Miguel,
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> writes:
> Hi Santosh,
>
> On Sat, Mar 20, 2021 at 12:25 PM Santosh Sivaraj <santosh@fossix.org> wrote:
>>
>> I am building the kernel on a x86 host and running it on a x86 qemu VM.
>
> Is that by chance 32-bit x86?
No, it is a 64-bit x86 guest. I also saw this in the dmesg:
[ 43.409639] module: rust_example_3: Unknown rela relocation: 9
Googling took me to https://github.com/rust-lang/rust/issues/57390, and tried to
pass `-Z plt=y` in quiet_cmd_rustc_procmacro, but still the same issue.
Thanks,
Santosh
>
> Cheers,
> Miguel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Could not insert module: Exec format error
2021-03-22 2:31 ` Santosh Sivaraj
@ 2021-03-22 2:33 ` Miguel Ojeda
0 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2021-03-22 2:33 UTC (permalink / raw)
To: Santosh Sivaraj; +Cc: rust-for-linux
On Mon, Mar 22, 2021 at 3:31 AM Santosh Sivaraj <santosh@fossix.org> wrote:
>
> No, it is a 64-bit x86 guest. I also saw this in the dmesg:
>
> [ 43.409639] module: rust_example_3: Unknown rela relocation: 9
Ah, we saw this with the latest nightlies -- I'll take a look soon.
Please give a go to the 2021-02-20, that one should work.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-03-22 2:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-20 10:20 Could not insert module: Exec format error Santosh Sivaraj
2021-03-20 17:24 ` Miguel Ojeda
2021-03-22 2:31 ` Santosh Sivaraj
2021-03-22 2:33 ` Miguel Ojeda
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).