Kanbaru 🌟 (one hikari of too many)

aha

ahahahaha

AHAHAHAHA

bin/clang \
    -target armv6-apple-ios2 \
    hello-world.c \
    -nostdlib \
    -Wl,-U,_puts,-U,start,-alias,_dyld_stub_binding_helper,dyld_stub_binding_helper \
    -o hello-world.dylib

IT WORKS. iT WORKS,,,,

FEAR ME!!!!!

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))
CPU emulation begins now.
hello, world
thread 'main' panicked at 'Attempted null-page access at 0x0 (0x4 bytes)', src/mem.rs:287:9

YES

YESSSSSSSS

I AM BECOME GOD

1 replies β†’
1 replies

Genders: ♾️, πŸŸͺβ¬›πŸŸ©; Soni L.

(replying to Kanbaru 🌟 (one hikari of too many))

@hikari congrats! excited about your retro gamedev projects :3

Kanbaru 🌟 (one hikari of too many)

(replying to Genders: ♾️, πŸŸͺβ¬›πŸŸ©; Soni L.)

@SoniEx2 god, i definitely should make a game or demo for iphone os… but this is just for testing

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

ah crap it only works when it uses the system linker, and I hadn't realised :(

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

that was the I AM A GENIUS

here is the OH NO:

ld64.lld: error: VANILLA relocation must be extern at offset -1577058268 of __TEXT,__text in …hello-world-e3240e.o
ld64.lld: error: VANILLA relocation has width 1 bytes, but must be 0 bytes at offset -1577058268 of __TEXT,__text in …hello-world-e3240e.o
ld64.lld: error: VANILLA relocation must be extern at offset -1593835520 of __TEXT,__text in …hello-world-e3240e.o
ld64.lld: error: VANILLA relocation has width 1 bytes, but must be 0 bytes at offset -1593835520 of __TEXT,__text in …hello-world-e3240e.o

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

i am pleased to announce that we are back. we are so back!!!

.\LLVM-11.0.1-win64\bin\clang.exe -fuse-ld=lld -target armv6-apple-ios2 hello-world.c -nostdlib "-Wl,-e,_main,-undefined,dynamic_lookup" -o hello-world -v

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

😀😀😀

i have Defeated the apple-eating dragon πŸ‰

https://github.com/hikari-no-yume/touchHLE/commit/d1072934d8bf75f04f014a1b070b9b8f12b0879f

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

this is definitely the most perverted, obscene thing i've ever done with a compiler. to my friends who work at Apple, have worked at Apple, or are possessed of such a shining divine Purpose that they have accumulated more Apple knowledge than any Apple employee could possibly know… you're allowed to kill me for this. well not really but

1 replies β†’
1 replies

Kanbaru 🌟 (one hikari of too many)

(replying to Saagar Jha)

@saagar i'm sorry saagar, you can't fire that gun. i have left the trigger undefined

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

@saagar on that note I find it funny that I had to disable stack smashing protection because the stack guard was undefined :3

Saagar Jha

(replying to Kanbaru 🌟 (one hikari of too many))
@hikari Become unguardable

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

I am now cross-compiling to 32-bit iOS using upstream LLVM and no Apple headers, on Windows!

fear me

https://github.com/hikari-no-yume/touchHLE/actions/runs/5937842048

Kanbaru 🌟 (one hikari of too many)

(replying to Kanbaru 🌟 (one hikari of too many))

note: the resulting binary probably doesn't actually work on iOS, only in touchHLE. I could make it work on iOS but it would require some extra effort and I don't have a jailbroken iOS 6 device right now :)

Mary 🀎

(replying to Kanbaru 🌟 (one hikari of too many))
@hikari now I wonder if you could target armv6-apple-ios2 with rustc easily (with stdlib), that would be cute :HifumiMonch:

Kanbaru 🌟 (one hikari of too many)

(replying to Mary 🀎)

@mary I've thought about trying it with no_std before… never actually done it though.