Thread with 18 posts
jump to expanded postaha
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!!!!!
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
ah crap it only works when it uses the system linker, and I hadn't realised :(
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
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
π€π€π€
i have Defeated the apple-eating dragon π
https://github.com/hikari-no-yume/touchHLE/commit/d1072934d8bf75f04f014a1b070b9b8f12b0879f
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
good news for stack smashers, the safety's off https://github.com/hikari-no-yume/touchHLE/commit/2960cf6260520685da39379803643ee4d82ec4ec
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
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 I've thought about trying it with no_std before⦠never actually done it though.
@saagar i'm sorry saagar, you can't fire that gun. i have left the trigger undefined
@saagar on that note I find it funny that I had to disable stack smashing protection because the stack guard was undefined :3
@hikari congrats! excited about your retro gamedev projects :3
@SoniEx2 god, i definitely should make a game or demo for iphone os⦠but this is just for testing