[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/19264] [2.26/2.27 Regression] ld hangs (indefinite loop) when bu
From: |
amodra at gmail dot com |
Subject: |
[Bug ld/19264] [2.26/2.27 Regression] ld hangs (indefinite loop) when building util-linux test case on powerpc64le-linux-gnu |
Date: |
Thu, 19 Nov 2015 00:08:43 +0000 |
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.