public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: Evolution of ELF symbol management
Date: Wed, 26 Oct 2016 12:17:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1610261208250.3082@digraph.polyomino.org.uk> (raw)
In-Reply-To: <2e86a3a6-3ad3-6834-4c6c-64836a956dbd@redhat.com>

Further consideration of the __libc_* approach:

There are some cases that should never need public aliases: (a) ISO C90 
functions (no aliases needed unless called from macros defined in system 
headers - such macros should properly call C90 functions by aliases in 
case they are shadowed by local variables in the function calling the 
macro; the function names are reserved with file scope / external linkage, 
but not as local variable names); (b) obsolete functions (even if we still 
support linking with a deprecated function because it's in an older 
standard we support, we could say namespace-clean use of it isn't 
supported); (c) if multiple public functions are or should be aliased to 
each other, e.g. for long double = double, we could have just one __libc_* 
alias between them.

> Maybe we need to take a step back and ask ourselves if we should use symbol
> versioning to address this.  The two blockers I know of are purely static
> links, and the design decision (no doubt for backwards compatibility) to
> interpose versioned symbols with unversioned symbols. The latter is difficult
> to address, but if we could make the change somehow, it would enable a nice
> performance boost in the dynamic linker, too.  But it certainly looks like
> that for the static link case, we only have the header files we can tweak to
> achieve what we want.

And symbol versioning cannot help with the API issue of C++ compilations 
being forced to use _GNU_SOURCE because much of the libstdc++ 
implementation is in the headers and wants to use libc features outside 
the libc subset defined in the C++ standard.  That requires public API 
aliases for lots of functions (maybe for constants, types etc. as well).

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2016-10-26 12:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18  9:26 Florian Weimer
2016-10-18 16:50 ` Joseph Myers
2016-10-25 14:32   ` Florian Weimer
2016-10-25 15:37     ` Joseph Myers
2016-11-21 15:35       ` Florian Weimer
2016-10-26 12:17     ` Joseph Myers [this message]
2016-11-20 11:13     ` Mike Frysinger
2016-11-21 10:12       ` Florian Weimer
2016-11-16 15:55 ` Zack Weinberg
2016-11-18 15:48   ` Florian Weimer
2016-11-19 17:25     ` Zack Weinberg
2016-11-22 15:09       ` Florian Weimer
2016-11-22 15:30         ` Andreas Schwab
2016-11-22 15:39           ` Florian Weimer
2016-11-22 15:48             ` Zack Weinberg
2016-11-22 15:48               ` Zack Weinberg
2016-11-22 17:42         ` Joseph Myers
2016-11-23 14:09         ` Zack Weinberg
2016-11-24 10:01           ` Florian Weimer

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=alpine.DEB.2.20.1610261208250.3082@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /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).