From: Tzu-Ching Yang <shingekinocore@gmail.com>
To: Brian Cain <bcain@kernel.org>
Cc: linux-hexagon@vger.kernel.org,
Nathan Chancellor <nathan@kernel.org>,
llvm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: hexagon: allmodconfig does not link with LLVM 17 and 18
Date: Thu, 19 Nov 2026 13:49:08 +0800 [thread overview]
Message-ID: <20261119054908.2988120-1-shingekinocore@gmail.com> (raw)
Hi Brian,
hexagon allmodconfig does not link with LLVM 17 and 18, on mainline
and on stable. Your hexagon-qemu-virt branch has the fix, 09df35bd9d9f
("hexagon: constant-extend head.S calls to out-of-file symbols");
could it go to hexagon-fixes, with Cc: stable?
With CONFIG_WERROR=n, LLVM 17.0.1 (the minimum the kernel supports)
and 18.1.8 fail with:
ld.lld: error: vmlinux.a(arch/hexagon/kernel/head.o):
(.init.text+0xd4): relocation R_HEX_B22_PCREL out of range: 2242552
is not in [-2097152, 2097151]; references '__vmnewmap'
and the same for the second call to __vmnewmap and for the calls to
__vmsetvec and memset. I see it on v7.4-rc1, next-20261113,
hexagon-fixes (0304683b4c43) and v7.3.4; v6.18.63 (LTS) fails with
LLVM 17.0.1 only. With LLVM 19.1.7 to 23.1.3, v7.4-rc1 links.
The calls in stext go from .init.text to .text, across the rest of
.init.text and the per-CPU data. On v7.4-rc1 with LLVM 17.0.1 that is
2.14 MiB; without CONFIG_LOCK_STAT, whose per-CPU data lies in
between, it is 0.76 MiB. ld.lld before 19.1.5 checks R_HEX_B22_PCREL
against 2 MiB instead of 8 MiB, which llvm-project 64e3466fd09e fixed.
09df35bd9d9f does not apply to the trees above: its context has the
"r2 = #VM_TLB_INVALIDATE_TRUE" lines of your series. With its five
changes made by hand:
- allmodconfig links with LLVM 17.0.1 and 18.1.8 on all five trees,
and allyesconfig of v7.4-rc1 with LLVM 18.1.8, which failed too;
- where v7.4-rc1 linked before (defconfig with LLVM 17.0.1 to 23.1.3,
allmodconfig with LLVM 19.1.7 to 23.1.3), vmlinux differs only in
the code of stext, in the address of one local label and in the
build ID.
Those trees do not boot in QEMU, so I boot-tested your branch
(dc370baa041d, v7.3-rc1 plus 24 patches), with 3 MiB of test-only
padding at the end of head.S to make the extended calls span over
3 MiB: qemu_defconfig built with LLVM 17.0.1 and 23.1.3 boots to a
shell on a buildroot root filesystem under qualcomm/qemu hex-next with
-M virt,hvm=on. I have no hexagon hardware.
Rebased onto hexagon-fixes, 09df35bd9d9f applies to v7.3.4 and
v6.18.63 unchanged; I can send the rebased patch if that is easier.
If it helps:
Tested-by: Tzu-Ching Yang <shingekinocore@gmail.com>
Nathan, once the fix is merged, the ClangBuiltLinux CI could build
hexagon allmodconfig with LLVM 17 and 18 again (disabled in
continuous-integration2 d9d773a8859c).
Thanks,
Tzu-Ching
reply other threads:[~2026-11-19 5:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261119054908.2988120-1-shingekinocore@gmail.com \
--to=shingekinocore@gmail.com \
--cc=bcain@kernel.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®