[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
- To: hegdesmailbox@gmail.com
- Subject: Re: Reducing code size of Position Independent Executables (PIE) by shrinking the size of dynamic relocations section
- From: "Sriraman Tallam via gnu-gabi" <gnu-gabi@sourceware.org>
- Date: Mon, 8 May 2017 13:55:40 -0700
- Authentication-results: sourceware.org; auth=none
- Cc: Florian Weimer <fweimer@redhat.com>, David Edelsohn <dje.gcc@gmail.com>, Rafael Avila de Espindola <rafael.espindola@gmail.com>, Binutils Development <binutils@sourceware.org>, Alan Modra <amodra@gmail.com>, Cary Coutant <ccoutant@gmail.com>, gnu-gabi@sourceware.org, Xinliang David Li <davidxl@google.com>, Sterling Augustine <saugustine@google.com>, Paul Pluzhnikov <ppluzhnikov@google.com>, Ian Lance Taylor <iant@google.com>, "H.J. Lu" <hjl.tools@gmail.com>, Rahul Chaudhry <rahulchaudhry@google.com>, Luis Lozano <llozano@google.com>, Peter Collingbourne <pcc@google.com>, Rui Ueyama <ruiu@google.com>, llvm-dev@lists.llvm.org
- Delivered-to: listarch-gnu-gabi@sourceware.org
- Delivered-to: mailing list gnu-gabi@sourceware.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=MMHB4Ukomr8UicohH1JBBM+7GCORfgGsm8m8V0WC4Z0=; b=D26godSDCGAup6Utk6To3T76QvhMWJbnCrJBoGbAY3dIaaRvr1RdhCVogwIeuqLLdG ZD7D/qCWwT35KlMA2iNALAiw4OvAR9Jlyg8Ewjmlzo54Uois6Z3QIt2iBUU9ilDPBmUD ePT4aJqeU7hi3F/pi6MsZ27ByLe0vDPPjHCdXnbSjpkEdGfSRef16lN0MMlCOdQmYWUe 4W2htIskFL0jbMOanTOpOAdHQWrg0S3Rd49rn0PcKDqXeQtPwKuv997kYPMLHqR0p57I sXgN3zzDy7Yw6dhpYyGpiEdz2CoRdhLaIcwrWQJ7fThY1AA4qj42xl7veesbCFcV5Uk/ lLAA==
- In-reply-to: <7e698a5f-32d7-6549-7e23-8850b85e6c10@gmail.com>
- List-help: <mailto:gnu-gabi-help@sourceware.org>
- List-id: <gnu-gabi.sourceware.org>
- List-post: <mailto:gnu-gabi@sourceware.org>
- List-subscribe: <mailto:gnu-gabi-subscribe@sourceware.org>
- Mailing-list: contact gnu-gabi-help@sourceware.org; run by ezmlm
- References: <CAGWvnynFwXFGLj3tAVgDatn0zmuHcWHyRNuDvR+wRZCXLnar_A@mail.gmail.com> <8737cosnym.fsf@localhost.localdomain.i-did-not-set--mail-host-address--so-tickle-me> <CAGWvnynEe3QkhDMGc=Tx8Vr44egtv3xLuh1yiVcAhv+e3GLtZg@mail.gmail.com> <a3e5c76c-8cb9-fc53-a30a-96b2c85079e1@gmail.com> <a68a5d29-09d6-e758-8680-d94f42762adf@redhat.com> <7e698a5f-32d7-6549-7e23-8850b85e6c10@gmail.com>
- Reply-to: Sriraman Tallam <tmsriram@google.com>
- Sender: gnu-gabi-owner@sourceware.org
+llvm-dev
Discussion here: https://sourceware.org/ml/gnu-gabi/2017-q2/msg00000.html
On Tue, May 2, 2017 at 10:17 AM, Suprateeka R Hegde
<hegdesmailbox@gmail.com> wrote:
> 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