From: "H.J. Lu via Gdb-patches" <gdb-patches@sourceware.org>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: GNU C Library <libc-alpha@sourceware.org>,
Binutils <binutils@sourceware.org>,
"H.J. Lu via Gdb-patches" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] elf: Add -z [dt-debugsz|nodt-debugsz] to emit DT_DEBUGSZ
Date: Sun, 15 Aug 2021 06:48:21 -0700 [thread overview]
Message-ID: <CAMe9rOpfAqdxAD32PGaZBVY3XSFpXnRhmTcBd2DRtp_QVr1dXQ@mail.gmail.com> (raw)
In-Reply-To: <875yw6x2y5.fsf@mid.deneb.enyo.de>
On Sun, Aug 15, 2021 at 6:17 AM Florian Weimer <fw@deneb.enyo.de> wrote:
>
> * H. J. Lu:
>
> > On Sun, Aug 15, 2021 at 5:50 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >>
> >> On Sun, Aug 15, 2021 at 4:55 AM Florian Weimer <fw@deneb.enyo.de> wrote:
> >> >
> >> > * H. J. Lu via Gdb-patches:
> >> >
> >> > > Add -z [dt-debugsz|nodt-debugsz] to emit a DT_DEBUGSZ dynamic tag so
> >> > > that the dynamic linker can set its value to the size of the structure
> >> > > of debugger interface, whose address is stored in the DT_DEBUG dynamic
> >> > > tag, used by the dynamic linker.
> >> >
> >> > I do not think this is necessary. We can increase the version number
> >> > in the existing DT_DEBUG structure.
> >>
> >> Some debuggers expect r_version == 1.
> >
> > GDB has
> >
> > if (linux_read_memory (priv->r_debug + lmo->r_version_offset,
> > (unsigned char *) &r_version,
> > sizeof (r_version)) != 0
> > || r_version != 1)
> > {
> > warning ("unexpected r_debug version %d", r_version);
> > }
> > else if (read_one_ptr (priv->r_debug + lmo->r_map_offset,
> > &lm_addr, ptr_size) != 0)
> > {
> > warning ("unable to read r_map from 0x%lx",
> > (long) priv->r_debug + lmo->r_map_offset);
> > }
>
> Does this mean it's just a warning?
When the warning happens, it won't read r_map.
--
H.J.
prev parent reply other threads:[~2021-08-15 13:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-15 0:23 H.J. Lu via Gdb-patches
2021-08-15 11:55 ` Florian Weimer
2021-08-15 12:50 ` H.J. Lu via Gdb-patches
2021-08-15 13:11 ` H.J. Lu via Gdb-patches
2021-08-15 13:17 ` Florian Weimer
2021-08-15 13:48 ` H.J. Lu via Gdb-patches [this message]
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=CAMe9rOpfAqdxAD32PGaZBVY3XSFpXnRhmTcBd2DRtp_QVr1dXQ@mail.gmail.com \
--to=gdb-patches@sourceware.org \
--cc=binutils@sourceware.org \
--cc=fw@deneb.enyo.de \
--cc=hjl.tools@gmail.com \
--cc=libc-alpha@sourceware.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