OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Nov 24, 2020 9:20 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Objcopy without EFI targets
PostPosted: Wed Oct 21, 2020 11:09 am 
Offline
Member
Member
User avatar

Joined: Fri Nov 22, 2019 5:46 am
Posts: 432
The GNU-EFI readme writes:
Quote:
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.

It names as an functioning example Objcopy 2.24.
But my version (Objcopy 2.35 on Manjaro Linux) doesn't support EFI targets nor -j wildcards.
Do I have to download and build Objcopy (or Binutils) from source now?

Greetings
Peter

_________________
https://wiki.osdev.org/User:PeterX


Top
 Profile  
 
 Post subject: Re: Objcopy without EFI targets
PostPosted: Wed Oct 21, 2020 12:24 pm 
Offline
Member
Member

Joined: Sat Jul 02, 2016 7:02 am
Posts: 145
objcopy treats efi-app-ia32 as pei-i386, and efi-app-x86_64 as pei-x86-64. If the pei-* strings are listed as supported targets, that should work. Check convert_efi_target inside binutils.

You might know about [1] and [2].

[3] gives details about the 'inner workings'.

Does any part of the build or execution fail?




[1]: https://wiki.osdev.org/Talk:UEFI_Bare_Bones
[2]: https://wiki.osdev.org/GNU-EFI
[3]: https://github.com/vathpela/gnu-efi/blo ... nuefi#L153


Top
 Profile  
 
 Post subject: Re: Objcopy without EFI targets
PostPosted: Wed Oct 21, 2020 12:26 pm 
Online
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 2477
PeterX wrote:
GNU-EFI

There may be an easier way.


Top
 Profile  
 
 Post subject: Re: Objcopy without EFI targets
PostPosted: Wed Oct 21, 2020 12:38 pm 
Offline
Member
Member
User avatar

Joined: Fri Nov 22, 2019 5:46 am
Posts: 432
Octocontrabass wrote:
PeterX wrote:
GNU-EFI

There may be an easier way.

Wow thanks! I have to read that thoroughly, but a quick glance looks promising. :) :)

Greetings
Peter

_________________
https://wiki.osdev.org/User:PeterX


Top
 Profile  
 
 Post subject: Re: Objcopy without EFI targets
PostPosted: Wed Oct 21, 2020 11:39 pm 
Offline
Member
Member

Joined: Wed Apr 01, 2020 4:59 pm
Posts: 27
Clang is great, but I don't recommend using c-efi headers. They are buggy and incomplete. Shouldn't be be difficult to use gnu-efi headers anyway, though; just copy them in and add to your include path. (Gnu efi headers also match the spec more closely, which makes it easier to adapt examples.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group