From: will schmidt via Gdb-patches <gdb-patches@sourceware.org>
To: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
Alan Modra <amodra@gmail.com>
Cc: rogerio <rogealve@br.ibm.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [Patch v2] Handle .TOC. sections during gdb-compile for rs6000 target.
Date: Thu, 05 Aug 2021 12:50:09 -0500 [thread overview]
Message-ID: <1e42e4781b6465743c415950628bf09608cb931f.camel@vnet.ibm.com> (raw)
In-Reply-To: <OF8B0A2AAC.426BD117-ONC1258721.0040DAD5-C1258721.0040F273@ibm.com>
On Thu, 2021-07-29 at 13:49 +0200, Ulrich Weigand wrote:
> "Alan Modra" <amodra@gmail.com> wrote on 29.07.2021 10:26:11:
> > On Thu, Jul 29, 2021 at 09:18:18AM +0200, Ulrich Weigand wrote:
> > >
> > >
> > > "will schmidt" <will_schmidt@vnet.ibm.com> wrote on 28.07.2021
> 21:08:21:
> > >
> > > > + sym->section = toc_fallback;
> > > > + sym->value = 0x8000;
> > > > + bfd_set_gp_value(abfd.get(), toc_fallback->vma);
> > >
> > > For compatibility with BFD, shouldn't this be rather:
> > >
> > > bfd_set_gp_value(abfd.get(), toc_fallback->vma + sym-
> >value);
> > >
> > > Alan, can you confirm?
> >
> > No, see bfd/elf64-ppc.c:ppc64_elf_sec_toc. A long time ago I chose
> > the value of elf_gp used in elf64-ppc.c to be the start of the toc
> > section rather than the value of ".TOC.". The value is somewhat
> > arbitrary. Yes, I could change it to be the value of .TOC., but
> for
> > now the value above is correct.
>
> I see, thanks for the explanation.
>
> Will, the patch is OK for trunk then.
Committed with some additional indentation and cosmetic tweaks,
Thanks
-WIll
>
> Thanks,
> Ulrich
>
>
prev parent reply other threads:[~2021-08-05 17:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 19:08 will schmidt via Gdb-patches
2021-07-29 7:18 ` Ulrich Weigand via Gdb-patches
2021-07-29 8:26 ` Alan Modra via Gdb-patches
2021-07-29 11:49 ` Ulrich Weigand via Gdb-patches
2021-08-05 17:50 ` will schmidt 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=1e42e4781b6465743c415950628bf09608cb931f.camel@vnet.ibm.com \
--to=gdb-patches@sourceware.org \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=amodra@gmail.com \
--cc=rogealve@br.ibm.com \
--cc=will_schmidt@vnet.ibm.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