ld's targets vs emulations (intending to link EFI binaries on Linux)

Jan Beulich JBeulich@novell.com
Mon May 2 07:44:00 GMT 2011


What is the point of ld supporting (in e.g. the default x86 Linux
configurations) PE executables as targets, but not as emulations?
This basically means that one can link such executables, but there's
no control over the various linking parameters (as those are
processed by the respective [not present] emulation code).

Note that elilo, for example, is also suffering from this, working
around it by first linking an ELF shared object, then converting it
to a PE executable via objcopy. A gross hack imo, not the least
because according to what I can see, objcopy doesn't translate
relocations, requiring the produced binary to do "self relocation"
(see the gnu-efi project).

Thanks, Jan



More information about the Binutils mailing list