Discussion:
objcopy with EFI x86_64 support
(too old to reply)
Peter Wiehe
2018-12-06 18:51:40 UTC
Permalink
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
Jan Beulich
2018-12-07 10:34:21 UTC
Permalink
Post by 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.
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
Peter Wiehe
2018-12-07 13:25:02 UTC
Permalink
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
Post by Jan Beulich
Post by 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.
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
H.J. Lu
2018-12-07 14:27:43 UTC
Permalink
Post by 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.
What does your "objcopy --help" say?
--
H.J.
Peter Wiehe
2018-12-07 14:31:52 UTC
Permalink
Post by H.J. Lu
Post by 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.
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
H.J. Lu
2018-12-07 14:46:53 UTC
Permalink
Post by Peter Wiehe
Post by H.J. Lu
Post by 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.
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.
Peter Wiehe
2018-12-07 14:52:11 UTC
Permalink
Post by H.J. Lu
Post by Peter Wiehe
Post by H.J. Lu
Post by 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.
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
H.J. Lu
2018-12-07 15:54:46 UTC
Permalink
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
Post by H.J. Lu
Post by 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.
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?
.......... quote begin ............
- A version of "objcopy" that supports EFI applications. To
check if your version includes EFI support, issue the
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.
Peter Wiehe
2018-12-07 16:02:10 UTC
Permalink
Post by Peter Wiehe
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
I have used the option "--enable-targets=all". If this doesn't work
why
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
should the sub-set work? I've tried your suggestion nonetheless but
it
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
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
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
elf64-little elf64-big elf32-little elf32-big pe-x86-64
pe-bigobj-x86-64
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
pe-i386 plugin srec symbolsrec verilog tekhex binary ihex
I think EFI x86-64 is supported. Why do you think it isn't supported?
.......... quote begin ............
- A version of "objcopy" that supports EFI applications. To
check if your version includes EFI support, issue the
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.
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
Peter Wiehe
2018-12-07 20:26:48 UTC
Permalink
Post by H.J. Lu
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
Post by H.J. Lu
Post by 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.
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?
.......... quote begin ............
- A version of "objcopy" that supports EFI applications. To
check if your version includes EFI support, issue the
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.
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
H.J. Lu
2018-12-07 20:28:29 UTC
Permalink
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
Post by H.J. Lu
Post by Peter Wiehe
Post by H.J. Lu
Post by 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.
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?
.......... quote begin ............
- A version of "objcopy" that supports EFI applications. To
check if your version includes EFI support, issue the
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.
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.
Loading...