From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28258 invoked by alias); 9 Nov 2016 08:14:22 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 28241 invoked by uid 89); 9 Nov 2016 08:14:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:991 X-HELO: mx1.redhat.com Subject: Re: Pending fixes for all-ABIs builds To: Joseph Myers References: <35e9c513-c873-3d7e-38e4-6aa14e9ef245@redhat.com> Cc: libc-alpha@sourceware.org From: Florian Weimer Message-ID: Date: Wed, 09 Nov 2016 08:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-11/txt/msg00317.txt.bz2 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 > , 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? If that's true, maybe a comment explaining all this in elf/dl-minimal.c would be helpful. Thanks, Florian