From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70718 invoked by alias); 11 May 2017 02:31:06 -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 70694 invoked by uid 89); 11 May 2017 02:31:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=Hx-languages-length:2077, meets X-HELO: mail-qk0-f174.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=gCHoWH9pUqXT8WKMGMF9M5Pbw7AJNBhOhHsEpJgHnfo=; b=U9+eNSn2XnTRCMJ4HPUh3O22WyNg8RR9TZEPuczjp4QYx+7OrmnSptDYutgRdqG+cp ErvS/O1OxS1rCdJs5UtJ+x3xqffr+qVVumq3+aHA8ynIm7mhKzwC58SR1pb9slwTqksY 5zecAZd0rS7bMusKaBh0CrKs2w1w+3bryejr9b+wthn9shf/YXPwsk69KX52PABlWcRg 24lSGuiX8+VXUdrw28BBzg+3/KvMLidcF82sClQ1faklUbpnmSWxaThhWfpnKlbIgRbz pjXp6iVuA4nJoRBfBRr4tZ3IX4hiuDOt5khWoQedHCFe6z5NawniWadW5ki8Uluo7i1C rShA== X-Gm-Message-State: AODbwcAJtW8urOqnilHhSVvf5u/1K7GhUHju3O+j2E42mR6wzdwy8geA 9epRtj+xg9HvxdJT X-Received: by 10.55.8.2 with SMTP id 2mr8233652qki.269.1494469864034; Wed, 10 May 2017 19:31:04 -0700 (PDT) Subject: Re: [PATCH] x86: Generate PLT relocations for -z now To: Szabolcs Nagy , "H.J. Lu" , binutils@sourceware.org, GNU C Library Cc: nd@arm.com References: <20170508202153.GA28618@intel.com> <4867456b-ccf6-11fc-55b3-0e914a8c09c3@redhat.com> <5911D84A.6050607@arm.com> From: Carlos O'Donell Message-ID: Date: Thu, 11 May 2017 02:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <5911D84A.6050607@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-05/txt/msg00274.txt.bz2 On 05/09/2017 10:55 AM, Szabolcs Nagy wrote: > On 09/05/17 15:24, Carlos O'Donell wrote: >> On 05/08/2017 04:21 PM, H.J. Lu wrote: >>> >>> This patch partially reverses: >>> >>> commit 25070364b0ce33eed46aa5d78ebebbec6accec7e >>> Author: H.J. Lu >>> Date: Sat May 16 07:00:21 2015 -0700 >>> >>> Don't generate PLT relocations for now binding >>> >>> to support LD_AUDIT and LD_PROFILE with -z now. If there is an existing >>> GOT relocation, it is still used to avoid PLT relocation against the same >>> function symbol. >>> >>> Any comments? >> I'm testing this on x86_64 locally to make sure it meets the needs of the >> Fedora and Red Hat users that are actively making use of LD_AUDIT. >> >> Thanks for looking into this and supporting developer tooling that works >> in binutils 2.25, but broke in 2.26 and onwards. >> > > i don't think plt should be considered to be part of the dso abi, > so removing plt relocs should be safe (making a GOT-indirect call > is a valid optimization, since plt is only there for lazy binding > which is an optimization too, gcc can change plt relocs to noplt > ones without -fno-plt so relying on it was never safe). We have support for LD_AUDIT and LD_PROFILE, along with ltrace tooling, all of which rely on the PLT entries. We need to consider the consequences of these changes on the developer tooling before jumping into such decisions. > Alexander Monakov pointed out to me that ld audit could be fixed > in principle to work with GOT-indirect calls e.g. by generating > its entry point trampolines on the fly. This is exactly the kind of consideration we should be making _before_ we checkin changes that break existing developer tooling that we support. We need not consider this a public ABI aspect, but like we do for ASAN and other tooling we need to consider how glibc changes impact all developers. Underneath the hood all of the toolcain and the developer tooling are working in unison to try deliver something that works. -- Cheers, Carlos.