From: "Maciej W. Rozycki" <macro@wdc.com>
To: Jim Wilson <jimw@sifive.com>
Cc: Florian Weimer <fweimer@redhat.com>,
Alistair Francis <alistair.francis@wdc.com>,
Alistair Francis via Libc-alpha <libc-alpha@sourceware.org>,
Andreas Schwab <schwab@linux-m68k.org>
Subject: Re: [PATCH] Allow memset local PLT reference for RISC-V.
Date: Wed, 1 Jul 2020 01:45:12 +0100 (BST) [thread overview]
Message-ID: <alpine.LFD.2.21.2007010129040.9519@redsun52.ssa.fujisawa.hgst.com> (raw)
In-Reply-To: <CAFyWVaYwb_QANjeZjedNG9WTDWhWdcw6NLpR4NOwVHxRCpSv5g@mail.gmail.com>
On Mon, 29 Jun 2020, Jim Wilson wrote:
> Anyways, if you want to know where the PLT call is coming from, you
> can't rely on the relocs. R_RISCV_CALL_PLT is not necessarily a plt
> call.
If a PLT entry has been created, then the linker must have considered the
symbol referred preemptible, whether legitimately or not.
Rather than scratching one's head I would suggest running the relevant LD
invocation under GDB to find out what really happens there, which may be
as easy as setting a breakpoint on `riscv_elf_finish_dynamic_symbol' with
the right condition on the hash entry so as to stop on `memset' only, and
then working backwards with a watchpoint (on a host system that does not
use ASLR) to find out what sets `h->plt.offset'. There'll be the answer.
HTH,
Maciej
next prev parent reply other threads:[~2020-07-01 0:45 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 21:10 Alistair Francis
2020-06-23 7:19 ` Andreas Schwab
2020-06-24 22:25 ` Alistair Francis
2020-06-25 7:20 ` Florian Weimer
2020-06-25 18:16 ` Vineet Gupta
2020-06-25 18:41 ` Florian Weimer
2020-06-26 3:58 ` Vineet Gupta
2020-06-29 9:11 ` Florian Weimer
2020-06-29 15:58 ` Alistair Francis
2020-06-29 16:00 ` Alistair Francis
2020-06-29 16:18 ` Florian Weimer
2020-06-29 16:11 ` Florian Weimer
2020-06-29 16:15 ` Alistair Francis
2020-06-29 16:30 ` Florian Weimer
2020-06-29 16:25 ` Alistair Francis
2020-06-29 16:39 ` Florian Weimer
2020-06-29 16:39 ` Alistair Francis
2020-06-29 16:53 ` Florian Weimer
2020-06-29 17:01 ` Andreas Schwab
2020-06-29 17:05 ` Florian Weimer
2020-06-29 17:44 ` Andreas Schwab
2020-06-30 0:26 ` Jim Wilson
2020-07-01 0:45 ` Maciej W. Rozycki [this message]
2020-07-10 21:35 ` Alistair Francis
2020-07-10 22:34 ` H.J. Lu
2020-07-12 1:32 ` Maciej W. Rozycki
2020-07-14 2:07 ` RISC-V: `ld.so' fails linking against `libgcc.a' built at `-O0' (was: Re: [PATCH] Allow memset local PLT reference for RISC-V.) Maciej W. Rozycki
2020-07-14 5:21 ` RISC-V: `ld.so' fails linking against `libgcc.a' built at `-O0' Andreas Schwab
2020-07-14 6:27 ` Richard Biener
2020-07-14 9:35 ` Maciej W. Rozycki
2020-08-20 22:39 ` [PATCH] Allow memset local PLT reference for RISC-V Alistair Francis
2020-08-21 10:44 ` Maciej W. Rozycki
2020-08-27 18:31 ` Alistair Francis
2020-09-12 21:51 ` Alistair Francis
2020-06-29 17:00 ` Andreas Schwab
2020-06-29 17:13 ` Florian Weimer
2020-06-29 17:46 ` Andreas Schwab
2020-06-25 0:20 ` Vineet Gupta
2020-06-25 21:27 ` Palmer Dabbelt
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=alpine.LFD.2.21.2007010129040.9519@redsun52.ssa.fujisawa.hgst.com \
--to=macro@wdc.com \
--cc=alistair.francis@wdc.com \
--cc=fweimer@redhat.com \
--cc=jimw@sifive.com \
--cc=libc-alpha@sourceware.org \
--cc=schwab@linux-m68k.org \
/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).