mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Fangrui Song <i@maskray.me>
To: musl@lists.openwall.com
Cc: Szabolcs Nagy <nsz@port70.net>
Subject: Re: [musl] DT_PREINIT_ARRAY support
Date: Mon, 26 Feb 2024 14:31:13 -0800	[thread overview]
Message-ID: <DS7PR12MB57659B61839A5406F3743954CB5A2@DS7PR12MB5765.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20240226012508.GC4163@brightrain.aerifal.cx>

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

  reply	other threads:[~2024-02-26 22:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-21 23:33 Fangrui Song
2024-02-26  1:25 ` Rich Felker
2024-02-26 22:31   ` Fangrui Song [this message]
2024-02-27  0:57     ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DS7PR12MB57659B61839A5406F3743954CB5A2@DS7PR12MB5765.namprd12.prod.outlook.com \
    --to=i@maskray.me \
    --cc=musl@lists.openwall.com \
    --cc=nsz@port70.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).