[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/boot: Explicitly list .{sym,shstr,str}tab in build32.lds.S



commit c05ac8fe306e162fbe60dd33776cd1cd2d303613
Author:     Frediano Ziglio <frediano.ziglio@xxxxxxxxx>
AuthorDate: Tue Nov 5 14:13:43 2024 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Wed Nov 6 13:47:23 2024 +0000

    x86/boot: Explicitly list .{sym,shstr,str}tab in build32.lds.S
    
    Currently, building with LLVM's LLD fails:
    
        ld -melf_i386_fbsd  --orphan-handling=error -N -T ...
        ld: error: <internal>:(.symtab) is being placed in '.symtab'
        ld: error: <internal>:(.shstrtab) is being placed in '.shstrtab'
        ld: error: <internal>:(.strtab) is being placed in '.strtab'
        gmake[11]: *** [arch/x86/boot/Makefile:69: 
arch/x86/boot/built-in-32.base.bin] Error 1
    
    This is a consequence of --orphan-handling, and it appears that Binutils
    doesn't diagnose some orphaned sections even explicitly asked to do so.
    
    List the sections explicitly.
    
    Fixes: aa9045e77130 ('x86/boot: Rework how 32bit C is linked/included for 
early boot')
    Signed-off-by: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/boot/build32.lds.S | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/xen/arch/x86/boot/build32.lds.S b/xen/arch/x86/boot/build32.lds.S
index 9b29f0184f..1e59732edd 100644
--- a/xen/arch/x86/boot/build32.lds.S
+++ b/xen/arch/x86/boot/build32.lds.S
@@ -66,6 +66,15 @@ SECTIONS
        *(.comment.*)
        *(.note.*)
   }
+  .shstrtab : {
+       *(.shstrtab)
+  }
+  .strtab : {
+       *(.strtab)
+  }
+  .symtab : {
+       *(.symtab)
+  }
   /* Dynamic linkage sections.  Collected simply so we can check they're 
empty. */
   .got : {
         *(.got)
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.