[llvm-dev] Linking Linux kernel with LLD
Rui Ueyama via llvm-dev
llvm-dev at lists.llvm.org
Mon Feb 20 23:26:11 PST 2017
Maybe that is https://reviews.llvm.org/D30171.
On Mon, Feb 20, 2017 at 11:16 PM, Dmitry Golovin <dima at golovin.in> wrote:
> Hi,
>
> I can't build the Linux kernel anymore. With the latest kernel source and
> latest LLVM and LLD (with D30163) I can only get this error message when
> linking vmlinux:
>
> ld.lld: error: unable to move location counter backward
>
> Did you have similar errors? How do I get rid of it?
>
> Regards,
> Dmitry
>
>
> 20.02.2017, 17:51, "George Rimar" <grimar at accesssoftek.com>:
>
> And I think current issue with "Kernel panic - not syncing: IO-APIC +
> timer doesn't work!" is also clear.
>
> timer_irq_works(void) never returns 1:
> https://github.com/torvalds/linux/blob/d966564fcdc19e13eb6ba1fbe6b810
> 1070339c3d/arch/x86/kernel/apic/io_apic.c#L1641
>
> I think it happens because of jiffies (http://www.makelinux.net/
> books/lkd2/ch10lev1sec3#ch10fig01)
>
> It should have the same address as jiffies_64:
> https://github.com/torvalds/linux/blob/b66484cd74706fa8681d051840fe4b
> 18a3da40ff/arch/x86/kernel/vmlinux.lds.S#L41
>
> And that is true for BFD linked binary:
> 10595: ffffffff8140b000 8 OBJECT GLOBAL DEFAULT 8 jiffies
> 11730: ffffffff8140b000 8 OBJECT GLOBAL DEFAULT 8 jiffies_64
>
> But something is wrong with them for LLD case:
> 6422: ffffffff8140b000 8 OBJECT GLOBAL DEFAULT 19 jiffies
> 7416: ffffffff81400000 0 NOTYPE GLOBAL DEFAULT 19 jiffies_64
>
> I think we probably incorrectly assign symbols outside SECTIONS
> declarations in scripts. Looking at it.
>
> George.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170220/a3bf01d7/attachment.html>
More information about the llvm-dev
mailing list