From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11767 invoked by alias); 2 May 2017 17:17:25 -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 11724 invoked by uid 89); 2 May 2017 17:17:23 -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.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=our X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no 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: mail-io0-f196.google.com Received: from mail-io0-f196.google.com (HELO mail-io0-f196.google.com) (209.85.223.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 May 2017 17:17:22 +0000 Received: by mail-io0-f196.google.com with SMTP id h41so31759948ioi.1; Tue, 02 May 2017 10:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=reply-to:subject:references:to:cc:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=vjLcZ5DWgmSeGI3gVwOAABTK5sUWlhdcXJ1FOo/ZAwU=; b=MEB6Ga2VzSUPP/Sv1cAum/NAvJKQoDdg0ipEJ2vJTlXNNeqiWZs2HbiczVR/Kx+T/3 56iJcEmXSiQ3o/Y/tVFre47qRBs6ZBI/aI0BdUy9UTfsi6c/W92aPTzEd0JSHsgsufho d1SN3h5FVnkt/H/OeEvC4rLauRUsamyHQYPLmkyIRfBGQMTCDTA4sRaRI9IqRqq1wkWe x+satosKGkV0UKSr0I3IIETEHcMKBY/jDuDPWe18DS4JiFcbRCo1OQCPCMi0YVs9QzIi q3vfXRiWFJx2Unbii56q7H7nCF5975qn4Y1Ua9FH719KEpx8qSVZQG+cR3KUnwyfjxZC 5jiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:references:to:cc:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=vjLcZ5DWgmSeGI3gVwOAABTK5sUWlhdcXJ1FOo/ZAwU=; b=n43WcmofoVeUiHy/JC/ODYMlZskXhTK/dUp2qQOg+Jm0d9S+C460YFam+QkIIGF/Va KKYIajAqWji7jAGpvUcdyeO9c5/kE2H6O3tX3fwStk5ldxUL5EcdjGaSIpQzYQcctMwO PgFH8rRSvXBBP2JJkc/1U3wSzHIjzRHkNyBJVgft+56jQCVk1KIoCNveI2z5vwodGrdk lMIXvITJRRTglsZGAXaopX8kzH0EFoPg7h+j7epCB+/Asb0FLqIwDDx+2wCRUs+laEEQ aAMfKGs6PkA/UBpJG+vOf/DduVjCHjILBTrqNBLtEzththAx5YGQ54SwH0CXAlJHQh9F Z/ag== X-Gm-Message-State: AN3rC/7TWKOlkAgBEYKqLvLLjHjhjzHLDp1Clzibo22M7Sj5VDYs8gch kn9S0O+AD/+M9A== X-Received: by 10.202.81.196 with SMTP id f187mr10222825oib.126.1493745443420; Tue, 02 May 2017 10:17:23 -0700 (PDT) Received: from [192.168.1.2] ([103.16.201.114]) by smtp.gmail.com with ESMTPSA id 77sm8420897oti.33.2017.05.02.10.17.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2017 10:17:23 -0700 (PDT) Reply-To: hegdesmailbox@gmail.com Subject: Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section References: <8737cosnym.fsf@localhost.localdomain.i-did-not-set--mail-host-address--so-tickle-me> To: Florian Weimer , 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 From: Suprateeka R Hegde Organization: HEGDESASPECT Message-ID: <7e698a5f-32d7-6549-7e23-8850b85e6c10@gmail.com> Date: Sun, 01 Jan 2017 00:00:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Antivirus: Avast (VPS 170502-0, 02-05-2017), Outbound message X-Antivirus-Status: Clean X-IsSubscribed: yes X-SW-Source: 2017-q2/txt/msg00015.txt.bz2 On 02-May-2017 12:05 AM, Florian Weimer wrote: > 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, Rather, the Itanium runtime architecture itself provides a way to reduce them. > or that the final executables aren't actually PIC anymore. I was referring to shlibs (PIC) on HP-UX and it was implicit in my mind. Sorry for that. I just built a large C++ shlib both on HP-UX/Itanium with our aCC compiler and Linux x86-64 using GCC-6.2. The sources are almost same with only a couple of lines differing between platforms. (HP-UX/Linux) Total: 12224/38311 RELATIVE: 18/6397 I will try to check the reason for such a huge difference in RELATIVE reloc count. It might be useful for this discussion (just a guess) -- Supra