This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Copy x86_64 _mcount.op from _mcount.o
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: Paul Pluzhnikov <ppluzhnikov at google dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 4 Mar 2016 05:40:11 -0800
- Subject: Re: [PATCH] Copy x86_64 _mcount.op from _mcount.o
- Authentication-results: sourceware.org; auth=none
- References: <20160303134500 dot GA18701 at intel dot com> <20160304001016 dot 658F62C3B4D at topped-with-meat dot com> <CALoOobO+BO1GuZi7MB_L-mLSrMx8mpfDpAzJHtpgG2k1U=UGdA at mail dot gmail dot com> <20160304001930 dot 4ED112C3C0B at topped-with-meat dot com>
On Thu, Mar 3, 2016 at 4:19 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> On Thu, Mar 3, 2016 at 4:10 PM, Roland McGrath <roland@hack.frob.com> wrote:
>>
>> > If I'd had a chance to review this change, I'd have said that I don't see
>> > any adequate rationale for this change.
>>
>> It's a pre-condition for using ENTRY/END here:
>> https://sourceware.org/ml/libc-alpha/2016-03/msg00055.html
>
> That needs to be said in the patch posting, and in comments in the makefile.
Like this?
--
H.J.
---
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index 9fcadd8..788e4fc 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -7,6 +7,9 @@ endif
ifeq ($(subdir),gmon)
sysdep_routines += _mcount
+# We cannot compile _mcount.S with -pg because that would create
+# recursive calls when ENTRY is used. Just copy the normal static
+# object.
sysdep_noprof += _mcount
endif