objcopy with EFI x86_64 support

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

objcopy with EFI x86_64 support

Peter Wiehe
Hello binutils-list-readers,

I'm completely new to building binutils from source.

I'm on a GNU/Linux system (xubuntu 18.04 LTS 64bit).

My goal is to build a version of objcopy that can support EFI x86_64.

I've read that binutils 2.24 have that support. But I can build none of
the 2 snapshots for 2.24 (make fails with errors but I guess for old
versions the exact error messages are not interesting anymore).

And after building building 2.30.0 (with enabling all targets) I found
out that it has NOT efi x86-64 support.

Any suggestion how I can get a objcopy with that support? Should I try
git to get an alternative 2.24 version? I'm not a git expert... Or
should I envoke "./configure" with that target?

Kind regards

Peter Wiehe

Reply | Threaded
Open this post in threaded view
|

Re: objcopy with EFI x86_64 support

Jan Beulich-2
>>> On 06.12.18 at 19:51, <[hidden email]> wrote:
> Hello binutils-list-readers,
>
> I'm completely new to building binutils from source.
>
> I'm on a GNU/Linux system (xubuntu 18.04 LTS 64bit).
>
> My goal is to build a version of objcopy that can support EFI x86_64.
>
> I've read that binutils 2.24 have that support. But I can build none of
> the 2 snapshots for 2.24 (make fails with errors but I guess for old
> versions the exact error messages are not interesting anymore).
>
> And after building building 2.30.0 (with enabling all targets) I found
> out that it has NOT efi x86-64 support.

Whatever "enabling all targets" might mean to you. Have you
tried passing --enable-targets=x86_64-pep to configure? That's
all I've needed in my builds, for quite a long time.

Jan


Reply | Threaded
Open this post in threaded view
|

Re: objcopy with EFI x86_64 support

Peter Wiehe
I have used the option "--enable-targets=all". If this doesn't work why
should the sub-set work? I've tried your suggestion nonetheless but it
didn't produce an objcopy with the desired support.

Thanks anyway
Peter

Jan Beulich <[hidden email]> schrieb am Fr., 7. Dez. 2018 11:34:

> >>> On 06.12.18 at 19:51, <[hidden email]> wrote:
> > Hello binutils-list-readers,
> >
> > I'm completely new to building binutils from source.
> >
> > I'm on a GNU/Linux system (xubuntu 18.04 LTS 64bit).
> >
> > My goal is to build a version of objcopy that can support EFI x86_64.
> >
> > I've read that binutils 2.24 have that support. But I can build none of
> > the 2 snapshots for 2.24 (make fails with errors but I guess for old
> > versions the exact error messages are not interesting anymore).
> >
> > And after building building 2.30.0 (with enabling all targets) I found
> > out that it has NOT efi x86-64 support.
>
> Whatever "enabling all targets" might mean to you. Have you
> tried passing --enable-targets=x86_64-pep to configure? That's
> all I've needed in my builds, for quite a long time.
>
> Jan
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: objcopy with EFI x86_64 support

H.J. Lu-30
On Fri, Dec 7, 2018 at 5:25 AM Peter Wiehe <[hidden email]> wrote:
>
> I have used the option "--enable-targets=all". If this doesn't work why
> should the sub-set work? I've tried your suggestion nonetheless but it
> didn't produce an objcopy with the desired support.

What does your "objcopy --help" say?

--
H.J.
Reply | Threaded
Open this post in threaded view
|

Re: objcopy with EFI x86_64 support

Peter Wiehe
Am 07.12.18 um 15:27 schrieb H.J. Lu:
> On Fri, Dec 7, 2018 at 5:25 AM Peter Wiehe <[hidden email]> wrote:
>> I have used the option "--enable-targets=all". If this doesn't work why
>> should the sub-set work? I've tried your suggestion nonetheless but it
>> didn't produce an objcopy with the desired support.
> What does your "objcopy --help" say?
>
objcopy: Unterstützte Ziele: elf64-x86-64 elf32-i386 elf32-iamcu
elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om
elf64-little elf64-big elf32-little elf32-big pe-x86-64 pe-bigobj-x86-64
pe-i386 plugin srec symbolsrec verilog tekhex binary ihex


