[llvm-dev] Linking Linux kernel with LLD
George Rimar via llvm-dev
llvm-dev at lists.llvm.org
Fri Feb 17 03:56:13 PST 2017
>I think you can also get DSO with -pie I think, but I don't see that either. This is quite mysterious. I also did a quick look at the >linker script and didn't see anything at first glance that would cause DSO output (can linker scripts even control EType?). The >bootloader might not even look at the EType though.
>-- Sean Silva
It checks if -z noreloc-overflow is available and adds -pie and other flags in that case.
If I comment out this lines:
#LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
# && echo "-z noreloc-overflow -pie --no-dynamic-linker")?
Then as expected bfd linked vmlinux also becomes executable. And it is even still boots for me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev