https://sourceware.org/bugzilla/show_bug.cgi?id=19264

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at sourceware dot org   |amodra at gmail dot com

--- Comment #1 from Alan Modra <amodra at gmail dot com> ---
ld is looping inside ppc64_elf_size_stubs.  With -z relro we have the relro gap
between .got and .plt, and plt call stubs load their plt entry using an offset
from r2.  That means the offset depends on the size of the relro gap.

So on one iteration of stub sizing we have a relatively small relro gap, and
many plt entries can be accessed with a single 16-bit offset.  The plt call
stubs are thus 4 insns long.  That makes the stub section relatively small. 
The next iteration has a larger relro gap due to the smaller stub section. 
This makes 32 of the plt entries no longer accessible with a 16-bit offset and
therefore 5 insns long.  The larger stub section results in a smaller relro gap
and around we go again..

I can see I need to stop shrinking the stub section size after some number of
iterations, but there's another problem too:  The relro gap after .got is a
fallback.  The ideal gap is one at the start of the relro region.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to