diff mbox series

[v3,1/4] x86/xen.lds.S: Work around binutils build id alignment bug

Message ID 1maNbi9dxlGrwq08QJuuvznixBLaxtncQfen8KjdEVuQqbIGuqATOOXStaKY7MktWJ5H2tfslm0WIpv6w3SEL4D3uGKkn2hXhAw7TiShMCI=@trmm.net (mailing list archive)
State Superseded
Headers show
Series efi: Unified Xen hypervisor/kernel/initrd images | expand

Commit Message

Trammell Hudson Sept. 7, 2020, 5:46 p.m. UTC
binutils in most distrbutions have a bug in find_section_by_vma()
that causes objcopy round section addresses incorrectly and that
think the .buildid section overlaps with the .rodata.  Aligning the
sections allows these older verisons of the tools to work on the
xen.efi executable image.

Mailing list discussion: https://sourceware.org/pipermail/binutils/2020-August/112746.html

Fixed in: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=610ed3e08f13b3886fd7194fb7a248dee8724685

Signed-off-by: Trammell hudson <hudson@trmm.net>
---
 xen/arch/x86/xen.lds.S | 1 +
 1 file changed, 1 insertion(+)

--
2.25.1
diff mbox series

Patch

diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index 0273f79152..ba691b1890 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -156,6 +156,7 @@  SECTIONS
        __note_gnu_build_id_end = .;
   } :note :text
 #elif defined(BUILD_ID_EFI)
+  . = ALIGN(32); /* workaround binutils section overlap bug */
   DECL_SECTION(.buildid) {
        __note_gnu_build_id_start = .;
        *(.buildid)