Skip to content

s390 "ld.lld: error: section ... virtual address range overlaps with ..." #1994

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
nathanchance opened this issue Feb 14, 2024 · 1 comment
Closed
Assignees
Labels
[ARCH] s390 This bug impacts ARCH=s390 [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 6.9 This bug was fixed in Linux 6.9 [TOOL] lld The issue is relevant to LLD linker

Comments

@nathanchance
Copy link
Member

When attempting to build ARCH=s390 defconfig with ld.lld (available after llvm/llvm-project@fe3406e) after applying the patches for #1991, #1992, and #1993, there are a series of errors around overlapping virtual address ranges:

$ make -skj"$(nproc)" ARCH=s390 LLVM=1 OBJCOPY=s390x-linux-gnu-objcopy OBJDUMP=s390x-linux-gnu-objdump mrproper defconfig all
...
ld.lld: error: section .ipldata virtual address range overlaps with .head.text
>>> .ipldata range is [0x68, 0x267]
>>> .head.text range is [0x200, 0x102D9]

ld.lld: error: section .head.text virtual address range overlaps with .discard.addressable
>>> .head.text range is [0x200, 0x102D9]
>>> .discard.addressable range is [0x268, 0x337]

ld.lld: error: section .init.text virtual address range overlaps with .parmarea
>>> .init.text range is [0x102DA, 0x105B9]
>>> .parmarea range is [0x10400, 0x1147F]

ld.lld: error: section .ipldata load address range overlaps with .head.text
>>> .ipldata range is [0x68, 0x267]
>>> .head.text range is [0x200, 0x102D9]

ld.lld: error: section .head.text load address range overlaps with .discard.addressable
>>> .head.text range is [0x200, 0x102D9]
>>> .discard.addressable range is [0x268, 0x337]

ld.lld: error: section .init.text load address range overlaps with .parmarea
>>> .init.text range is [0x102DA, 0x105B9]
>>> .parmarea range is [0x10400, 0x1147F]

This is due to orphan section placement differences between GNU ld and LLD. Patch series to address this fully submitted and accepted: https://git.kernel.org/s390/l/acb7c202baa76235ed478043809366e7de1741c2

@nathanchance nathanchance added [BUG] linux A bug that should be fixed in the mainline kernel. [TOOL] lld The issue is relevant to LLD linker [PATCH] Accepted A submitted patch has been accepted upstream [ARCH] s390 This bug impacts ARCH=s390 labels Feb 14, 2024
@nathanchance nathanchance self-assigned this Feb 14, 2024
nathanchance added a commit to nathanchance/continuous-integration2 that referenced this issue Feb 21, 2024
…ee LLVM

With LLVM main, which has the necessary changes to ld.lld and
llvm-objcopy to support s390, and linux-next, which has the necessary
changes to the kernel to support these tools, ARCH=s390 builds cleanly
with LLVM=1. Cut builds that satisfy these conditions over to LLVM=1 so
that regressions with this working setup do not occur.

Link: llvm/llvm-project@fe3406e
Link: llvm/llvm-project@3c02cb7
Link: ClangBuiltLinux/linux#859
Link: ClangBuiltLinux/linux#1991
Link: ClangBuiltLinux/linux#1992
Link: ClangBuiltLinux/linux#1993
Link: ClangBuiltLinux/linux#1994
Link: ClangBuiltLinux/linux#1995
Link: ClangBuiltLinux/linux#1996
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
@nathanchance
Copy link
Member Author

@nathanchance nathanchance added [FIXED][LINUX] 6.9 This bug was fixed in Linux 6.9 and removed [PATCH] Accepted A submitted patch has been accepted upstream labels Mar 15, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
[ARCH] s390 This bug impacts ARCH=s390 [BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 6.9 This bug was fixed in Linux 6.9 [TOOL] lld The issue is relevant to LLD linker
Projects
None yet
Development

No branches or pull requests

1 participant