Kind regards

Peter

Reply | Threaded
Open this post in threaded view
|

Re: objcopy with EFI x86_64 support

H.J. Lu-30
On Fri, Dec 7, 2018 at 6:31 AM Peter Wiehe <[hidden email]> wrote:

>
> Am 07.12.18 um 15:27 schrieb H.J. Lu:
> > On Fri, Dec 7, 2018 at 5:25 AM Peter Wiehe <[hidden email]> wrote:
> >> I have used the option "--enable-targets=all". If this doesn't work why
> >> should the sub-set work? I've tried your suggestion nonetheless but it
> >> didn't produce an objcopy with the desired support.
> > What does your "objcopy --help" say?
> >
> objcopy: Unterstützte Ziele: elf64-x86-64 elf32-i386 elf32-iamcu
> elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om
> elf64-little elf64-big elf32-little elf32-big pe-x86-64 pe-bigobj-x86-64
> pe-i386 plugin srec symbolsrec verilog tekhex binary ihex

I think EFI x86-64 is supported.  Why do you think it isn't supported?


--
H.J.
Reply | Threaded
Open this post in threaded view
|

Re: objcopy with EFI x86_64 support

Peter Wiehe
Am 07.12.18 um 15:46 schrieb H.J. Lu:

> On Fri, Dec 7, 2018 at 6:31 AM Peter Wiehe <[hidden email]> wrote:
>> Am 07.12.18 um 15:27 schrieb H.J. Lu:
>>> On Fri, Dec 7, 2018 at 5:25 AM Peter Wiehe <[hidden email]> wrote:
>>>> I have used the option "--enable-targets=all". If this doesn't work why
>>>> should the sub-set work? I've tried your suggestion nonetheless but it
>>>> didn't produce an objcopy with the desired support.
>>> What does your "objcopy --help" say?
>>>
>> objcopy: Unterstützte Ziele: elf64-x86-64 elf32-i386 elf32-iamcu
>> elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om
>> elf64-little elf64-big elf32-little elf32-big pe-x86-64 pe-bigobj-x86-64
>> pe-i386 plugin srec symbolsrec verilog tekhex binary ihex
> I think EFI x86-64 is supported.  Why do you think it isn't supported?
>
>
I quote the README from gnu-efi:

.......... quote begin ............

- A version of "objcopy" that supports EFI applications.  To
       check if your version includes EFI support, issue the
       command:

         objcopy --help

       Verify that the line "supported targets" contains the string
       "efi-app-ia32" and "efi-app-x86_64" and that the "-j" option
       accepts wildcards.

............ quote end ............

That's why I assume that it's not supporting it.


Kind regards

Peter

Reply | Threaded
Open this post in threaded view
|

Re: objcopy with EFI x86_64 support

H.J. Lu-30
On Fri, Dec 7, 2018 at 6:52 AM Peter Wiehe <[hidden email]> wrote:

>
> Am 07.12.18 um 15:46 schrieb H.J. Lu:
> > On Fri, Dec 7, 2018 at 6:31 AM Peter Wiehe <[hidden email]> wrote:
> >> Am 07.12.18 um 15:27 schrieb H.J. Lu:
> >>> On Fri, Dec 7, 2018 at 5:25 AM Peter Wiehe <[hidden email]> wrote:
> >>>> I have used the option "--enable-targets=all". If this doesn't work why
> >>>> should the sub-set work? I've tried your suggestion nonetheless but it
> >>>> didn't produce an objcopy with the desired support.
> >>> What does your "objcopy --help" say?
> >>>
> >> objcopy: Unterstützte Ziele: elf64-x86-64 elf32-i386 elf32-iamcu
> >> elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om
> >> elf64-little elf64-big elf32-little elf32-big pe-x86-64 pe-bigobj-x86-64
> >> pe-i386 plugin srec symbolsrec verilog tekhex binary ihex
> > I think EFI x86-64 is supported.  Why do you think it isn't supported?
> >
> >
> I quote the README from gnu-efi:
>
> .......... quote begin ............
>
> - A version of "objcopy" that supports EFI applications.  To
>        check if your version includes EFI support, issue the
>        command:
>
>          objcopy --help
>
>        Verify that the line "supported targets" contains the string
>        "efi-app-ia32" and "efi-app-x86_64" and that the "-j" option
>        accepts wildcards.
>
> ............ quote end ............
>
> That's why I assume that it's not supporting it.
>

