Linker misbehaviour in 1.81.0-nightly-2024-06-09

I was using version 1.79.0-nightly-2024-04-04. I updated with rustup update. When I compiled my cdylib, everything went fine. But when I tried to load my .so file, I got an unresolved symbol error. This symbol was found in a static C++ library compiled with GCC.

To solve this problem, I added “ channel = ‘nightly-2024-04-04’ in ‘rust-toolchain.toml’. The old version came back.

I don't know if it's my fault, but in doing so I got the error :

I'm sure if this is my fault, but by making this I had the error : error[E0658]: use of unstable library feature 'proc_macro_byte_character' --> /home/zekirax/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.82/src/wrapper.rs:871:21 | 871 | proc_macro::Literal::byte_character(byte) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #115268 https://github.com/rust-lang/rust/issues/115268 for more information = help: add #![feature(proc_macro_byte_character)] to the crate attributes to enable = note: this compiler was built on 2024-04-03; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature 'proc_macro_c_str_literals' --> /home/zekirax/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.82/src/wrapper.rs:898:21 | 898 | proc_macro::Literal::c_string(string) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #119750 https://github.com/rust-lang/rust/issues/119750 for more information = help: add #![feature(proc_macro_c_str_literals)] to the crate attributes to enable = note: this compiler was built on 2024-04-03; consider upgrading it if it is out of date

To fix this I added the 2 features in "/home/zekirax/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.82/src/lib.rs".

With this, it compiled, and my .so file was working like before.

This could be an issue with the switch to LLD:

And as requested there, please file an issue!

Yeah, I opened the file with Ghidra and saw a new ELF comment "Linker: LLD 18.1.7".

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.