lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAFr9PXkiwBLhiS+8o2gS2AkRXenv9SJRVmQUpidCjAWux+f_tA@mail.gmail.com>
Date: Mon, 2 Feb 2026 06:54:48 +0900
From: Daniel Palmer <daniel@...ngy.jp>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: w@....eu, kees@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 3/9] tools/nolibc: Add basic ELF self-relocation
 support for static PIE

Hi Thomas,

On Mon, 2 Feb 2026 at 01:42, Thomas Weißschuh <linux@...ssschuh.net> wrote:

> > +     /*
> > +      * Everything I could find said that the way to find the base for relocation
> > +      * should be done by searching for the first PT_LOAD and then using the ofset
> > +      * of that against the adressed of the program headers. So FIXME.
> > +      */
> > +     base = phdr_addr - sizeof(elf_ehdr);
>
> What was wrong with AT_BASE?

Apparently AT_BASE is the base of the interpreter
(https://man7.org/linux/man-pages/man3/getauxval.3.html).
I did try it and from what I remember it was 0 on m68k and x86. For
sparc and ppc there seems to be an issue with the address of the
dynamic section calculated from base so on those machines the current
way seems to be wrong either way.

Thank you for all of the other comments. I'll fix those up.

Cheers,

Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