From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Hui Li <lihui@loongson.cn>,
gdb-patches@sourceware.org, Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH v2 RESEND] gdb/elfread.c: Add plt symbol check for _PROCEDURE_LINKAGE_TABLE_
Date: Thu, 18 May 2023 22:38:31 +0800 [thread overview]
Message-ID: <2b32e6bb-ebcb-9002-7812-b79160f65d6a@loongson.cn> (raw)
In-Reply-To: <57010698-8358-ba0d-3e20-b58f72202d66@loongson.cn>
On 5/11/23 19:35, Tiezhu Yang wrote:
>
>
> On 04/10/2023 08:30 PM, Hui Li wrote:
>> In the current code, when execute the following test on LoongArch:
>>
>> $ make check-gdb TESTS="gdb.base/gnu-ifunc.exp"
>> === gdb Summary ===
>>
>> # of expected passes 111
>> # of unexpected failures 62
>>
...
>> With this patch:
>>
>> $make check-gdb TESTS="gdb.base/gnu-ifunc.exp"
>> === gdb Summary ===
>>
>> #of expected passes 173
>>
>> [1] https://sourceware.org/glibc/wiki/GNU_IFUNC
>>
>> Signed-off-by: Hui Li <lihui@loongson.cn>
>> ---
>> gdb/elfread.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/gdb/elfread.c b/gdb/elfread.c
>> index b414da9ed21..1e606783c33 100644
>> --- a/gdb/elfread.c
>> +++ b/gdb/elfread.c
>> @@ -722,6 +722,9 @@ elf_gnu_ifunc_record_cache (const char *name,
>> CORE_ADDR addr)
>> if (len > 4 && strcmp (target_name + len - 4, "@plt") == 0)
>> return 0;
>>
>> + if (strcmp (target_name, "_PROCEDURE_LINKAGE_TABLE_") == 0)
>> + return 0;
>> +
>> htab = elf_objfile_gnu_ifunc_cache_data.get (objfile);
>> if (htab == NULL)
>> {
>>
>
> Hi,
>
> I noticed the following review comments by Tom Tromey [1] on Mar 24:
>
> It would be helpful to know how precisely things go wrong.
> The patch itself seems reasonable enough -- hacky maybe but not out of
> the ordinary way -- but I don't understand how it relates to the
> problem.
> Like, why does ignoring this symbol here affect the results?
>
> Are you OK for this v2 patch with the updated commit message resent on
> Apr 10 [2]? If no more comments, let me push this patch next week.
>
> [1] https://sourceware.org/pipermail/gdb-patches/2023-March/198285.html
> [2] https://sourceware.org/pipermail/gdb-patches/2023-April/198731.html
>
This patch is mainly related with LoongArch and no side effects
on the other archs, pushed.
Thanks,
Tiezhu
next prev parent reply other threads:[~2023-05-18 14:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-10 12:30 Hui Li
2023-04-27 11:44 ` [PING][PATCH " Hui Li
2023-05-11 11:35 ` [PATCH " Tiezhu Yang
2023-05-18 14:38 ` Tiezhu Yang [this message]
2023-05-18 18:01 ` Tom Tromey
2023-05-19 1:34 ` Tiezhu Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2b32e6bb-ebcb-9002-7812-b79160f65d6a@loongson.cn \
--to=yangtiezhu@loongson.cn \
--cc=gdb-patches@sourceware.org \
--cc=lihui@loongson.cn \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).