Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RISC-V objcopy + variable fixes + ARM32 split header #106

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

gmbr3
Copy link
Contributor

@gmbr3 gmbr3 commented Sep 26, 2024

No description provided.

I finally figured out how to best achieve this without breaking GNU ld

* Force code to be at known dest of 4096
* Move _start into .text
* Load the _start symbol address and then minus 4096 to get the load address

This should make the binary more PE32 compatible

Change in ncroxon/gnu-efi#45

Signed-off-by: Callum Farmer <[email protected]>
@gmbr3 gmbr3 force-pushed the gnu-efi-4_0 branch 5 times, most recently from 99b42c8 to b4ea277 Compare September 26, 2024 16:05
@hughsie
Copy link
Member

hughsie commented Sep 27, 2024

FWIW, I'd have no problem hard depending on GNU-EFI 4.0

@gmbr3
Copy link
Contributor Author

gmbr3 commented Sep 28, 2024

FWIW, I'd have no problem hard depending on GNU-EFI 4.0

That would allow us to remove the compat flag for CompareGuid but CI would still need fixes until everyone fixes packaging to have correct variables (me thinks I need to doc it in gnu-efi just in case). Switch to all pkgconfig variables to force this?? (it would be supported by 3.0.18+)

Weirdly, the libdir issue only occurs for me on openSUSE RISC-V likely to do with whatever gcc is returning as the platform directory

@superm1
Copy link
Member

superm1 commented Sep 28, 2024

Switch to all pkgconfig variables to force this?? (it would be supported by 3.0.18+)

I think it's a good idea too, but this PR will probably need to wait to merge until it's released and we'll have CI coverage against it.

@gmbr3
Copy link
Contributor Author

gmbr3 commented Sep 28, 2024

The new packaging info is included in ncroxon/gnu-efi#45
All info included applies to gnu-efi before 4.0 aswell

@gmbr3 gmbr3 marked this pull request as draft November 22, 2024 15:04
@gmbr3 gmbr3 force-pushed the gnu-efi-4_0 branch 4 times, most recently from e0aaaf7 to 1f58e6b Compare November 22, 2024 15:19
* Add system lds file so we can add the SBAT and SBOM sections
* RISC-V requires objcopy 2.42

Change made in ncroxon/gnu-efi@353984b

Signed-off-by: Callum Farmer <[email protected]>
Meson defaults to /usr/local
Set prefix to /usr
Set efi-libdir to /usr/lib on Fedora (until GNU-EFI 4.0 hits)

Signed-off-by: Callum Farmer <[email protected]>
Temporary fix until GNU-EFI 4.0 fixes variable setting

Signed-off-by: Callum Farmer <[email protected]>
@gmbr3 gmbr3 force-pushed the gnu-efi-4_0 branch 3 times, most recently from 1535c1f to a8341bf Compare November 23, 2024 20:06
* Align CRT0 exit function naming
* Push .reloc after .data
* Make our dummy .reloc sections not depend on section order.

Signed-off-by: Callum Farmer <[email protected]>
* In use since 3.0.18 fixes bad detection on RISC-V

Signed-off-by: Callum Farmer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants