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.
List of target formats supported by gcc and ld
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: List of target formats supported by gcc and ld
http://wiki.osdev.org/LDOSDev 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)
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Re: List of target formats supported by gcc and ld
Not even 1% of all object formats supported by ld.omarrx024 wrote:ELF, DJGPP/COFF, Win32/COFF, A.Out
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: List of target formats supported by gcc and ld
It's easy to skip over what's been compiled in:
As to what it could support, assume everything that's not 16-bit or a trade secret of sorts.
Code: Select all
$ 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
(...)
Re: List of target formats supported by gcc and ld
Great!Combuster wrote:It's easy to skip over what's been compiled in:As to what it could support, assume everything that's not 16-bit or a trade secret of sorts.Code: Select all
$ 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 (...)
Re: List of target formats supported by gcc and ld
For my ELLCC clang based cross development tool project, I build ld to support quite a variety of targets. ld --help:
http://ellcc.org
-Rich
Code: Select all
...
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
...
-Rich