linker script /arch/arm64/kernel/vmlinux.lds build error

Mohan Rao .vanimina mailtoc.mohanrao at gmail.com
Thu Sep 15 08:40:45 PDT 2022


Thanks for the info. Sorry for this delay in the response.
As suggested I have modified the PAGE SIZE granularity from
ARM64_4K_PAGES to ARM64_64K_PAGES in the applicable config file but
still the build is failing with the same linker error.
Kindly note that the build compilation is successful for the case of
when configuring PAGE size to ARM64_16K_PAGES. Though there is some
issue that the device is crashing at bootup itself, compilation was
getting through without any issues for ARM64_16K_PAGES.
I wonder why the ARM64_64K_PAGES scenario is failing, there must be
some sanity checks at the build integration(kernel build tests) that
would have been caught this linker build issue if indeed it's really a
bug or failed due to some in-complete change.

Also, there is one more question around this topic that is to change
the PAGE granularity size.
I have came across this patch : Add support for large kernel page
https://lwn.net/Articles/822868/
In what way it is different with the already available PAGE SIZE
Configuration implementation. Could you please clarify?
Thank you in advance for the support.

BR/
Mohan




On Wed, Sep 7, 2022 at 4:00 PM Robin Murphy <robin.murphy at arm.com> wrote:
>
> On 2022-09-06 19:13, Mohan Rao .vanimina wrote:
> > Has anyone ever encountered the following issue.
> > Actually I’m trying to configure the page size for 64KB for the AARCH
> > 64 platform.
> >
> > Build error:
> > LTO vmlinux.o
> > MODPOST vmlinux.symvers
> > MODINFO modules.builtin.modinfo
> > GEN modules.builtin
> > LD  .tmp_vmlinux.kallsymsl
> > ld.lld: error: k/arch/arm64/kernel/vmlinux.lds:72: symbol not found: PMD_SIZE
> >
> > I started seeing this build issue after changing the default page size
> > from ARM64_4K_PAGES to ARM64_64K_PAGES.
> >
> > patch:
> > choice
> >              prompt “Page size”
> > -          default ARM64_4K_PAGES
> > +         default ARM64_64K_PAGES
> >              help
> >                   Page size ( translation granule) configuration.
> >
>
> It sounds like you've most likely confused the build system into not
> rebuilding everything that should have been rebuilt. Hacking Kconfig
> sources is not the way to change your configuration; you should do that
> by editing .config, either manually or with tools like scripts/config or
> one of the interactive make targets.
>
> However it looks like you're using LTO, so I guess there's also a chance
> that that could be at fault for failing to properly track some
> dependency that the config change affects. If you can still reproduce
> this behaviour by changing your config normally, it might be worth
> raising it with the Clang folks. FWIW I've never seen any issue
> reconfiguring the page size for GCC builds (without LTO).
>
> Robin.



More information about the linux-arm-kernel mailing list