This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR binutils/5307: objcopy PE<->EFI doesn't work when both PE/EFI are enabled


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]