PE message from ld?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
mercury

PE message from ld?

Post by mercury »

I try: Q:\finalOS>ld -Ttext 0xFF800000 --oformat binary kernelc2.o kernelasm2.o -o kernel.bin

I get: ld: PE operations on non PE file.

Can anybody tell me what that means, and why?
Brill

RE:PE message from ld?

Post by Brill »

PE is a windows file format.
By the sounds of it, you're creating a windows file format or putting pe stuff into the file without compiling as the pe format. And that's why it's complaining. Don't ask what constitutes pe stuff though. :).

Brill.
mercury

RE:PE message from ld?

Post by mercury »

lol ok thanx. I think I got that part fixed, however, now I need to practice calling interrupts. For some reason all my computer does is reset when I try. Is that because I don't have interrupts enabled properly? I'm not up to date with x86 assembly programing. I want my Atari :(
CKr

RE:PE message from ld?

Post by CKr »

How exactly did you fix your problem?
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

RE:PE message from ld?

Post by df »

i did this topic to death on the mega-tokyo.com message board.

basically you need to rebuild binutils to support elf and pe.

when linking and creating elf output, i had to add the switch "-mi386bsd" this fixed all my errors up and produces a nice workable elf kernel

you can try reading
http://www.mega-tokyo.com/forum/index.p ... eadid=2489
and some info in
http://www.mega-tokyo.com/forum/index.p ... eadid=2371
-- Stu --
Hondo

RE:PE message from ld?

Post by Hondo »

I also had that problem... I downloaded the latest version of ld and it worked fine.
Post Reply