You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.
#[no_mangle]pubfnkmain() -> ! {let x = ["Hello","World","!"];let y = x;unsafe{*(0xb8000as*mutu64) = 0x2f592f412f4b2f4f;}loop{}}
As Phil's guide suggests, this produces undefined references to memcpy, but what's stranger is what happens when I bring in rlibc to provide those symbols (and add --gc-sections to the linker call to get rid of all the compiler builtins):
ld -n --gc-sections -o target/x86_64-unknown-none/debug/finisterre -T src/arch/x86_64/linker.ld target/x86_64-unknown-none/debug/multiboot.o target/x86_64-unknown-none/debug/boot.o target/x86_64-unknown-none/debug/libfinisterre.a
target/x86_64-unknown-none/debug/libfinisterre.a(core-d2a8ed3c191e10b4.core0.rcgu.o): In function `core::panicking::panic_fmt::h35553c2ef9e37a4d':
core0-13bbbb8dfc184aa61fdc6f6336cf5056.rs:(.text.cold._ZN4core9panicking9panic_fmt17h35553c2ef9e37a4dE+0x88): undefined reference to `rust_begin_unwind'
I have "panic-strategy": "abort" in my target file, why is there a call to rust_begin_unwind from libcore?
The text was updated successfully, but these errors were encountered:
ketsuban
changed the title
Blizzard of undefined-reference-to
Call to rust_begin_unwind despite panic=abort
Dec 8, 2017
This whole thing seems like it should be mentioned at the end of "Hello from Rust", in the same vein as the preventative setting of bit 16 (enabling write protection in ring 0) when enabling paging.
Upon getting a successful
OKAY
from Rust code I took a hint from @phil-opp's guide and tried the following.As Phil's guide suggests, this produces undefined references to
memcpy
, but what's stranger is what happens when I bring inrlibc
to provide those symbols (and add--gc-sections
to the linker call to get rid of all the compiler builtins):I have
"panic-strategy": "abort"
in my target file, why is there a call torust_begin_unwind
from libcore?The text was updated successfully, but these errors were encountered: