From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27989 invoked by alias); 2 Sep 2012 19:41:56 -0000 Received: (qmail 27971 invoked by uid 22791); 2 Sep 2012 19:41:55 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-qa0-f48.google.com (HELO mail-qa0-f48.google.com) (209.85.216.48) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 02 Sep 2012 19:41:42 +0000 Received: by qady1 with SMTP id y1so2313471qad.0 for ; Sun, 02 Sep 2012 12:41:41 -0700 (PDT) Received: by 10.224.179.205 with SMTP id br13mr30770323qab.95.1346614901423; Sun, 02 Sep 2012 12:41:41 -0700 (PDT) Received: from pebble.twiddle.home ([173.160.232.49]) by mx.google.com with ESMTPS id k6sm11292506qac.0.2012.09.02.12.41.39 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 02 Sep 2012 12:41:40 -0700 (PDT) Message-ID: <5043B674.1030108@twiddle.net> Date: Sun, 02 Sep 2012 19:41:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: "H.J. Lu" CC: Andreas Krebbel , David Miller , aj@suse.com, libc-alpha@sourceware.org, Binutils Subject: Re: [PATCH] S/390: Fix two issues with the IFUNC optimized mem* routines References: <503E009B.3080302@linux.vnet.ibm.com> <503E3930.5040603@linux.vnet.ibm.com> <20120829.125208.824114683359549094.davem@davemloft.net> <503F14A3.8070801@linux.vnet.ibm.com> <5040CCC6.4030809@twiddle.net> <50423CF8.7000309@twiddle.net> <50427D29.1010205@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-09/txt/msg00015.txt.bz2 On 2012-09-02 07:50, H.J. Lu wrote: > A relax pass won't work properly for x86 without some surgery > since lang_relax_sections is called after bfd_elf_size_dynamic_sections > which calls elf_x86_64_allocate_dynrelocs to allocate GOT entries > and dynamic relocations. After it is done, it is not to easy to undo > the damage. Other targets keep usage counts of GOT entries live throughout relaxation. It becomes easy to adjust the GOT *after* bfd_elf_size_dynamic_sections has been called. Indeed, many targets require this ordering since some of the optimizations applied are true relaxations, and require knowledge of true displacements. And indeed, the reduction in GOT size may enable another relaxation pass, enabling further optimizations to succeed. > This is a separate issue. X86 backends also optimize > TLS relocations. Some compilers generate bad TLS > sequences which lead to corrupted output: > > http://sourceware.org/bugzilla/show_bug.cgi?id=4928 > > But there is no way to turn off the TLS optimization. ... because it was done in the wrong place. An excellent opportunity to move the TLS relaxations to a relaxation pass, wouldn't you agree? r~