See:

https://sourceware.org/bugzilla/show_bug.cgi?id=10074

efi-app-x86_64 is translated to pei-x86_64.

--
H.J.
Reply | Threaded
Open this post in threaded view
|

Re: objcopy with EFI x86_64 support

Peter Wiehe
H.J. Lu <[hidden email]> schrieb am Fr., 7. Dez. 2018 16:55:

> On Fri, Dec 7, 2018 at 6:52 AM Peter Wiehe <[hidden email]> wrote:
> >
> > Am 07.12.18 um 15:46 schrieb H.J. Lu:
> > > On Fri, Dec 7, 2018 at 6:31 AM Peter Wiehe <[hidden email]>
> wrote:
> > >> Am 07.12.18 um 15:27 schrieb H.J. Lu:
> > >>> On Fri, Dec 7, 2018 at 5:25 AM Peter Wiehe <[hidden email]>
> wrote:
> > >>>> I have used the option "--enable-targets=all". If this doesn't work
> why
> > >>>> should the sub-set work? I've tried your suggestion nonetheless but
> it
> > >>>> didn't produce an objcopy with the desired support.
> > >>> What does your "objcopy --help" say?
> > >>>
> > >> objcopy: Unterstützte Ziele: elf64-x86-64 elf32-i386 elf32-iamcu
> > >> elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om
> elf64-k1om
> > >> elf64-little elf64-big elf32-little elf32-big pe-x86-64
> pe-bigobj-x86-64
> > >> pe-i386 plugin srec symbolsrec verilog tekhex binary ihex
> > > I think EFI x86-64 is supported.  Why do you think it isn't supported?
> > >
> > >
> > I quote the README from gnu-efi:
> >
> > .......... quote begin ............
> >
> > - A version of "objcopy" that supports EFI applications.  To
> >        check if your version includes EFI support, issue the
> >        command:
> >
> >          objcopy --help
> >
> >        Verify that the line "supported targets" contains the string
> >        "efi-app-ia32" and "efi-app-x86_64" and that the "-j" option
> >        accepts wildcards.
> >
> > ............ quote end ............
> >
> > That's why I assume that it's not supporting it.
> >
>
> See:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=10074
>
> efi-app-x86_64 is translated to pei-x86_64.
>
> --
> H.J.
>

Ah! Thank you very much. That solves the issue.

Peter

>
Reply | Threaded
Open this post in threaded view
|

Re: objcopy with EFI x86_64 support

Peter Wiehe
In reply to this post by H.J. Lu-30

Am 07.12.18 um 16:54 schrieb H.J. Lu:

> On Fri, Dec 7, 2018 at 6:52 AM Peter Wiehe <[hidden email]> wrote:
>> Am 07.12.18 um 15:46 schrieb H.J. Lu:
>>> On Fri, Dec 7, 2018 at 6:31 AM Peter Wiehe <[hidden email]> wrote:
>>>> Am 07.12.18 um 15:27 schrieb H.J. Lu:
>>>>> On Fri, Dec 7, 2018 at 5:25 AM Peter Wiehe <[hidden email]> wrote:
>>>>>> I have used the option "--enable-targets=all". If this doesn't work why
>>>>>> should the sub-set work? I've tried your suggestion nonetheless but it
>>>>>> didn't produce an objcopy with the desired support.
>>>>> What does your "objcopy --help" say?
>>>>>
>>>> objcopy: Unterstützte Ziele: elf64-x86-64 elf32-i386 elf32-iamcu
>>>> elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om
>>>> elf64-little elf64-big elf32-little elf32-big pe-x86-64 pe-bigobj-x86-64
>>>> pe-i386 plugin srec symbolsrec verilog tekhex binary ihex
>>> I think EFI x86-64 is supported.  Why do you think it isn't supported?
>>>
>>>
>> I quote the README from gnu-efi:
>>
>> .......... quote begin ............
>>
>> - A version of "objcopy" that supports EFI applications.  To
>>         check if your version includes EFI support, issue the
>>         command:
>>
>>           objcopy --help
>>
>>         Verify that the line "supported targets" contains the string
>>         "efi-app-ia32" and "efi-app-x86_64" and that the "-j" option
>>         accepts wildcards.
>>
>> ............ quote end ............
>>
>> That's why I assume that it's not supporting it.
>>
> See:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=10074
>
> efi-app-x86_64 is translated to pei-x86_64.

