Commit Graph

508 Commits

Author SHA1 Message Date
Nigel Croxon
9276df8219
Merge pull request #49 from gmbr3/v4_0
Fixes for segment mapping error
2024-10-31 08:30:54 -04:00
Callum Farmer
aa58dc8ff1
Remove label1
No longer needed

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-10-30 11:13:49 +00:00
Callum Farmer
03bfe2f5ce
Push .reloc after .data
Seems GNU ld is a bit stupid in this regard
Apply to all archs incase this is repeated so far
only seen on ARM64

Fixes ncroxon/gnu-efi#47

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-10-28 15:52:57 +00:00
Callum Farmer
882df4e732
ia32 local: Remove accidental rela
REL not RELA

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-10-24 12:33:00 +01:00
Callum Farmer
40b0203116
ia32 local: Rename reloc to areloc
* Similar to ARM32, this triggers a GNU AS section parameters warning if called reloc
* This breaks IA32 objcopy due to .reloc lookup

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-10-24 12:33:00 +01:00
Callum Farmer
ae94e383a3
Make our dummy .reloc sections not depend on section order.
Currently on x64 we manually build a dummy .reloc table entry by using a
symbol in .text and subtracting its address from another symbol that's
inside the .reloc section.  On ia32 we just use its location.  In either
case, if the linker puts either section in a location we're not
expecting, the .reloc table winds up having invalid values, and the PE
loader will fail to load the binary.

This changes it to be two symbols that are both in .text, making the
result unrelated to the section order or location.

It's not clear to me that these .reloc entries are actually necessary at
all, but I'm going to leave them in place for now, in case they are.

Ref: rhboot/gnu-efi@9fb55dee2b
Co-authored-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-10-24 12:33:00 +01:00
Nigel Croxon
70b1421107
Merge pull request #45 from gmbr3/v4_0
Docs change + Fix some CRT0 symbols
2024-10-10 08:20:30 -04:00
Callum Farmer
57e8966b5d
Add packaging guide
Files have been ending up in differing places between distros - this is an attempt to fix this

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-28 18:10:11 +01:00
Callum Farmer
aa2ad0329b
Fix calling of gnuefi install with local lds
* Local lds wasn't being installed on RISC-V

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-24 14:24:03 +01:00
Callum Farmer
21ea877a01
IA32 local: Fix up crt0 symbols
* This should use a fully split version of the CRT0 not the old ARM un-split version

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-24 13:28:41 +01:00
Callum Farmer
e9b6ac7126
ARM64 local: Remove NR_SECTIONS
* NR_SECTIONS is part of the crt0 generator for fwupd-efi
* This isn't implemented here

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-24 13:28:41 +01:00
Callum Farmer
24a4cd0e56
ARM32: Split headers and code
* 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

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-24 13:28:41 +01:00
Callum Farmer
57d2e370d8
Add more detail to ABI notice
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-24 13:28:41 +01:00
Callum Farmer
aa8151c3d2
Add more notes to GitHub release info
* Just to ensure GitHub doesn't run anyway with the hills

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-24 13:28:41 +01:00
Callum Farmer
b5a7f60a6b
Clarify CompareGuid change
* Update guid.c to display correct output code in description
* Add warning about failure in ABI README

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-24 13:28:40 +01:00
Callum Farmer
e5b75c4482
Remove unused files
* tpause wasn't included in Makefile and is very basic
(also removed from VS references)
* trivial.S doesn't actually use gnu-efi and wasn't built
* Remove make stuff likely intended for Intel make??

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-24 13:28:32 +01:00
Nigel Croxon
c0c9fbb198
Merge pull request #42 from sertonix/usr-bin-env
Replace /bin/env with /usr/bin/env
2024-09-19 07:49:04 -04:00
Nigel Croxon
e5f21388a4
Merge pull request #44 from gmbr3/v4_0
Repo clean up
2024-09-19 07:48:23 -04:00
Callum Farmer
ae2ca1e051
lib: Avoid install dependency on build target
install was depending on libefi.a which can sometimes trigger a project rebuild if make variables change

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-18 17:59:00 +01:00
Callum Farmer
860132349f
Add notice about new subdirectories
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-18 12:52:37 +01:00
Callum Farmer
48c7e47771
Clarify current compiler requirements
Clang+lld now works, looks like MSVC does aswell so update the text

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-18 12:41:02 +01:00
Callum Farmer
79eb20b5d1
Move docs to Markdown
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 16:07:23 +01:00
Callum Farmer
c9edd83549
Update release details for GitHub
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 16:06:44 +01:00
Callum Farmer
34c694069c
Add shared objects to gitignore
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 15:37:19 +01:00
Callum Farmer
9ec31629f5
Remove old ChangeLog
Hasn't been updated in ages and isn't required

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 15:37:18 +01:00
Callum Farmer
632b6b45e3
Move non-main README to separate folder
Create docs subdirectory

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 15:37:18 +01:00
Callum Farmer
618037c0cb
Update GPL-2.0 SPDX notation
GPL-2.0+ is now GPL-2.0-or-later

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 15:37:18 +01:00
Callum Farmer
3e9899b233
Setup Dependabot for GH Actions
Requires 'Dependabot version updates' be enabled on GitHub
2024-09-16 15:37:18 +01:00
Callum Farmer
68101114ce
Add security policy
Requires 'Private vulnerability reporting' be enabled on GitHub
2024-09-16 15:37:18 +01:00
Callum Farmer
dfc27f3416
Re-format README
* Make it look right in Markdown format
* Fix PE32+ spec link

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 15:37:17 +01:00
Callum Farmer
2a3244d2e5
Sort licenses and the main README
* Set main license to GPL-2.0-or-later (seems to be generally)
* Denote efilib license as a license
* Add edk2 license due to files using it

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 15:37:17 +01:00
Callum Farmer
189cf4ec73
Add missed CompareGuid fixup
Missed from ncroxon/gnu-efi@c14705b746

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 15:37:17 +01:00
Callum Farmer
86239d7bdf
Add notice section on the .rodata change
Change made in ncroxon/gnu-efi@262c1f4604

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 15:37:17 +01:00
Callum Farmer
7bf718da57
Add notice about functional changes
* As this may break compilation and cause runtime errors, supply a notice on how to fix it

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-09-16 15:36:12 +01:00
Sertonix
5a36c05277 Replace /bin/env with /usr/bin/env
The correct path for the env binary on systems without a usr-merge is /usr/bin/env

