This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb/elfread.c: Enable ifunc support on ARM.
- From: Will Newton <will dot newton at linaro dot org>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: Patch Tracking <patches at linaro dot org>
- Date: Tue, 4 Feb 2014 11:28:18 +0000
- Subject: Re: [PATCH] gdb/elfread.c: Enable ifunc support on ARM.
- Authentication-results: sourceware.org; auth=none
- References: <52AF4563 dot 2090304 at linaro dot org> <CANu=DmjN0oFTv1iw_UoZtnGwo-5S+WcJPUT8h_vnCdVhpn6nrg at mail dot gmail dot com>
On 23 January 2014 15:21, Will Newton <will.newton@linaro.org> wrote:
> On 16 December 2013 18:24, Will Newton <will.newton@linaro.org> wrote:
>>
>> There are two failures in the gnu-ifunc.exp test on ARM. These are
>> due to the failure to resolve the correct target function when
>> attempting to breakpoint a GNU ifunc resolved function:
>>
>> (gdb) break gnu_ifunc
>> Breakpoint 4 at gnu-indirect-function resolver at 0x2aacb5a2
>>
>> when gnu_ifunc has been resolved this should actually be:
>>
>> (gdb) break gnu_ifunc
>> Breakpoint 4 at 0x868c
>>
>> There are two reasons for this. The first is that ARM does not have a
>> separate .got.plt section so looking this up will always fail. The second
>> is that the Thumb bit needs to be stripped from the address to allow
>> it to be reliably compared when inserting into the ifunc cache.
>>
>> Tested with no regressions on arm-linux-gnueabihf and
>> x86_64-unknown-linux-gnu.
>>
>> gdb/ChangeLog:
>>
>> 2013-12-16 Will Newton <will.newton@linaro.org>
>>
>> * elfread.c (elf_rel_plt_read): Look for a .got section if
>> looking up .got.plt fails.
>> (elf_gnu_ifunc_resolve_by_got): Call gdbarch_addr_bits_remove
>> on address passed to elf_gnu_ifunc_record_cache.
>> (elf_gnu_ifunc_resolve_addr): Likewise.
>> (elf_gnu_ifunc_resolver_return_stop): Likewise.
>> ---
>> gdb/elfread.c | 10 +++++++++-
>> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> Ping?
Ping?
Despite the subject the contents of this patch are not ARM specific
and change generic functionality.
--
Will Newton
Toolchain Working Group, Linaro