[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/x86: fix linker script to work with lld
On Tue, Jul 03, 2018 at 06:02:27PM +0200, Daniel Kiper wrote: > On Thu, Jun 28, 2018 at 11:35:24PM -0600, Jan Beulich wrote: > > >>> Roger Pau Monne <roger.pau@xxxxxxxxxx> 06/28/18 5:38 PM >>> > > >lld (the llvm linker) has some issues with Xen linker script. It > > >doesn't understand '||' in assert expressions: > > > > > >ld -melf_x86_64_fbsd -T xen.lds -N prelink.o --build-id=sha1 \ > > >/root/src/xen/xen/common/symbols-dummy.o -o /root/src/xen/xen/.xen-syms.0 > > >ld: error: xen.lds:260: malformed number: | > > >>>> ASSERT(__image_base__ > (((((((((261 >> 8) * 0xffff000000000000) | > > >>>> (261 << 39))) + ((1 << 39) / 2)) + (64 << 30)) + (1 << 30)) + (1 << > > >>>> 30))) || > > >>>> > > >>>> > > >>>> ^ > > > > > >And doesn't work properly with the 'DEFINED(foo) ? foo : ...' > > >expression: > > > > > >ld -melf_x86_64_fbsd -T xen.lds -N prelink.o --build-id=sha1 \ > > >/root/src/xen/xen/common/symbols-dummy.o -o /root/src/xen/xen/.xen-syms.0 > > >ld: error: xen.lds:233: symbol not found: efi > > This smells like lld bug. efi symbol is clearly undefined in prelink.o > (lld does not support i386pep emulation): > > 11147: 0000000000000000 0 NOTYPE GLOBAL HIDDEN UND efi > > However, surprisingly DEFINED() states that it is and ternary operator > fires address calculation from undefined symbol. So, I think that lld > have to be fixed instead of Xen. It should be noted that binutils ld > works without any issue. Yes, I know it's a bug in llvm ld. The '||' issue has already been fixed upstream, and I hope the DEFINED one won't take long to get fixed also. Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |