Re: drivers/char/rust_example fails to load

2021-03-22 Thread Miguel Ojeda
On Mon, Mar 22, 2021 at 1:20 PM Miguel Ojeda wrote: > > I'll take a look at fixing those soon. For those that may read this or run into the same issue: this started with the LLVM 12 upgrade in rustc nightlies. Therefore, please avoid the very latest nightlies (>= nightly-2021-03-05) until [1] is

Re: drivers/char/rust_example fails to load

2021-03-22 Thread Miguel Ojeda
Hi Joshua, On Mon, Mar 22, 2021 at 3:53 AM Joshua Abraham wrote: > > Cheers, using rustc 1.52.0-nightly (9b471a3f5 2021-02-19) fixed the > issue. Interesting that the newer nightly compiler creates these new > relocations for the code! Thanks a lot for the report and for confirming that worked f

Re: drivers/char/rust_example fails to load 2021-03-20 builds

2021-03-22 Thread Adam Bratschi-Kaye
> How to tell "use older parts in toolchain"? > Yeah, probably a Rust newbie question, still a sincere question. > Was a older version installed? How to tell `rustup` to keep old > versions? Was done with a cargo.toml entry? Or with file > `rust-toolchain`? Please tell (Please spoon feed me ;-)

Re: drivers/char/rust_example fails to load 2021-03-20 builds

2021-03-22 Thread Geert Stappers
On Sun, Mar 21, 2021 at 09:53:27PM -0500, Joshua Abraham wrote: > Hey Miguel, > > > Please give a go to the nightly from a month ago, i.e. 2021-02-20. > > Cheers, using rustc 1.52.0-nightly (9b471a3f5 2021-02-19) fixed the issue. How to tell "use older parts in toolchain"? Yeah, probably a Rust

Re: drivers/char/rust_example fails to load

2021-03-21 Thread Joshua Abraham
Hey Miguel, > Please give a go to the nightly from a month ago, i.e. 2021-02-20. Cheers, using rustc 1.52.0-nightly (9b471a3f5 2021-02-19) fixed the issue. Interesting that the newer nightly compiler creates these new relocations for the code! -- Respectfully, Josh Abraham

Re: drivers/char/rust_example fails to load

2021-03-21 Thread Miguel Ojeda
Hi Joshua, On Mon, Mar 22, 2021 at 1:13 AM Joshua Abraham wrote: > > $ rustc --version > rustc 1.52.0-nightly (61edfd591 2021-03-20) Please give a go to the nightly from a month ago, i.e. 2021-02-20. Cheers, Miguel

drivers/char/rust_example fails to load

2021-03-21 Thread Joshua Abraham
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 GOTPC