OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Apr 15, 2024 11:46 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: List of target formats supported by gcc and ld
PostPosted: Sat Sep 19, 2015 8:42 pm 
Offline

Joined: Sat Feb 05, 2011 6:05 am
Posts: 11
Location: I gotta go
It's been more than a while I've been googling on this topic. Few years back, I came across a page which listed all the target formats and target machines supported by both gcc and ld. But recently, that page seems to go out of existence. I even tried checking gcc manual and configure options. It seems they have skipped this part altogether.

If anyone have a link that I may find useful, please post in.

Edit: I seem to recall that ld had a switch that enlists object file formats it is configured to support. Well, I can't remember the exact switch so if anyone knows, that too would be very helpful.


Top
 Profile  
 
 Post subject: Re: List of target formats supported by gcc and ld
PostPosted: Sat Sep 19, 2015 8:56 pm 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
:roll: :roll:
OSDev Wiki wrote:
Supports most known input formats (ELF, DJGPP/COFF, Win32/COFF, A.Out, etc)
Supports most known output formats (ELF, Win32/PE, A.Out, COFF, etc)

http://wiki.osdev.org/LD

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: Re: List of target formats supported by gcc and ld
PostPosted: Sat Sep 19, 2015 11:29 pm 
Offline

Joined: Sat Feb 05, 2011 6:05 am
Posts: 11
Location: I gotta go
omarrx024 wrote:
ELF, DJGPP/COFF, Win32/COFF, A.Out
Not even 1% of all object formats supported by ld.


Top
 Profile  
 
 Post subject: Re: List of target formats supported by gcc and ld
PostPosted: Sun Sep 20, 2015 1:05 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
It's easy to skip over what's been compiled in:
Code:
$ x86_64-pe-ld --help
(...)
x86_64-pe-ld: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 elf64-l1om elf64-k1om pe-i386 pei-i386 elf32-i386 elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
x86_64-pe-ld: supported emulations: i386pep i386pe
(...)


As to what it could support, assume everything that's not 16-bit or a trade secret of sorts.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject: Re: List of target formats supported by gcc and ld
PostPosted: Sun Sep 20, 2015 1:57 am 
Offline

Joined: Sat Feb 05, 2011 6:05 am
Posts: 11
Location: I gotta go
Combuster wrote:
It's easy to skip over what's been compiled in:
Code:
$ x86_64-pe-ld --help
(...)
x86_64-pe-ld: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 elf64-l1om elf64-k1om pe-i386 pei-i386 elf32-i386 elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
x86_64-pe-ld: supported emulations: i386pep i386pe
(...)


As to what it could support, assume everything that's not 16-bit or a trade secret of sorts.
Great!


Top
 Profile  
 
 Post subject: Re: List of target formats supported by gcc and ld
PostPosted: Sun Sep 20, 2015 4:53 pm 
Offline

Joined: Sat Apr 25, 2015 6:15 pm
Posts: 4
For my ELLCC clang based cross development tool project, I build ld to support quite a variety of targets. ld --help:
Code:
...
bin/ecc-ld: supported targets: elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big elf64-littleaarch64 elf64-bigaarch64 elf32-littleaarch64 elf32-bigaarch64 elf32-littlearm elf32-bigarm elf32-bigmips elf32-littlemips elf64-bigmips elf64-littlemips elf32-littlenios2 elf32-bignios2 elf32-powerpc aixcoff-rs6000 elf32-powerpcle ppcboot elf64-powerpc elf64-powerpcle aixcoff64-rs6000 aix5coff64-rs6000 elf32-microblaze elf32-microblazeel elf32-sparc a.out-sunos-big elf32-tradbigmips elf32-tradlittlemips ecoff-bigmips ecoff-littlemips elf32-ntradbigmips elf64-tradbigmips elf32-ntradlittlemips elf64-tradlittlemips a.out-sparc-linux elf64-sparc pe-x86-64 pe-bigobj-x86-64 pe-i386 srec symbolsrec verilog tekhex binary ihex
bin/ecc-ld: supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb elf32ebmip elf32elmip nios2elf elf32ppc elf32ppclinux elf32ppcsim elf64ppc elf32microblaze elf32microblazeel elf32_sparc aarch64linux aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi armelf_linux armelfb_linux elf32btsmip elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip nios2linux elf32mb_linux elf32mbel_linux sparclinux elf64_sparc sun4 i386pep i386pe
...

http://ellcc.org

-Rich


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 26 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