Re: Ping: [PATCH 0/3] Drop explicit --hash-style= setting for new

From: Xi Ruoyao
Date: Sun Mar 30 2025 - 08:19:18 EST


On Mon, 2025-03-10 at 10:13 +0800, Guo Ren wrote:
> On Wed, Mar 5, 2025 at 9:27 PM Xi Ruoyao <xry111@xxxxxxxxxxx> wrote:
> >
> > Ping.
> >
> > On Mon, 2025-02-24 at 19:20 +0800, Xi Ruoyao wrote:
> > > For riscv, csky, and LoongArch, GNU hash had already become the de-
> > > facto
> > > standard when they borned, so there's no Glibc/Musl releases for them
> > > without GNU hash support, and the traditional SysV hash is just
> > > wasting
> > > space for them.
> > >
> > > Remove those settings and follow the distro toolchain default, which
> > > is
> > > likely --hash-style=gnu.  In the past it could break vDSO self tests,
> > > but now the issue has been addressed by commit
> > > e0746bde6f82 ("selftests/vDSO: support DT_GNU_HASH").
> > >
> > > Xi Ruoyao (3):
> > >   riscv: vDSO: Remove --hash-style=both
> The patch's comment is incorrect; when I removed --hash-style=both,
> the output still contained the HASH, and no space was saved.

The idea is following the distro toolchain default (which can be
configured building binutils).

If the distro toolchain default is gnu, we'll use gnu.

If the distro toolchain default is both, the distro is already wasting
space everywhere for (a) some bizarre applications depending on DT_HASH
for some bizzare reason; or (b) an oversight.

In the case of (a) the bizarre application may needs DT_HASH in vDSO as
well, and in the case of (b) it should be fixed for the entire distro,
not only vDSO, for example what we are doing for AOSC:
https://github.com/AOSC-Dev/aosc-os-abbs/pull/9531

--
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University