From: Paul Menzel <hidden> Date: 2021-07-29 08:23:59
Dear Linux folks,
I just wanted to make you aware that building Linux for ppc64le with
clang/lld.ld fails with [1]:
ld.lld: error: can't create dynamic relocation R_PPC64_ADDR64
against symbol: empty_zero_page in readonly segment; recompile object
files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in
the output
>>> defined in arch/powerpc/kernel/head_64.o
>>> referenced by
arch/powerpc/kernel/head_64.o:(___ksymtab+empty_zero_page+0x0)
The patch below from one of the comments [2] fixes it.
From: Paul Menzel <hidden> Date: 2021-08-10 18:39:08
Dear Linux folks,
Am 29.07.21 um 10:23 schrieb Paul Menzel:
quoted hunk
I just wanted to make you aware that building Linux for ppc64le with
clang/lld.ld fails with [1]:
ld.lld: error: can't create dynamic relocation R_PPC64_ADDR64
against symbol: empty_zero_page in readonly segment; recompile object
files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in
the output
>>> defined in arch/powerpc/kernel/head_64.o
>>> referenced by
arch/powerpc/kernel/head_64.o:(___ksymtab+empty_zero_page+0x0)
The patch below from one of the comments [2] fixes it.
Any comments, if this is the right fix? Current Linux master branch
still fails to build with `LLVM=1` on Ubuntu 21.04 without this change.
Kind regards,
Paul
Dear Linux folks,
Am 29.07.21 um 10:23 schrieb Paul Menzel:
quoted
I just wanted to make you aware that building Linux for ppc64le with clang/lld.ld fails with [1]:
ld.lld: error: can't create dynamic relocation R_PPC64_ADDR64 against symbol: empty_zero_page
in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text
relocations in the output
>>> defined in arch/powerpc/kernel/head_64.o
>>> referenced by arch/powerpc/kernel/head_64.o:(___ksymtab+empty_zero_page+0x0)
The patch below from one of the comments [2] fixes it.
From: Paul Menzel <hidden> Date: 2021-08-11 23:10:13
Dear Christophe,
Am 11.08.21 um 16:10 schrieb Christophe Leroy:
Le 10/08/2021 à 20:38, Paul Menzel a écrit :
quoted
Am 29.07.21 um 10:23 schrieb Paul Menzel:
quoted
I just wanted to make you aware that building Linux for ppc64le with
clang/lld.ld fails with [1]:
ld.lld: error: can't create dynamic relocation R_PPC64_ADDR64
against symbol: empty_zero_page in readonly segment; recompile object
files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in
the output
>>> defined in arch/powerpc/kernel/head_64.o
>>> referenced by
arch/powerpc/kernel/head_64.o:(___ksymtab+empty_zero_page+0x0)
The patch below from one of the comments [2] fixes it.
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2021-08-12 05:46:58
Paul Menzel [off-list ref] writes:
Am 29.07.21 um 10:23 schrieb Paul Menzel:
quoted
I just wanted to make you aware that building Linux for ppc64le with
clang/lld.ld fails with [1]:
ld.lld: error: can't create dynamic relocation R_PPC64_ADDR64
against symbol: empty_zero_page in readonly segment; recompile object
files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in
the output
>>> defined in arch/powerpc/kernel/head_64.o
>>> referenced by
arch/powerpc/kernel/head_64.o:(___ksymtab+empty_zero_page+0x0)
The patch below from one of the comments [2] fixes it.
Any comments, if this is the right fix? Current Linux master branch
still fails to build with `LLVM=1` on Ubuntu 21.04 without this change.
Sorry but I have no idea if it's the right fix. What I need is the
author (or someone else) to send a patch with a change log explaining
the change, what it does, why it's right for llvm, and why it's right
for binutils.
cheers