I'm going to fix the misleading gnu-efi readme. So I have to replace not
only the 64 bit variant, but efi-app-ia32, too, despite the fact that I
don't want to use the 32 bit variant myself. For that goal I've read
that bugzilla file again and again thoroughly, but it escapes me to what
efi-app-ia32 is translated to. I can't dinf a "pei-ia32". Could you,
please, tell me?

Kind regards

Peter Wiehe

Reply | Threaded
Open this post in threaded view
|

Re: objcopy with EFI x86_64 support

H.J. Lu-30
On Fri, Dec 7, 2018 at 12:26 PM Peter Wiehe <[hidden email]> wrote:

>
>
> Am 07.12.18 um 16:54 schrieb H.J. Lu:
> > On Fri, Dec 7, 2018 at 6:52 AM Peter Wiehe <[hidden email]> wrote:
> >> Am 07.12.18 um 15:46 schrieb H.J. Lu:
> >>> On Fri, Dec 7, 2018 at 6:31 AM Peter Wiehe <[hidden email]> wrote:
> >>>> Am 07.12.18 um 15:27 schrieb H.J. Lu:
> >>>>> On Fri, Dec 7, 2018 at 5:25 AM Peter Wiehe <[hidden email]> wrote:
> >>>>>> I have used the option "--enable-targets=all". If this doesn't work why
> >>>>>> should the sub-set work? I've tried your suggestion nonetheless but it
> >>>>>> didn't produce an objcopy with the desired support.
> >>>>> What does your "objcopy --help" say?
> >>>>>
> >>>> objcopy: Unterstützte Ziele: elf64-x86-64 elf32-i386 elf32-iamcu
> >>>> elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om
> >>>> elf64-little elf64-big elf32-little elf32-big pe-x86-64 pe-bigobj-x86-64
> >>>> pe-i386 plugin srec symbolsrec verilog tekhex binary ihex
> >>> I think EFI x86-64 is supported.  Why do you think it isn't supported?
> >>>
> >>>
> >> I quote the README from gnu-efi:
> >>
> >> .......... quote begin ............
> >>
> >> - A version of "objcopy" that supports EFI applications.  To
> >>         check if your version includes EFI support, issue the
> >>         command:
> >>
> >>           objcopy --help
> >>
> >>         Verify that the line "supported targets" contains the string
> >>         "efi-app-ia32" and "efi-app-x86_64" and that the "-j" option
> >>         accepts wildcards.
> >>
> >> ............ quote end ............
> >>
> >> That's why I assume that it's not supporting it.
> >>
> > See:
> >
> > https://sourceware.org/bugzilla/show_bug.cgi?id=10074
> >
> > efi-app-x86_64 is translated to pei-x86_64.
>
> I'm going to fix the misleading gnu-efi readme. So I have to replace not
> only the 64 bit variant, but efi-app-ia32, too, despite the fact that I
> don't want to use the 32 bit variant myself. For that goal I've read
> that bugzilla file again and again thoroughly, but it escapes me to what
> efi-app-ia32 is translated to. I can't dinf a "pei-ia32". Could you,
> please, tell me?
>

Does efi-app-i386 work?

--
H.J.