From: Ross Burton <Ross.Burton@arm.com>
To: "Qi.Chen@windriver.com" <Qi.Chen@windriver.com>
Cc: "openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][PATCH V2] lib32-64k-pagesize.inc: add conf for building 32bit binary with 64K alignment
Date: Wed, 8 Jan 2025 17:02:26 +0000 [thread overview]
Message-ID: <7008933E-1611-4683-86A2-083772D4CE71@arm.com> (raw)
In-Reply-To: <20241225030437.972359-1-Qi.Chen@windriver.com>
On 25 Dec 2024, at 03:04, Chen Qi via lists.openembedded.org <Qi.Chen=windriver.com@lists.openembedded.org> wrote:
> When 64K page size is enabled, for 32bit multilib, we'll need to build
> applications with 64K alignment, otherwise, we'll see errors like below at runtime:
>
> root@marvell-cn10xxx:~# /lib/ld-linux-armhf.so.3
> Segmentation fault
>
> marvell-cn10xxx in yocto-kernel-cache enables CONFIG_ARM64_4K_PAGES=y by default.
> And the issue was first discovered there.
Do you mean _64K_PAGES? Where is this marvell-cn100xxx? In yocto-kernel-cache there are no users of arm64-64kb-pages and nothing called cn10xxx. Is this a Wind River-specific fork of yocto-kernel-cache?
> However, there's a kernel config fragment in yocto-kernel-cache which enableds
> 64K page size for arm64: arch/arm/arm64-64kb-pages.scc. So it's easy for other
> arm64 BSPs to enable this. And when they do so, they'll have problem with
> multilib. This patch adds a config file to help people a little bit in such
> situation.
>
> The max-page-size option is used to fix this issue. This option is added
> to both CFLAGS and LDFLAGS for the purpose of covering as many recipes as
> possible.
First, I should point out that changing the page size is an ABI break, and the 32-bit ABI was formalised long before 64kb pages were a thing, so things _will_ break. That said the loader should work, as a decade ago binutils 2.25 changed the alignment to 64kb pages by default:
https://sourceware.org/git/?p=binutils-gdb.git;a=blobdiff;f=ld/emulparams/armelf_linux.sh;h=280db842208e06e3231ec3a8322369193630a07d;hp=35891f1fc91bddd03677aaefd7146ae5333e6cf0;hb=7572ca8989ead4c3425a1500bc241eaaeffa2c89;hpb=8335d6aa34b88ce31b62e1b578d54ab4aa364435
That won’t help specific pieces of software that eg assume the page size is a built-time constant (and use the wrong constant), but helloworld should be good. Can you replicate with pristine poky master and a minimal configuration in a qemu?
Ross
next prev parent reply other threads:[~2025-01-08 17:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-25 3:04 [OE-core][PATCH V2] lib32-64k-pagesize.inc: add conf for building 32bit binary with 64K alignment Qi.Chen
2025-01-08 17:02 ` Ross Burton [this message]
2025-01-08 18:18 ` Ross Burton
2025-01-09 1:54 ` Chen, Qi
2025-01-16 4:34 ` Chen, Qi
[not found] ` <181B122FF6A5F825.28670@lists.openembedded.org>
2025-01-22 3:02 ` ChenQi
2025-01-22 4:18 ` Khem Raj
2025-01-22 4:52 ` ChenQi
2025-01-22 5:01 ` Khem Raj
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=7008933E-1611-4683-86A2-083772D4CE71@arm.com \
--to=ross.burton@arm.com \
--cc=Qi.Chen@windriver.com \
--cc=openembedded-core@lists.openembedded.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