This is the mail archive of the 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

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

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

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

--- Comment #2 from cvs-commit at gcc dot <cvs-commit at gcc dot> ---
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 -----------------------------------------------------------------;h=d165ca64980f90ccace088670652cc203d1b5411

commit d165ca64980f90ccace088670652cc203d1b5411
Author: H.J. Lu <>
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 <>


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]