public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: davidm@hpl.hp.com
Cc: libc-hacker@sources.redhat.com, hjl@lucon.org
Subject: Re: patch to make init_array work (2nd version; resend)
Date: Thu, 07 Nov 2002 13:31:00 -0000	[thread overview]
Message-ID: <200211072131.gA7LVdj28886@magilla.sf.frob.com> (raw)
In-Reply-To: David Mosberger's message of  Thursday, 7 November 2002 11:43:20 -0800 <15818.49752.477001.832523@napali.hpl.hp.com>

You'll have to forgive me if there is some context I don't have about this
new init-array stuff, which was invented while I was not actively involved. 
Unless Uli answers with specific comments, I will just be figuring out the
issues from scratch myself starting now.

Your dl-fini.c fix is obviously correct and I put that in.

None of the messages I have seen from you or HJ have mentioned what the
problem being fixed by HJ's changes was, so I had to look at the whole
thing for a while to figure out what the point was.  (The arrays are already
processed properly in loaded objects, but not in the executable itself.)
Now that I see the problem, I can at least put in those test cases.

I don't like HJ's implementation, which introduces three new relocs in
libc.so with weak references to symbols defined in crt1.o.  That's just
nasty.  The simple thing would be to pass more arguments to
__libc_start_main, which would require versioning.

But I think that, in keeping with the convention that its own .init/.fini
are the executable's problem, it would be cleanest for the arrays just to
be handled by the existing init/fini functions in the executable.  That is,
have the single function pair it passes (now _init/_fini) do all the work.
My first thought was to just put the code into crti.o/crtn.o, but this code
should not go into shared libraries.

  reply	other threads:[~2002-11-07 21:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-07 11:43 David Mosberger
2002-11-07 13:31 ` Roland McGrath [this message]
2002-11-07 13:51   ` David Mosberger
2002-11-07 13:58     ` Roland McGrath
2002-11-07 14:10       ` David Mosberger
2002-11-07 14:29         ` Roland McGrath
2002-11-07 14:38           ` David Mosberger
2002-11-07 18:10       ` Richard Henderson
2002-11-07 18:20         ` Roland McGrath
2002-11-07 18:30           ` David Mosberger
2002-11-07 18:45             ` Roland McGrath
2002-11-08 11:34 Roland McGrath
2002-11-08 11:38 ` David Mosberger

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=200211072131.gA7LVdj28886@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=davidm@hpl.hp.com \
    --cc=hjl@lucon.org \
    --cc=libc-hacker@sources.redhat.com \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).