https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89172

--- Comment #1 from ian at gcc dot gnu.org <ian at gcc dot gnu.org> ---
Author: ian
Date: Wed Feb 27 22:35:10 2019
New Revision: 269266

URL: https://gcc.gnu.org/viewcvs?rev=269266&root=gcc&view=rev
Log:
        PR go/89172
    internal/cpu, runtime, runtime/pprof: handle function descriptors

    When using PPC64 ELF ABI v1 a function address is not a PC, but is the
    address of a function descriptor.  The first field in the function
    descriptor is the actual PC (see
    http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-DES).
    The libbacktrace library knows about this, and libgo uses actual PC
    values consistently except for the helper function funcPC that appears
    in both runtime and runtime/pprof.

    This patch fixes funcPC by recording, in the internal/cpu package,
    whether function descriptors are being used.  We have to check for
    function descriptors using a C compiler check, because GCC can be
    configured using --with-abi to select the ELF ABI to use.

    Fixes https://gcc.gnu.org/PR89172

    Reviewed-on: https://go-review.googlesource.com/c/162978

Modified:
    trunk/gcc/go/gofrontend/MERGE
    trunk/libgo/Makefile.am
    trunk/libgo/Makefile.in
    trunk/libgo/configure
    trunk/libgo/configure.ac
    trunk/libgo/go/runtime/pprof/proto.go
    trunk/libgo/go/runtime/proc.go
    trunk/libgo/testsuite/Makefile.in

Reply via email to