I have the following c source:
int _start(){}
which I compile as:
gcc -c -o main.o main.c -ffreestanding
then I link as:
ld -oformat binary main.o
The binary's hexdump looks as:
$ hexdump a.out
0000000 4855 e589 5d90 00c3 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 0000 0000
*
0001000 0014 0000 0000 0000 7a01 0052 7801 0110
0001010 0c1b 0807 0190 0000 001c 0000 001c 0000
0001020 efe0 ffff 0007 0000 4100 100e 0286 0d43
0001030 4206 070c 0008 0000
0001038
What file format is the binary? Is 4855 e589 5d90 00c3 its magic number? (I couldn't find the format based on that... e.g google says for 4855 e589 that it's .xls)