This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Handle PowerPC64 ELFv1 function descriptors in libbacktrace (PR other/82368)
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Ian Lance Taylor <iant at golang dot org>, David Edelsohn <dje dot gcc at gmail dot com>, Alan Modra <amodra at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 14 Feb 2018 06:10:58 -0600
- Subject: Re: [PATCH] Handle PowerPC64 ELFv1 function descriptors in libbacktrace (PR other/82368)
- Authentication-results: sourceware.org; auth=none
- References: <20180214114138.GX5867@tucnak>
Hi Jakub,
On Wed, Feb 14, 2018 at 12:41:38PM +0100, Jakub Jelinek wrote:
> As mentioned in detail in the PR, PowerPC64 ELFv1 function symbols
> point to function descriptors in .opd section rather than actual
> code, and one needs to read the code address from the .opd section
> in order to associate symbols with .text addresses.
>
> Fixed thusly, bootstrapped/regtested on powerpc64-linux (-m32/-m64
> testing) and powerpc64le-linux, ok for trunk?
>
> 2018-02-14 Jakub Jelinek <jakub@redhat.com>
>
> PR other/82368
> * elf.c (EM_PPC64, EF_PPC64_ABI): Undefine and define.
> (struct elf_ppc64_opd_data): New type.
> (elf_initialize_syminfo): Add opd argument, handle symbols
> pointing into the PowerPC64 ELFv1 .opd section.
> (elf_add): Read .opd section on PowerPC64 ELFv1, pass pointer
> to structure with .opd data to elf_initialize_syminfo.
Looks good to me; you may want a libbacktrace maintainer though.
Segher