From: Brian Cain <brian.cain@oss.qualcomm.com>
To: Tzu-Ching Yang <shingekinocore@gmail.com>, 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: Re: hexagon: allmodconfig does not link with LLVM 17 and 18
Date: Thu, 19 Nov 2026 09:29:28 -0600 [thread overview]
Message-ID: <93431e17-4d61-465e-8499-e8270fb03a3d@oss.qualcomm.com> (raw)
In-Reply-To: <20261119054908.2988120-1-shingekinocore@gmail.com>
On 11/18/2026 11:49 PM, Tzu-Ching Yang wrote:
> 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 you would do that, that would be great - thanks.
> 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
prev parent reply other threads:[~2026-11-19 15:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 5:49 Tzu-Ching Yang
2026-11-19 15:29 ` Brian Cain [this message]
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=93431e17-4d61-465e-8499-e8270fb03a3d@oss.qualcomm.com \
--to=brian.cain@oss.qualcomm.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 \
--cc=shingekinocore@gmail.com \
/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®