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

Cary Coutant ccoutant@google.com
Fri Aug 24 17:44:00 GMT 2012


>     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



More information about the Binutils mailing list