[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMmOe3SaBn9+XzjhZC8QxmZnHQkvB0R=nV4NaRRyMRF6EfcvvA@mail.gmail.com>
Date: Sun, 21 Mar 2021 19:13:37 -0500
From: Joshua Abraham <j.abraham1776@...il.com>
To: ojeda@...nel.org, alex.gaynor@...il.com,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: drivers/char/rust_example fails to load
I am building Rust-for-Linux at commit
e9b9c0ef1e7040a3c3dc2232d5fd64999eba61a0 with "make CC=clang-11" and
the built kernel fails to load rust_example.ko with the following
error:
[ 1653.507602] module: rust_example: Unknown rela relocation: 9
Looking at elf.h shows this relocation is type GOTPCREL:
#define R_X86_64_GOTPCREL 9 /* 32 bit signed PC relative offset to GOT */
Sure enough rust_example.ko contains a few of these entries, and no
other kernel module does:
000000000a51 008800000009 R_X86_64_GOTPCREL 0000000000000000
_RNvXsb_NtCshGpAVYOtgW - 4
000000000f15 008700000009 R_X86_64_GOTPCREL 0000000000000000
_RNvXs2_NtNtNtCshGpAVY - 4
000000001307 005300000009 R_X86_64_GOTPCREL 0000000000000000
_RNvXs6_NtNtNtCshGpAVY - 4
I assume that this is an issue with my rust toolchain, however I'm
reporting it here since it might be helpful to update documentation or
(unlikely) add support for this relocation type in the kernel.
Host/environment info:
$ uname -a
Linux pop-os 5.8.0-7642-generic #47~1614007149~20.04~82fb226-Ubuntu
SMP Tue Feb 23 02:56:27 UTC
$ rustup show active-toolchain
nightly-x86_64-unknown-linux-gnu (default)
$ rustc --version
rustc 1.52.0-nightly (61edfd591 2021-03-20)
$ clang-11 --version
Ubuntu clang version 11.0.0-2~ubuntu20.04.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
--
Respectfully,
Josh Abraham
Powered by blists - more mailing lists