From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id E20222505E for ; Tue, 27 Feb 2024 01:57:20 +0100 (CET) Received: (qmail 11415 invoked by uid 550); 27 Feb 2024 00:53:44 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 11365 invoked from network); 27 Feb 2024 00:53:44 -0000 Date: Mon, 26 Feb 2024 19:57:24 -0500 From: Rich Felker To: Fangrui Song Cc: musl@lists.openwall.com, Szabolcs Nagy Message-ID: <20240227005723.GI4163@brightrain.aerifal.cx> References: <20240226012508.GC4163@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] 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 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