public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Cary Coutant <ccoutant@google.com>
To: Sriraman Tallam <tmsriram@google.com>
Cc: Ian Lance Taylor <iant@google.com>, binutils <binutils@sourceware.org>
Subject: Re: [patch] Gold linker patch to provide plugin support for mapping some text sections to an unique ELF segment.
Date: Fri, 24 Aug 2012 17:44:00 -0000	[thread overview]
Message-ID: <CAHACq4oiK_Zwe-0xu8iuBQX+4uwHqtKpDZt-evvC9Gnb37UdBA@mail.gmail.com> (raw)
In-Reply-To: <CAAs8HmwCE61Mex95HWC0+ji1=QrziV7dwpAO0BZZpx0QOY8QhA@mail.gmail.com>

>     I have made all the changes and attached the patch.

@@ -1734,8 +1788,13 @@ Layout::attach_allocated_section_to_segm
        p != this->segment_list_.end();
        ++p)
     {
+      // No need to go through the loop if a unique segment is needed.
+      if (os->is_unique_segment())
+        break;

I'd suggest moving this test outside the for loop. If this condition
is true, there's no point even entering the loop. (I'd hope the
compiler is smart enough to figure that out anyway, but I think it
would be clearer to the reader.

Aside from that and what Ian noted, it looks good to me.

-cary

  parent reply	other threads:[~2012-08-24 17:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-21  0:28 Sriraman Tallam
2012-07-31 17:21 ` Sriraman Tallam
2012-08-03  6:44   ` Cary Coutant
2012-08-10  0:56     ` Sriraman Tallam
2012-08-22 21:41       ` Ian Lance Taylor
2012-08-23  4:14         ` Sriraman Tallam
2012-08-24 17:41           ` Ian Lance Taylor
2012-08-24 17:44           ` Cary Coutant [this message]
2012-08-24 19:01             ` Sriraman Tallam

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=CAHACq4oiK_Zwe-0xu8iuBQX+4uwHqtKpDZt-evvC9Gnb37UdBA@mail.gmail.com \
    --to=ccoutant@google.com \
    --cc=binutils@sourceware.org \
    --cc=iant@google.com \
    --cc=tmsriram@google.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).