|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen stable-4.20] xen: Fix EFI buildid alignment
commit 247be3ab2ba8c953f198d8f986b7b8dca8d2afa6
Author: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
AuthorDate: Tue Nov 25 09:37:28 2025 +0100
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Nov 25 09:37:28 2025 +0100
xen: Fix EFI buildid alignment
Old binutils get confused about .buildid overlapping (in VA space) with
earlier section. That confusion results in weird errors down the road,
like this one:
objcopy: xen.efi: Data Directory size (1c) exceeds space left in
section (8)
While the bug is fixed in later binutils version, force alignment of the
buildid to avoid overlapping and make it work with older versions too.
This can be reverted once toolchain base is raised at or above binutils
2.36.
Details at
https://lore.kernel.org/xen-devel/3TMd7J2u5gCA8ouIG_Xfcw7s5JKMG06XsDIesEB3Fi9htUJ43Lfl057wXohlpCHcszqoCmicpIlneEDO26ZqT8QfC2Y39VxBuqD3nS1j5Q4=@trmm.net/T/#u
Fixes: eee5909e9d1e ("x86/EFI: use less crude a way of generating the build
ID")
Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
master commit: 26b111cc22b7e36ae5d72a17758b3ec6a1156432
master date: 2025-11-20 14:29:57 +0000
---
xen/arch/x86/xen.lds.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index e6c71a8e3e..f13655567a 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -173,6 +173,8 @@ SECTIONS
__note_gnu_build_id_end = .;
} PHDR(note) PHDR(text)
#elif defined(BUILD_ID_EFI)
+ /* Workaround bug in binutils < 2.36 */
+ . = ALIGN(32);
DECL_SECTION(.buildid) {
__note_gnu_build_id_start = .;
*(.buildid)
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.20
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |