Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240227005723.GI4163@brightrain.aerifal.cx>
Date: Mon, 26 Feb 2024 19:57:24 -0500
From: Rich Felker <dalias@...c.org>
To: Fangrui Song <i@...kray.me>
Cc: musl@...ts.openwall.com, Szabolcs Nagy <nsz@...t70.net>
Subject: Re: DT_PREINIT_ARRAY support

On Mon, Feb 26, 2024 at 02:31:13PM -0800, Fangrui Song wrote:
> On Sun, Feb 25, 2024 at 5:25 PM Rich Felker <dalias@...c.org> wrote:
> >
> > On Sun, Jan 21, 2024 at 03:33:05PM -0800, Fangrui Song wrote:
> > > There is a DT_PREINIT_ARRAY patch that falls through the cracks:
> > >  https://www.openwall.com/lists/musl/2016/05/17/2
> > > I wonder whether it can be visited again.
> >
> > I looked it over, and I think the latest version dropped the dummy
> > definitions of __preinit_array_start/_end in dynlink.c. Accordig to
> > the text in commit 19caa25d0a8e587bb89b79c3f629085548709dd4, I think
> > they need to be added back. Otherwise it looks reasonable. So maybe
> > with that change it can be merged?
> >
> > Rich
> 
> Commit 19caa25d0a8e587bb89b79c3f629085548709dd4 (2015) says that it
> works around an old (by the standards of 2015) GNU ld bug.
> Do we know what the bug is and how old it is? 2010?
> 
> For practical purposes (compiler-rt uses), it seems the ancient bug
> would be very unlikely to matter, as those ancient binutils would
> unlikely be able to link the programs that need __preinit_array
> feature anyway. (Modern LLVM requires a GCC that is released after
> circa 2018. It's unclear that the GCC versions can work with a
> multi-year older binutils.)

This is not about breaking linking of programs that need
__preinit_array. It breaks linking of libc.so itself.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.