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
Subject: Re: patch to make init_array work (3nd version)
Date: Mon, 09 Dec 2002 10:52:00 -0000	[thread overview]
Message-ID: <200212090913.gB99DDF04745@magilla.sf.frob.com> (raw)
In-Reply-To: David Mosberger's message of  Wednesday, 27 November 2002 14:35:33 -0800 <15845.18613.38095.974630@napali.hpl.hp.com>

I had not been aware of the difference in behavior for static vs dynamic
executables when making my previous suggestion.  Your change to the calling
convention of the function passed to __libc_start_main would require symbol
versioning of __libc_start_main to avoid creating new executables with the
false appearance of compatibility with existing shared libraries.  It's
also an ugly kludge that there is no need for.

I reimplemented it myself.  I put the functions called from start.S into
libc.a and libc_nonshared.a with different versions for the two cases, so
the correct behavior (calling the executable's preinit array or not) is
selected at link time instead of using a kludge with run-time overhead.  
I also performed the query replace on all the start.S files.  

No patch to the generic code in libc is complete without updating all the
existing sysdeps code, and it is not hard to do a query replace.  For
future contributions that change generic code in ways that necessitate
updating sysdeps code, please include those changes if you expect your
patches to go in as they are or in a timely fashion.


Thanks,
Roland

  parent reply	other threads:[~2002-12-09 18:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08 11:34 patch to make init_array work (2nd version; resend) Roland McGrath
2002-11-08 11:38 ` David Mosberger
2002-11-27 14:35 ` patch to make init_array work (3nd version) David Mosberger
2002-11-27 15:10   ` H. J. Lu
2002-11-27 15:34     ` David Mosberger
2002-12-09 10:52   ` Roland McGrath [this message]
2002-12-09 13:36     ` 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=200212090913.gB99DDF04745@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=davidm@hpl.hp.com \
    --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).