[PATCH] D37517: [ELF] - Report orphan sections if -verbose given.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 02:23:11 PDT 2017


>Turns out we still can't link the linux kernel:
>
>error: ./arch/x86/kernel/vmlinux.lds:652: unable to evaluate expression: input section .head.text has no output section assigned

That is about following line as far I can remember:
"phys_startup_64 = ABSOLUTE(startup_64 - 0xffffffff80000000);"
Issue happened because startup_64 was used before .text section it resides in was declared,
I had just to move this line after output section declaration.

>error: ./arch/x86/kernel/vmlinux.lds:871: at least one side of the expression must be absolute
>

That should be about something like
"init_per_cpu__gdt_page = gdt_page + __per_cpu_load";

I fixed it as:
init_per_cpu__gdt_page = gdt_page + ABSOLUTE(__per_cpu_load);

I had no chance to test these fixes properly though.

>I will open a bug for that. In any case, I think this LGTM since we
>really don't expect too many orphan sections.
>
>Cheers,
>Rafael

George.


More information about the llvm-commits mailing list