Thread (3 messages) 3 messages, 2 authors, 2018-12-01

Re: LLD and CONFIG_RELOCATABLE

From: Nick Desaulniers <hidden>
Date: 2018-12-01 00:25:14

On Fri, Nov 30, 2018 at 2:18 AM Ard Biesheuvel
[off-list ref] wrote:
On Thu, 29 Nov 2018 at 21:50, Nick Desaulniers [off-list ref] wrote:
quoted
Hi Ard,
I'm hitting a few different issues trying to link
CONFIG_RANDOMIZE_BASE=y (KASLR, selects CONFIG_RELOCATABLE) arm64
kernels with LLD (LLVM's linker).  I've filed a bug:
https://bugs.llvm.org/show_bug.cgi?id=39810, and am getting feedback
from various LLVM folks, but thought you might be able to provide more
insights?
The -pie -shared thing can be dropped, I suppose, given that it only
affects debugging of KASLR kernels, and since the patch in question
clearly shows that ld.bfd also changed from ET_DYN to ET_EXEC for PIE
targets, and so it is obviously a gdb issue. So I'll ack a patch that
reverts that.
Thanks! By https://bugs.llvm.org/show_bug.cgi?id=39810#c15, it seems
that -pie can be dropped.  I'll queue that up for a set of patches for
linking arm64 with CONFIG_RELOCATABLE=y and lld once I have it all
working.  I've added your suggested by to that patch, but will wait to
send a series once we've worked through the 3-4 issues.
As for the __efistub_ prefixes, I wonder if we still need that after
1212f7a16af492d59304ba3abccbcc5b5e41423e ("scripts/kallsyms: filter
arm64's __efistub_ symbols")
Thanks for the patch in:
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-November/616512.html

This will simplify things (and uncovered another bug in lld).
So i think discarding sections intended for the loader is the only
remaining issue, and that is something the LLD people will hopefully
fix?
The lld devs and I think so.  Thanks for your help, I appreciate it!
-- 
Thanks,
~Nick Desaulniers

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help