[PATCH v2] aarch64: Emit jump slot for conditional branches to weak_undef
Siddhesh Poyarekar
siddhesh@gotplt.org
Sun May 17 03:42:16 GMT 2020
On 16/05/20 16:43, Wilco Dijkstra wrote:
> Hi Siddhesh,
>
> So how does this work if the PLT slot is out of range? Or if the section is larger than
> the maximum range of the conditional branch? It seems to me doing this will create
> new branch range issues.
Not really, the branch range issues were already there. Out of range
targets will generate an error like they do for non-PLT conditional
branches. My understanding is that we do not extend range of
conditional branches by choice. If range extension is desirable for
conditional branches too, I can post that as a follow-up fix. In fact
anything that makes the conditional and unconditional branch behaviour
similar would simplify the code; that includes replacing branches to
weak_undef targets with a NOP.
This patch only makes the behaviour of conditional branches with
non-weak undefined symbols[1] a bit more sane and in line with lld.
Siddhesh
[1] I just noticed I wrote weak_undef in the subject line; that's wrong
and I'll fix that up to just "undefined" before committing.
More information about the Binutils
mailing list