summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Bartussek <[email protected]>2021-03-27 14:26:43 +0100
committerDario Bartussek <[email protected]>2021-03-27 14:26:43 +0100
commit50c52b5f220575f0c5127be623dd53a8c381f7fa (patch)
tree2e888ad5b5a3fcb39119f7bd303c51b759649d43
parentBasic example for compiling Rust for the 3DS as elf (diff)
downloadrust_3ds-50c52b5f220575f0c5127be623dd53a8c381f7fa.tar.xz
rust_3ds-50c52b5f220575f0c5127be623dd53a8c381f7fa.zip
Updated main to actually produce a start function
-rw-r--r--.gitignore3
-rw-r--r--compile.sh4
-rw-r--r--src/main.rs2
3 files changed, 6 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index e933378..1337cd0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,4 +4,5 @@
Cargo.lock
-3ds.map
+rust_3ds.map
+rust_3ds.s
diff --git a/compile.sh b/compile.sh
index 065aba6..ac7ae71 100644
--- a/compile.sh
+++ b/compile.sh
@@ -1,3 +1,5 @@
cargo fmt
-RUSTFLAGS="-C link-args=-T3dsx.ld -C link-args=-Map=3ds.map" cargo xbuild --target 3ds.json
+RUSTFLAGS="-C link-args=-T3dsx.ld -C link-args=-Map=rust_3ds.map" cargo xbuild --target 3ds.json
+
+llvm-objdump -d -C target/3ds/debug/rust_3ds > rust_3ds.s
diff --git a/src/main.rs b/src/main.rs
index 029937f..716751a 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -4,7 +4,7 @@
use core::panic::PanicInfo;
#[no_mangle]
-pub extern "C" fn pre_main() -> ! {
+pub extern "C" fn _start() -> ! {
loop {}
}