NASM Forum > Other Discussion

GCC-TDM problem when calling ld

(1/1)

gomi:
Hello, I am trying to use ld on windows with gcc-tdm.

My steps to link:
nasm loader.asm -f elf64 -o loader_entry.o
works.

gcc -O0 -g -ffreestanding -m64 -c loader.c -o loader.o
works.

ld -o loader.bin -m i386pe -Ttext 0x1000 loader_entry.o loader.o --oformat binary
error: ld: cannot perform PE operations on non PE output file 'loader.bin'

What is the reason of that ?

Navigation

[0] Message Index

Go to full version