Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 26 Feb 2024 14:31:13 -0800
From: Fangrui Song <>
Cc: Szabolcs Nagy <>
Subject: Re: DT_PREINIT_ARRAY support

On Sun, Feb 25, 2024 at 5:25 PM Rich Felker <> 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:
> >
> > 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.)

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.