[PATCH] arm: Enable static-pie support (BZ 34098)

정재윤/Task Leader/SW Platform(연)선행Platform개발실 Lightweight System Task jaeyoon.jung@lge.com
Wed Apr 29 13:01:19 GMT 2026


> From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
> Sent: Wednesday, April 29, 2026 21:36
> To: Yury Khrustalev <yury.khrustalev@arm.com>
> Cc: libc-alpha@sourceware.org <libc-alpha@sourceware.org>; 정재윤/Task Leader/SW Platform(연)선행Platform개발실 Lightweight System Task <jaeyoon.jung@lge.com>; Sam James <sam@gentoo.org>
> Subject: Re: [PATCH] arm: Enable static-pie support (BZ 34098)
>  
> 
> 
> On 29/04/26 07:00, Yury Khrustalev wrote:
> > On Fri, Apr 24, 2026 at 10:49:23AM -0300, Adhemerval Zanella wrote:
> >> It requires proper gcc support [1], and without proper compiler support
> >> the arm configure disable static-pie support.
> >>
> >> The start.S requires some adjustment to avoid loading main from
> >> the GOT.
> >>
> >> Checked on arm-linux-gnueabihf with and without the gcc patch applied.
> >
> > Could you share how you tested it? Perhaps it makes sense to add a test
> > that is supposed to link successfully as a static PIE?
> 
> The easiest way to check the static-pie is to bootstrap a toolchain with
> the gcc patch, otherwise you will need to hack glibc testing to pass the
> same flags when -static-pie is used.
> 

In my case, I verified it in my Yocto build system with two patches applied
to the corresponding recipes in oe-core. The test result was successful as
shared in https://sourceware.org/bugzilla/show_bug.cgi?id=34098.
I'm also considering to send those patches to oe-core once this patch gets
accepted and merged.


Best regards,
---
Jaeyoon Jung
Software Platform Lab. / Corporate R&D / LG Electronics Inc.


More information about the Libc-alpha mailing list