This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Gold linker patch to provide plugin support for mapping some text sections to an unique ELF segment.


>     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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]