From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127362 invoked by alias); 1 May 2017 18:36:02 -0000 Mailing-List: contact gnu-gabi-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: gnu-gabi-owner@sourceware.org Received: (qmail 126913 invoked by uid 89); 1 May 2017 18:36:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.2 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=(unknown) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 May 2017 18:36:00 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E916CC05B1F2; Mon, 1 May 2017 18:36:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E916CC05B1F2 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E916CC05B1F2 Received: from oldenburg.str.redhat.com (ovpn-116-133.ams2.redhat.com [10.36.116.133]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 418E518993; Mon, 1 May 2017 18:35:57 +0000 (UTC) Subject: Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section To: hegdesmailbox@gmail.com, David Edelsohn , Rafael Avila de Espindola Cc: Binutils Development , Alan Modra , Cary Coutant , Sriraman Tallam , gnu-gabi@sourceware.org, Xinliang David Li , Sterling Augustine , Paul Pluzhnikov , Ian Lance Taylor , "H.J. Lu" , Rahul Chaudhry , Luis Lozano , Peter Collingbourne , Rui Ueyama References: <8737cosnym.fsf@localhost.localdomain.i-did-not-set--mail-host-address--so-tickle-me> From: Florian Weimer Message-ID: Date: Sun, 01 Jan 2017 00:00: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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 01 May 2017 18:36:01 +0000 (UTC) X-IsSubscribed: yes X-SW-Source: 2017-q2/txt/msg00014.txt.bz2 On 05/01/2017 08:28 PM, Suprateeka R Hegde wrote: > So the ratio shows ~96% is RELATIVE reloc. And only ~4% others. This is > not the case on HP-UX/Itanium. But as I said, this comparison does not > make sense as the runtime architecture and ISA are totally different. It could be that HP-UX was written in a way to reduce relative relocations, or that the final executables aren't actually PIC anymore. The amount of C++ code with large vtables could differ as well. Here's a GCC extension proposed which is relevant to producing fully relocatable code with fewer relative relocations: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38295 Florian