| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
https://sourceforge.net/p/gnu-efi/code/merge-requests/51/
|
| |
| |
| |
| | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| |
| |
| |
| | |
* Make entry.c work correctly in reverse order
* Remove incorrectly sized (on non-32bit) NULLs from ctors.S
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| |
| |
| | |
fini_array is 65535 to 0 but stored 0 to 65535
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Store forwards, run backwards (65535 to 0)
Ref: https://github.com/bminor/binutils-gdb/blob/5a8e7e1332c35d4d5bed67adccd9d66f5cf62c4e/ld/scripttempl/elf.sc#L310
Ref: https://sourceware.org/binutils/docs/ld/Input-Section-Wildcards.html
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| |
| |
| |
| | |
It is needed to avoid ELF reloc (rela) issues and
to find un-merged reloc sections
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Seems to not be correct at the moment, causes errors.
error: expected the entry size
.section .fini_array, "aM", @fini_array
Change per
https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/specialsections.html
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| |
| |
| | |
--std isn't standardised. lol.
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
| |
| |
| | |
This reverts commit fe76d597a9b85f8af55235dd41722abf8fe63ca1.
|
|/
|
|
|
|
|
|
|
|
|
| |
Since commit [4f8b339facb471192e021fffd5db545a0fbddbc3]
Simple EFI tools like for example t.c from the apps directory crash.
The reason seems to be a wrong null-pointer check in the
ctors()/dtors() functions in lib/entry.c.
sourceforge.net/u/davemueller
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
|
| |
|
|
|
|
|
|
|
|
| |
There is no small data section on ia32,
this ends up being created as ld puts .got/.got.plt
here due to first declaration
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
|
|
|
|
|
|
| |
Causes an error when using strict ISO modes as
then asm isn't defined
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| |
|
|\
| |
| |
| | |
https://sourceforge.net/p/gnu-efi/code/merge-requests/49/
|
| |
| |
| |
| | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
|\ \
| | |
| | |
| | | |
https://sourceforge.net/p/gnu-efi/code/merge-requests/48/
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'void' is a type so VOID can be typedef instead of
a '#define' to improve compiler output
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And actually use wchar_t
gnu-efi already uses L string literals which are of type
wchar_t
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
|\ \ \
| | | |
| | | |
| | | | |
https://sourceforge.net/p/gnu-efi/code/merge-requests/47/
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
It has characters from 0 to 256 so this requires
an unsigned 8 bit value
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
|\ \ \
| | | |
| | | |
| | | | |
https://sourceforge.net/p/gnu-efi/code/merge-requests/46/
|
| |/ /
| | |
| | |
| | | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
|\ \ \
| | | |
| | | |
| | | | |
https://sourceforge.net/p/gnu-efi/code/merge-requests/45/
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also add EXEC_PREFIX and INCLUDEDIR variables
This was requested by fwupd-efi, to be able
to retrieve the version number of gnu-efi
so we can detect features
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
|\ \ \
| |_|/
|/| |
| | | |
https://sourceforge.net/p/gnu-efi/code/merge-requests/33/
|
| | |
| | |
| | |
| | |
| | |
| | | |
See https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#machine-types
Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
|
|\ \ \
| | | |
| | | |
| | | | |
https://sourceforge.net/p/gnu-efi/code/merge-requests/43/
|
| | |/
| |/|
| | |
| | | |
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Right now whenever we have shell commands with loops, errors in the
middle are accidentally ignored, and make continues to process commands.
This adds 'set -e' to all of those, so they'll propagate back up.
Signed-off-by: Peter Jones <pjones@redhat.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes us use CFLAGS when trying to find libgcc, so we don't get the
one with the wrong endian or float ABI.
Signed-off-by: Peter Jones <pjones@redhat.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes the normal DESTDIR= variable work on the command line, and
makes relative paths always relative to the top-level directory.
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|/ /
| |
| |
| | |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes setup and teardown functions defined with
__attribute__((__constructor__) and __attribute__((__destructor__)) work
in normal circumstances in EFI binaries.
A couple of notes:
- it implements both the old-style .ctors/.dtors methods and the newer
style .init_array/.fini_array ELF constructor and destructor arrays,
processed in the order:
.init_array[]
.ctors[]
efi_main()
.dtors[]
.fini_array[]
- Destructors will only be called if efi_main() exits using "return";
any call to Exit() will still longjmp() past them.
- InitializeLib() has already been called before constructors run, so
they don't need to call it (and neither does anything else.) For
compatibility, it has been altered so calling it more than once is
safe.
- No attempt is made to handle any constructor or destructor with a
prototype other than "void func(void);", but note that InitializeLib
has been called, so LibImageHandle, ST, BS, and RT are set.
- The init_array/ctor/dtor/fini_array lists aren't the using the GNU
"CONSTRUCTOR" output section command, so they don't start with a size.
- The lists are individually sorted during the link stage via
SORT_BY_NAME() in the linker script.
- The default (empty) init_array/ctor/dtor/fini_array lists are padded
out to 8-byte alignment with ".p2align 3, 0", and each list always has
at least one ".long 0" at the end of it (even if it's completely
empty). As a result, they can have NULLs that need to be skipped.
The sections they're in are mergeable, so the NULLs don't have to be
exclusively at the end.
- The ia64 and mips64el arches have not been tested.
Signed-off-by: Peter Jones <pjones@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
This is ascii order but with upper and lower case letters mixed, so
things like 'X' and 'x' that use fallthrough still stay together.
Signed-off-by: Peter Jones <pjones@redhat.com>
|
| |
| |
| |
| | |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
| |
| |
| |
| |
| |
| | |
This was added in dae0b4b0b0d522caecf09123db2cf0250c37a169.
Signed-off-by: Peter Jones <pjones@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Coverity added a new kind of check, and it noticed some minor errors
with some types in two of the apps here, both of the same form:
1. gnu-efi-3.0.6/apps/lfbgrid.c:91: overflow_before_widen: Potentially
overflowing expression "info->VerticalResolution *
info->PixelsPerScanLine" with type "unsigned int" (32 bits, unsigned) is
evaluated using 32-bit arithmetic, and then used in a context that
expects an expression of type "UINTN" (64 bits, unsigned).
1. gnu-efi-3.0.6/apps/bltgrid.c:67: overflow_before_widen: Potentially
overflowing expression "info->VerticalResolution *
info->HorizontalResolution" with type "unsigned int" (32 bits, unsigned)
is evaluated using 32-bit arithmetic, and then used in a context that
expects an expression of type "UINTN" (64 bits, unsigned).
This resolves both issues.
Signed-off-by: Peter Jones <pjones@redhat.com>
|
| | |
|
|\ \
| | |
| | |
| | | |
https://sourceforge.net/p/gnu-efi/code/merge-requests/42/
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add keyword KEEP to prevent .reloc being removed
when using --gc-sections with GNU ld
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|