Re: aarch64 binaries using nolibc segfault before reaching the entry point

From: Mark Brown
Date: Wed Sep 13 2023 - 15:17:10 EST


On Wed, Sep 13, 2023 at 08:44:59PM +0200, Sebastian Ott wrote:

> the tpidr2 selftest on an arm box segfaults before reaching the entry point.
> I have no clue what is to blame for this or how to debug it but for a
> statically linked binary there shouldn't be much stuff going on besides the
> elf loader?

I did notice this on some systems but didn't manage to reproduce it
interactively and hence debug it yet :/

> After playing around with linker options I found that using -static-pie
> lets the binaries run successful.

...

> All on aarch64 running fedora37 + upstream kernel. Any hints on what could
> be borken here or how to actually fix it?

That suggests that there's some randomisation of the executable location
going on which is triggering the issue... TBH it seems sensible to take
a patch that enables that for now, it's clearly better to get the tests
running more reliably even if we don't fully understand the issue.

Attachment: signature.asc
Description: PGP signature