Signed-off-by: Sertonix <sertonix@posteo.net>
2024-09-09 00:25:46 +02:00
Callum Farmer
5aaf99b474
Update some things for v4
* Create macro to detect v4
* Update section info text
* Set version to 4.0.0

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-23 11:46:35 +01:00
Callum Farmer
f505aa71e6
Add missed clean-up for FreeBSD
Missed from ncroxon/gnu-efi@13c46e46a6

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-19 14:00:13 +01:00
Nigel Croxon
5560e57038
Merge pull request #41 from NotsoanoNimus/NotsoanoNimus/feature/add-mp-support
Add MP Services Protocol Support
2024-08-09 09:05:47 -04:00
Zack Puhl
7b409340e4 Add MP Services Protocol Support 2024-08-08 08:31:26 -04:00
Nigel Croxon
b4cde1c031
Merge pull request #40 from gmbr3/v4_0
FreeBSD update + CompareGuid ABI change
2024-08-05 06:56:40 -04:00
Callum Farmer
88f0e1cca8
Update old_ABI test for CompareGuid
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-04 19:23:50 +01:00
Callum Farmer
b23462d47c
Add single option to revert to old ABI
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-04 19:13:32 +01:00
Callum Farmer
81321deb03
Move STATIC to efidef.h
* Allows use in legacy.h

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-03 16:21:38 +01:00
Callum Farmer
c14705b746
Fix up for new CompareGuid
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-03 16:21:38 +01:00
Callum Farmer
a093fe0378
Make CompareGuid match EDK2 ABI
* return BOOLEAN instead of INTN
* Use EFIAPI
* Opposite return codes

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-03 16:21:38 +01:00
Callum Farmer
13c46e46a6
Sync FreeBSD
* Always use objcopy -O (--target doesn't make sense)
  and isn't available on freebsd
* No efi-bsdrv target (but has efi-app)(bug in binutils??)
* Sync linker scripts (all features are supported)
* Use clang as HOSTCC (there is no default gcc)

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-08-03 16:21:00 +01:00
Callum Farmer
3398bf0dd9
Align REL(A) def with GLIBC
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-07-28 15:43:37 +01:00
Callum Farmer
939dffb06f
Allow forcefully ignoring glibc headers on Linux
* Sometimes it may not be available so allow use of the substitute version

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-07-28 15:43:32 +01:00
Nigel Croxon
a5e8881923
Merge pull request #38 from gmbr3/v4_0
Add ix86 and ARM32 MacOS (embedded ELF) CI/CD
2024-07-18 06:57:21 -04:00
Callum Farmer
06320f8fb3
Don't edit the riscv subsystem if using objcopy
* Only needed in binary mode

Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
2024-07-16 14:49:52 +01:00