This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [AArch64] PR18668, Generate long branch veneer if call to plt stub is out of range
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Jiong Wang <jiong dot wang at arm dot com>
- Cc: "binutils\ at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 21 Jul 2015 12:31:01 +0100
- Subject: Re: [AArch64] PR18668, Generate long branch veneer if call to plt stub is out of range
- Authentication-results: sourceware.org; auth=none
- References: <n99pp3sgori dot fsf at arm dot com> <n99oajcgon5 dot fsf at arm dot com>
Jiong Wang <jiong.wang@arm.com> writes:
> +Disassembly of section .plt:
> +
> +.* <foo@plt-0x20>:
> +.*: a9bf7bf0 stp x16, x30, \[sp,#-16\]!
> +.*: 90040090 adrp x16, 8010000 <__foo_veneer\+.*>
> +.*: f941f611 ldr x17, \[x16,#1000\]
> +.*: 910fa210 add x16, x16, #0x3e8
> +.*: d61f0220 br x17
> +.*: d503201f nop
> +.*: d503201f nop
> +.*: d503201f nop
> +
> +.* <foo@plt>:
> +.*: 90040090 adrp x16, 8010000 <__foo_veneer\+.*>
> +.*: f941fa11 ldr x17, \[x16,#1008\]
> +.*: 910fc210 add x16, x16, #0x3f0
> +.*: d61f0220 br x17
> +
> +Disassembly of section .text:
> +
> +.* <_start>:
> + ...
> +.*: 14000003 b 80002c8 <__foo_veneer>
> +.*: d65f03c0 ret
> +.*: 14000007 b 80002e0 <__foo_veneer\+.*>
> +
> +.* <__foo_veneer>:
> +.*: 90fc0010 adrp x16, 0 <foo@plt-0x2b0>
> +.*: 910ac210 add x16, x16, #0x2b0
> +.*: d61f0200 br x16
The code like this will confuse GDB on setting up frames when GDB wants
to step into the function foo. As a result, when we type command "step"
to step into function "foo", GDB stops inferior at somewhere in veneer
by mistake, which is confusing to users.
Once this patch (and other patches similar to this one) go in, we should
tweak GDB frame unwinder to handle them. For avoid of doubt, I don't
mean to ask you to hack GDB, just for a record.
--
Yao (éå)