public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Tom Kacvinsky <tkacvins@gmail.com>, Binutils <binutils@sourceware.org>
Subject: Re: Question about readelf output from shared library built with lld, gold, and bfd linkers
Date: Mon, 21 Nov 2022 14:14:09 +0000	[thread overview]
Message-ID: <e3fc471d-ec8c-c483-11a7-3f291ffa89ce@redhat.com> (raw)
In-Reply-To: <CAG_eJLegYHgpsj_WyQE8cETDxQcfe74jQgiso4_tPjZ73phNnQ@mail.gmail.com>

Hi Tom,

> Isee the following output from readelf for the lld, gold and bfd linkers
> (binutils 2.39, lld 14.0.6)

To be clear - this is not a readelf problem.  It is showing you the correct
results.  It is the fact that the three linkers are not producing identical
output and instead showing slight variations in their layout of the linked
binary that is bothering you, yes ?

In general variations in the layout like this should not make any difference
to the program#s startup time.  There might - possibly - be variations in
performance due to affects like cache misses and the like, but this is hard
to quantify in isolation.


> Output below.  Notice how the ordering is different in each case.  The
> interesting thing about this is, and why I am looking at various
> differences between object code linked by these three linkers, is that I am
> trying to track down why startup times are slower due to relocations (based
> on the perf tool output).  Would any of these differences make, well, a
> difference in startup time?

I don't think so.  The number of relocations is the same, so the amount
of start up time spent resolving them should effectively be the same as
well.

I assume that you have compared started up times when linking with "-z now"
vs "-z lazy" ?

Cheers
   Nick


  reply	other threads:[~2022-11-21 14:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-20 16:37 Tom Kacvinsky
2022-11-21 14:14 ` Nick Clifton [this message]
2022-11-21 14:51   ` Tom Kacvinsky
2022-11-21 15:16     ` Nick Clifton
2022-11-21 15:33       ` Tom Kacvinsky
2022-11-21 16:48         ` Nick Clifton
2022-11-21 17:43           ` Tom Kacvinsky
2022-11-22 11:20             ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3fc471d-ec8c-c483-11a7-3f291ffa89ce@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=tkacvins@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).