#
f5bb5112 |
| 07-Jul-2023 |
b'Nigel Croxon <allura@localhost> |
Merge /u/gmbr3/gnu-efi/ branch shim into master
https://sourceforge.net/p/gnu-efi/code/merge-requests/61/
|
#
cd786493 |
| 06-Jul-2023 |
Callum Farmer <gmbr3@opensuse.org> |
ARM32: Only use 4K pages
Turns out some linkers have set page size to 64K on ARM32 aswell so apply the same fix as ARM64
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
#
50b27a85 |
| 15-Jun-2023 |
Callum Farmer <gmbr3@opensuse.org> |
ARM32: fix image
- Make it actually work - Split text/data/reloc/rodata sections - Move hash sections to past end of image (un-needed in PE) - Correct section & file alignment - Correct image size
ARM32: fix image
- Make it actually work - Split text/data/reloc/rodata sections - Move hash sections to past end of image (un-needed in PE) - Correct section & file alignment - Correct image size - rename .reloc to .areloc within ELF as only on ARM32 does this name cause it to be marked as REL and subsequently mistakenly added to RELSZ
Builds correctly & tested working in QEMU
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
show more ...
|
#
8abf159d |
| 19-Jun-2023 |
Callum Farmer <gmbr3@opensuse.org> |
Merge .plt into .text
ld writes .plt immediately after .text which corrupts the alignment of .reloc
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
#
b3e80c38 |
| 13-Jun-2023 |
Callum Farmer <gmbr3@opensuse.org> |
Split out rodata
rodata should be split for security
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
#
20110935 |
| 13-Jun-2023 |
Callum Farmer <gmbr3@opensuse.org> |
Clean up size symbols
Tells ld to define them after their markers
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
#
9835e11e |
| 16-May-2023 |
b'Nigel Croxon <allura@localhost> |
Merge /u/gmbr3/gnu-efi/ branch ia32 into master
https://sourceforge.net/p/gnu-efi/code/merge-requests/51/
|
#
9dbfe1c3 |
| 03-May-2023 |
Callum Farmer <gmbr3@opensuse.org> |
Align all ctors/dtors start to 16
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
#
9c5403e1 |
| 30-Apr-2023 |
Callum Farmer <gmbr3@opensuse.org> |
Copy marker names from binutils for init/fini
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
#
e2aa0997 |
| 28-Apr-2023 |
Callum Farmer <gmbr3@opensuse.org> |
lds: Support ctors/dtors with a priority
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
#
4c938fac |
| 28-Apr-2023 |
Callum Farmer <gmbr3@opensuse.org> |
Merge ctors/dtors rela sections
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
#
4f8b339f |
| 28-Mar-2023 |
Peter Jones <pjones@redhat.com> |
Make ELF constructors and destructors work
This makes setup and teardown functions defined with __attribute__((__constructor__) and __attribute__((__destructor__)) work in normal circumstances in EF
Make ELF constructors and destructors work
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>
show more ...
|
#
7ad75d91 |
| 09-Mar-2023 |
Callum Farmer <gmbr3@opensuse.org> |
Ensure objcopy sections are aligned
Ensure the main sections are page aligned: - .text - .reloc - .dynamic - .data - .rel - .rel.plt
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
#
1a10c661 |
| 07-Mar-2023 |
Callum Farmer <gmbr3@opensuse.org> |
Un-merge .rel.plt section
Merging this section causes an incorrect RELASZ value
|
#
330c88aa |
| 07-Mar-2023 |
b'Nigel Croxon <allura@localhost> |
Merge /u/gmbr3/gnu-efi/ branch function-sections into master
https://sourceforge.net/p/gnu-efi/code/merge-requests/38/
|
#
02f96e8a |
| 04-Mar-2023 |
Callum Farmer <gmbr3@opensuse.org> |
*.efi.lds: Add .rel.dyn section
LLVM LLD always calls it .rel[a].dyn no matter what so add this to the .rel[a] section
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
|
#
d78b78cb |
| 22-Feb-2023 |
b'Nigel Croxon <allura@localhost> |
Merge /u/gmbr3/gnu-efi/ branch merge-rela2 into master
https://sourceforge.net/p/gnu-efi/code/merge-requests/37/
|
#
eea6d31a |
| 21-Feb-2023 |
Callum Farmer <gmbr3@opensuse.org> |
*.efi.lds: Merge all rela sections into one
Objcopy sometimes generates .rela.plt and .rela.data sections for which their names are longer than the 8 characters limit of PE32
Signed-off-by: Callum
*.efi.lds: Merge all rela sections into one
Objcopy sometimes generates .rela.plt and .rela.data sections for which their names are longer than the 8 characters limit of PE32
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
show more ...
|
#
637b3bdb |
| 08-Feb-2023 |
Nigel Croxon <ncroxon@redhat.com> |
Author: Callum Farmer <gmbr3@opensuse.org> Date: Tue Feb 7 21:48:27 2023 +0000
ARM32/x86_64 lds: Force data segment align to 4KiB
Some newer versions of binutils can set invalid COMMONPAG
Author: Callum Farmer <gmbr3@opensuse.org> Date: Tue Feb 7 21:48:27 2023 +0000
ARM32/x86_64 lds: Force data segment align to 4KiB
Some newer versions of binutils can set invalid COMMONPAGESIZE and MAXPAGESIZE values on these architectures
git fetch git.code.sf.net/u/gmbr3/gnu-efi arm-pagesize git merge 89d55b364d5f7fb7614e19646e06230ea90dc9c1
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
show more ...
|
#
89d55b36 |
| 07-Feb-2023 |
Callum Farmer <gmbr3@opensuse.org> |
ARM32/x86_64 lds: Force data segment align to 4KiB
Some newer versions of binutils can set invalid COMMONPAGESIZE and MAXPAGESIZE values on these architectures
Signed-off-by: Callum Farmer <gmbr3@o
ARM32/x86_64 lds: Force data segment align to 4KiB
Some newer versions of binutils can set invalid COMMONPAGESIZE and MAXPAGESIZE values on these architectures
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
show more ...
|
#
f7b2e1ff |
| 20-Jan-2023 |
b'Nigel Croxon <allura@localhost> |
Merge /u/gmbr3/gnu-efi/ branch master into master
https://sourceforge.net/p/gnu-efi/code/merge-requests/34/
|
#
231c7632 |
| 29-Dec-2022 |
Callum Farmer <gmbr3@opensuse.org> |
*.efi.lds: Use proper data segment placement
Use ld commands DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
Fixes binutils 2.39 warning: /usr/bin/ld: warning: efi/fwup.so has a LOAD segment with RWX permi
*.efi.lds: Use proper data segment placement
Use ld commands DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
Fixes binutils 2.39 warning: /usr/bin/ld: warning: efi/fwup.so has a LOAD segment with RWX permissions
Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
show more ...
|
#
d39106b3 |
| 25-Feb-2016 |
Nigel Croxon <nigel.croxon@hpe.com> |
Apparently some linkers will just throw caution to the wind and decide to stick stuff we don't explicitly mention at 0, no matter what else has already explicitly been located there. A debian/ubuntu
Apparently some linkers will just throw caution to the wind and decide to stick stuff we don't explicitly mention at 0, no matter what else has already explicitly been located there. A debian/ubuntu builder noted:
gcc -O0 -g3 -fpic -Wall -fshort-wchar -fno-strict-aliasing \ -fno-merge-constants -ffreestanding -fno-stack-protector \ -fno-stack-check --std=c11 -DCONFIG_aarch64 -D__KERNEL__ \ -I/usr/include/efi/ -I/usr/include/efi/aarch64/ \ -iquote/«PKGBUILDDIR»/include "-DDEBUGDIR=L\"/\"" \ -ffreestanding -I/usr/lib/gcc/aarch64-linux-gnu/4.9/include \ -c -o fakeesrt2.o fakeesrt2.c ld -nostdlib --warn-common --no-undefined --fatal-warnings -shared \ -Bsymbolic -L/usr/lib -L/usr/lib --build-id=sha1 \ /usr/lib/crt0-efi-aarch64.o --defsym=EFI_SUBSYSTEM=0xa \ -o fakeesrt2.so fakeesrt2.o -lefi -lgnuefi \ /usr/lib/gcc/aarch64-linux-gnu/4.9/libgcc.a \ -T elf_aarch64_efi.lds ld: section .note.gnu.build-id loaded at [00000000,00000023] overlaps section .text loaded at [00000000,0000668f]
This shouldn't be a problem if we explicitly tell it where to put them.
Ard added a patch to do this on Arm and aarch64 targets in 16409cad4cb, but it needs to be everywhere.
Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
show more ...
|
#
06db4a2b |
| 17-Feb-2016 |
Nigel Croxon <nigel.croxon@hpe.com> |
arm: fix linker script for building efi binaries
On arm, the linker script is missing section collection for data and bss. This causes some symbols (notably static array symbols) not to get relocat
arm: fix linker script for building efi binaries
On arm, the linker script is missing section collection for data and bss. This causes some symbols (notably static array symbols) not to get relocated correctly and the resulting efi binary to crash. Fix this by correctly collecting all the data and bss sections.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
show more ...
|
#
e64257b9 |
| 23-Dec-2015 |
Nigel Croxon <nigel.croxon@hpe.com> |
From: Ard Biesheuvel <ard.biesheuvel@linaro.org> Subject: [PATCH] Add ARM .note.gnu.build-id input section to a dedicated output section
This fixes the builds for ARM and AARCH64, which currently fa
From: Ard Biesheuvel <ard.biesheuvel@linaro.org> Subject: [PATCH] Add ARM .note.gnu.build-id input section to a dedicated output section
This fixes the builds for ARM and AARCH64, which currently fail at link time with an error like this:
arm-linux-gnueabi-ld: section .note.gnu.build-id loaded at [0000000000000000,0000000000000023] overlaps section .text loaded at [0000000000000000,00000000000064cf]
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
show more ...
|