Skip to content

ppc64 boot wrapper linking fails with LLD 21.1.7 #2146

@Gelbpunkt

Description

@Gelbpunkt

Hi there, I'm building Linux 6.17.11 for ppc64 (big-endian) and seeing the following error when the boot wrapper is being linked:

+ powerpc64-unknown-linux-musl-ld -m elf32ppc -T arch/powerpc/boot/zImage.lds -Ttext 0x4000000 -z noexecstack -o arch/powerpc/boot/zImage.pseries -Map wrapper.map arch/powerpc/boot/pseries-head.o arch/powerpc/boot/of.o arch/powerpc/boot/epapr.o ./zImage.18795.o arch/powerpc/boot/wrapper.a
powerpc64-unknown-linux-musl-ld: error: section: .dynamic is not contiguous with other relro sections

the same happens not just for pseries, but also e.g. for pmac:

+ powerpc64-unknown-linux-musl-ld -m elf32ppc -T arch/powerpc/boot/zImage.lds -Ttext 0x400000 -z noexecstack -o arch/powerpc/boot/zImage.pmac -Map wrapper.map arch/powerpc/boot/of.o arch/powerpc/boot/epapr.o ./zImage.18796.o arch/powerpc/boot/wrapper.a
powerpc64-unknown-linux-musl-ld: error: section: .dynamic is not contiguous with other relro sections

Just to clarify: powerpc64-unknown-linux-musl-ld is LLD, my entire toolchain is only LLVM, no GNU binutils or GCC are installed.

I also saw a couple of other errors related to some disallowed relocations against the opal symbol when building with CONFIG_PPC_POWERNV enabled, but disabled it to work around it for now. I can post logs for that as well if it helps.

I was able to build 6.17.8 with LLVM 21.1.5 a few weeks ago just fine, so there's very likely a change in between one of the two that broke.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [ARCH] powerpcThis bug impacts ARCH=powerpc[TOOL] lldThe issue is relevant to LLD linker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions