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: <libc-alpha@sourceware.org>
Subject: Re: Pending fixes for all-ABIs builds
Date: Wed, 09 Nov 2016 08:18:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1611090817150.8635@digraph.polyomino.org.uk> (raw)
In-Reply-To: <fe75b5dd-3a6f-48a8-6cdc-5b54e1e1f01a@redhat.com>

On Wed, 9 Nov 2016, Florian Weimer wrote:

> On 11/09/2016 12:21 AM, Joseph Myers wrote:
> > On Tue, 8 Nov 2016, Florian Weimer wrote:
> > 
> > > But there's one pre-existing issue I've been wondering about for a while
> > > (along with the s390 maintainers): I don't understand why we have PLT
> > > references to malloc & friends in ld.so.  The malloc implementation there
> > > is
> > > not compliant with the C requirements.  Why is it exported, and why do we
> > > use
> > > GOT indirection to call it?
> > 
> > My understanding is that it's meant to be interposable by a user-provided
> > malloc implementation.  See
> > <https://sourceware.org/ml/libc-alpha/2014-01/msg00719.html>, item 3.
> 
> Does this mean the dynamic linker starts with it's GOT pointer as NULL,
> initializes that to point it to the malloc in elf/dl-minimal.c, and then, once
> libc.so.6 is relocated updates its GOT pointer to point to the malloc in
> libc.so.6?

I don't know the details (beyond what Roland explained, that early 
allocations use ld.so's own malloc, but after interposition none of the 
early allocations should ever be realloced or freed).

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2016-11-09  8:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-07 23:25 Joseph Myers
2016-11-08  8:28 ` Florian Weimer
2016-11-08 23:22   ` Joseph Myers
2016-11-09  8:14     ` Florian Weimer
2016-11-09  8:18       ` Joseph Myers [this message]
2016-11-09  9:01       ` Andreas Schwab
2016-11-09 11:56         ` Florian Weimer
2016-11-09 13:26           ` Andreas Schwab
2016-11-09 13:39             ` Florian Weimer
2016-11-09 13:47               ` Andreas Schwab
2016-11-09 13:52                 ` Florian Weimer
2016-11-09 14:50                   ` Andreas Schwab
2016-11-09 14:54                     ` Florian Weimer
2016-11-09 22:00                       ` Roland McGrath
2016-11-10  7:58                         ` Florian Weimer
2016-11-10  9:28                           ` Andreas Schwab
2016-11-10 16:30                             ` _rtld_global_ro and static dlopen (was: Re: Pending fixes for all-ABIs builds) 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.1611090817150.8635@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).