mirror of
https://github.com/Noratrieb/portability.git
synced 2026-01-14 15:55:04 +01:00
fixes
This commit is contained in:
parent
091e833acf
commit
dc6ef2108d
17 changed files with 221 additions and 39 deletions
3
test/build.sh
Executable file
3
test/build.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
rustc example_exe.rs --target x86_64-pc-windows-msvc -Cpanic=abort -Clinker=lld-link -Clink-arg=/entry:my_main -Clink-arg=/NODEFAULTLIB -Cdebuginfo=0
|
||||
BIN
test/example_exe.exe
Normal file → Executable file
BIN
test/example_exe.exe
Normal file → Executable file
Binary file not shown.
|
|
@ -1,5 +1,6 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
#![windows_subsystem = "console"]
|
||||
|
||||
#[panic_handler]
|
||||
fn handle_panic(_: &core::panic::PanicInfo<'_>) -> ! {
|
||||
|
|
@ -7,4 +8,6 @@ fn handle_panic(_: &core::panic::PanicInfo<'_>) -> ! {
|
|||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub fn main() {}
|
||||
pub extern "stdcall" fn my_main() -> u32 {
|
||||
42
|
||||
}
|
||||
|
|
|
|||
BIN
test/example_exe_crt.exe
Normal file
BIN
test/example_exe_crt.exe
Normal file
Binary file not shown.
10
test/example_exe_crt.rs
Normal file
10
test/example_exe_crt.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
#[panic_handler]
|
||||
fn handle_panic(_: &core::panic::PanicInfo<'_>) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "stdcall" fn my_main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue