PATCH: PR binutils/5307: objcopy PE<->EFI doesn't work when both PE/EFI are enabled
Pedro Alves
pedro_alves@portugalmail.pt
Tue Nov 13 19:23:00 GMT 2007
H.J. Lu wrote:
> On Mon, Nov 12, 2007 at 11:02:56PM +0000, Pedro Alves wrote:
>> Wouldn't you normally want the default subsystem of the
>> output? Isn't it IMAGE_SUBSYSTEM_EFI_APPLICATION for efi-app-* ?
>
> It is done with
>
> if (extra->Subsystem == IMAGE_SUBSYSTEM_UNKNOWN)
> extra->Subsystem = pe->target_subsystem;
>
> in _bfd_XXi_swap_aouthdr_out. target_subsystem has been set properly
> according to target.
>
Thank you for the explanation.
>> Wouldn't a more general objcopy flag to change the subsystem
>> to the one you want be more useful (like ld's --subsystem) ?
>>
>
> It is called "-O efi-app-ia32" for objcopy.
>
Point taken ...
I was wondering if you never need to do similar things for
the other efi subsystems (IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER,
IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER), but I take it you don't.
--
Pedro Alves
More information about the Binutils
mailing list