Iām probably doing something wrong as a newbie. Could you help me?
I wrote a simple Hello World program in C called hello.c and ran the following command:
gcc -S hello.c
This produced hello.s . Then I used this file with the GNU assembler, as :
as hello.s
What caused the unexecutable a.out that still needs to be connected, I understand?
I am trying to bind it using ld , for example:
ld a.out
But get the following error:
a.out: file not recognized: File truncated
And ld deletes my file.
This is an x86 Ubuntu system. What am I doing wrong? Many thanks!
linker-errors gnu-toolchain
Mr mister
source share