qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static builds on aarch64 ubuntu 22.04


From: Peter Maydell
Subject: Re: static builds on aarch64 ubuntu 22.04
Date: Thu, 12 Jan 2023 11:53:02 +0000

On Thu, 12 Jan 2023 at 11:20, Janne Karhunen <janne.karhunen@gmail.com> wrote:
> Anyone seen this on aarch64 ubuntu 22.04 when doing a static build?
> Broken libc build maybe? Standard -fPIC (and disabled PIE as AFAIK
> those are mutually exclusive) doesn't seem to affect, neither does
> gcc9 -> gcc10 change or even entirely disabled stack protector.


> /usr/lib/gcc/aarch64-linux-gnu/10/../../../aarch64-linux-gnu/libc.a(abort.o):
> in function `abort':
> (.text.unlikely+0x20): relocation truncated to fit:
> R_AARCH64_LD64_GOTPAGE_LO15 against symbol `__stack_chk_guard' defined
> in .data.rel.ro section in
> /usr/lib/gcc/aarch64-linux-gnu/10/../../../aarch64-linux-gnu/libc.a(libc-start.o)
> /usr/bin/ld: (.text.unlikely+0x20): warning: too many GOT entries for
> -fpic, please recompile with -fPIC

Yes, this is a bug with the way your distro has compiled its
static libc.a, which in turn is because the upstream glibc
default was to the wrong thing.

Upstream glibc bug report:
https://sourceware.org/bugzilla/show_bug.cgi?id=29514
Upstream glibc change that fixes this:
https://sourceware.org/git/?p=glibc.git;a=commit;h=51231c469b49fb3837590f40a93f88db9a20bb86

(It's a very small change, if you want to propose it to your
distro as a backport.)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]