Page 1 of 1
List of target formats supported by gcc and ld
Posted: Sat Sep 19, 2015 8:42 pm
by Rival
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.
Re: List of target formats supported by gcc and ld
Posted: Sat Sep 19, 2015 8:56 pm
by BrightLight
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
Re: List of target formats supported by gcc and ld
Posted: Sat Sep 19, 2015 11:29 pm
by Rival
omarrx024 wrote:ELF, DJGPP/COFF, Win32/COFF, A.Out
Not even 1% of all object formats supported by ld.
Re: List of target formats supported by gcc and ld
Posted: Sun Sep 20, 2015 1:05 am
by Combuster
It's easy to skip over what's been compiled in:
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
(...)
As to what it
could support, assume everything that's not 16-bit or a trade secret of sorts.
Re: List of target formats supported by gcc and ld
Posted: Sun Sep 20, 2015 1:57 am
by Rival
Combuster wrote:It's easy to skip over what's been compiled in:
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
(...)
As to what it
could support, assume everything that's not 16-bit or a trade secret of sorts.
Great!
Re: List of target formats supported by gcc and ld
Posted: Sun Sep 20, 2015 4:53 pm
by rdp
For my ELLCC clang based cross development tool project, I build ld to support quite a variety of targets. ld --help:
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
...
http://ellcc.org
-Rich