This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/22284] -pg -pie doesn't work


https://sourceware.org/bugzilla/show_bug.cgi?id=22284

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.27

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for 2.27.

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  d165ca64980f90ccace088670652cc203d1b5411 (commit)
      from  bc9620d040b7494f457ccb750c9797b47ed76ada (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d165ca64980f90ccace088670652cc203d1b5411

commit d165ca64980f90ccace088670652cc203d1b5411
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Oct 12 03:45:55 2017 -0700

    Support profiling PIE [BZ #22284]

    Since PIE can be loaded at any address, we need to subtract load address
    from PCs.

        [BZ #22284]
        * gmon/Makefile [$(have-fpie)$(build-shared) == yesyes] (tests,
        tests-pie): Add tst-gmon-pie.
        (CFLAGS-tst-gmon-pie.c): New.
        (CRT-tst-gmon-pie): Likewise.
        (tst-gmon-pie-ENV): Likewise.
        [$(have-fpie)$(build-shared) == yesyes] (tests-special): Likewise.
        ($(objpfx)tst-gmon-pie.out): Likewise.
        (clean-tst-gmon-pie-data): Likewise.
        ($(objpfx)tst-gmon-pie-gprof.out): Likewise.
        * gmon/gmon.c [PIC]: Include <link.h>.
        [PIC] (callback): New function.
        (write_hist): Add an argument for load address.  Subtract load
        address from PCs.
        (write_call_graph): Likewise.
        (write_gmon): Call __dl_iterate_phdr to get load address, pass
        it to write_hist and write_call_graph.

    Reviewed-by: Carlos O'Donell <carlos@redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |   20 ++++++++++++++++++++
 gmon/Makefile       |   21 +++++++++++++++++++++
 gmon/gmon.c         |   47 +++++++++++++++++++++++++++++++++++++----------
 gmon/tst-gmon-pie.c |    1 +
 4 files changed, 79 insertions(+), 10 deletions(-)
 create mode 100644 gmon/tst-gmon-pie.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]