OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 8:20 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Building GCC for a.out executables
PostPosted: Wed Jan 05, 2022 10:18 pm 
Offline
User avatar

Joined: Tue Aug 11, 2020 9:29 pm
Posts: 7
Before I say anything, I'd like to say that I know exactly why I shouldn't build an operating system around a.out executables, but ELF doesn't fit with my needs so I'm avoiding it. I'm going to be ignoring anyone who says "Why don't you just use X format instead?" because that doesn't answer my question. Also, I'll just say it here: I haven't tried all the options I could. I know. I have an extremely old and slow computer and it takes me forever to compile anything, so I'd rather try to find the solution BEFORE trial and error.

Currently, I'm trying to build a GCC Cross-Compiler. I've done this before with other toolchains so I'm fairly confident the problem isn't in my host compiler. I'm trying to compile it all with my target as i386-aout, which it automatically turns into i386-pc-aout. It gets through binutils fine up to ld, at which point it fails, informing me that:
Code:
*** ld does not support target i386-pc-aout
*** see ld/configure.tgt for supported targets

Well, I checked configure.tgt and found the only reference to i386 and aout is here:
Code:
i[3-7]86-*-msdos*) targ_emul=i386msdos targ_extra_emuls=i386aout targ_extra_ofiles= ;;

Which (I think, from my guessing how tgt works) indicates that I should be using i386-msdos-aout instead of i386-pc-aout. I'm at a point here where I could figure out more on my own but I'm having a hard time finding documentation on GCC for aout so I figured I'd just ask to see if anyone else can help me. Should I use i386-msdos-aout instead, or would that give me some other trouble?

_________________
Learning to code the wrong way :D

Now working on CRUX, a thing! (Think MELCHIOR (Think Peak (Think Plan B but more elegant) but more elegant) but more elegant)


Top
 Profile  
 
 Post subject: Re: Building GCC for a.out executables
PostPosted: Wed Jan 05, 2022 10:37 pm 
Offline
Member
Member

Joined: Wed Mar 30, 2011 12:31 am
Posts: 676
Binutils'/BFD's support for a.out [for x86] was always spotty and existed only for supporting legacy targets as everything switched to ELF or was already using something else more powerful (eg. PE) twenty years ago. It has been fully deprecated now and you will need to dig through ancient archives to find compatible versions of all the tools and dependent libraries if you want to build a toolchain supporting it.

You might have better luck building an ELF toolchain and then converting your outputs, rather than trying to natively build an a.out toolchain.

_________________
toaruos on github | toaruos.org | gitlab | twitter | bim - a text editor


Top
 Profile  
 
 Post subject: Re: Building GCC for a.out executables
PostPosted: Thu Jan 06, 2022 10:52 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
spotracite wrote:
ELF doesn't fit with my needs

Out of curiosity, what makes ELF not work for you?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot], SemrushBot [Bot] and 59 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group