I'm doing a bit of osdev on my mobile (my PC broke XD) and I'm using termux
In this app there isn't the binutils and gcc i686/x86_64 toolchanins, so the only c compiler that can output i686 stuff is clang & lld
I already managed to make compile everything into a elf file with clang -target i386-linux-elf -nostdlib -Wl,link.ld -fuse-ld=lld -o kernel/kernel.elf $^
But nows my problem: I couldn't get clang and lld to output binary files (the OUTPUT_FORMAT(binary) in the linker script gives errors) and if I use objcopy/stript it doesn't recognize the elf format (since they are for the android elf)
So how can I produce a binary file from the elf file?