Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: linking with rust-lld failed: exit code: 0xc0000374 #542

Open
JelesoBeton opened this issue Sep 19, 2023 · 0 comments
Open

error: linking with rust-lld failed: exit code: 0xc0000374 #542

JelesoBeton opened this issue Sep 19, 2023 · 0 comments

Comments

@JelesoBeton
Copy link

JelesoBeton commented Sep 19, 2023

error: linking with `rust-lld` failed: exit code: 0xc0000374
  |
  = note: "rust-lld" "-flavor" "gnu" "C:\\Users\\saska\\AppData\\Local\\Temp\\rustcBauPo5\\symbols.o" "C:\\Users\\saska\\OneDrive\\Документы\\new_rust_proj\\blog_os\\target\\thumbv7em-none-eabihf\\debug\\deps\\blog_oss-854208556bc7ce2a.3w4ia5dcjc260dzm.rcgu.o" "--as-needed" "-L" "C:\\Users\\saska\\OneDrive\\Документы\\new_rust_proj\\blog_os\\target\\thumbv7em-none-eabihf\\debug\\deps" "-L" "C:\\Users\\saska\\OneDrive\\Документы\\new_rust_proj\\blog_os\\target\\debug\\deps" "-L" "C:\\Users\\saska\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\thumbv7em-none-eabihf\\lib" "-Bstatic" "C:\\Users\\saska\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\thumbv7em-none-eabihf\\lib\\librustc_std_workspace_core-135f557a473c308d.rlib" "C:\\Users\\saska\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\thumbv7em-none-eabihf\\lib\\libcore-ba82e45a60f56b09.rlib" "C:\\Users\\saska\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\thumbv7em-none-eabihf\\lib\\libcompiler_builtins-2dcd61298e9fcb4f.rlib" "-Bdynamic" "--eh-frame-hdr" "-z" "noexecstack" "-L" "C:\\Users\\saska\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\thumbv7em-none-eabihf\\lib" "-o" "C:\\Users\\saska\\OneDrive\\Документы\\new_rust_proj\\blog_os\\target\\thumbv7em-none-eabihf\\debug\\deps\\blog_oss-854208556bc7ce2a" "--gc-sections"
  = note:

error: could not compile `blog_oss` (bin "blog_oss") due to previous error

code:

#![no_std] // don't link the Rust standard library
#![no_main] // disable all Rust-level entry points

use core::panic::PanicInfo;

#[no_mangle] // don't mangle the name of this function
pub extern "C" fn _start() -> ! {
    // this function is the entry point, since the linker looks for a function
    // named `_start` by default
    loop {}
}

#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
    loop {}
}

cargo toml:

[package]
name = "blog_oss"
version = "0.1.0"
authors = ["jel"]

# the profile used for `cargo build`
[profile.dev]
panic = "abort" # disable stack unwinding on panic

# the profile used for `cargo build --release`
[profile.release]
panic = "abort" # disable stack unwinding on panic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant