Date: Wed, 23 Mar 2022 15:32:02 +0000 From: bugzilla-noreply@freebsd.org To: toolchain@FreeBSD.org Subject: [Bug 262709] -pg profiling not available on arm64 [fails with undefined symbol: .mcount] Message-ID: <bug-262709-29464-xRlGcom6Vf@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-262709-29464@https.bugs.freebsd.org/bugzilla/> References: <bug-262709-29464@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262709 --- Comment #7 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D16d5f9a1649e6a3e5841c6c41d6af9430= ed9f064 commit 16d5f9a1649e6a3e5841c6c41d6af9430ed9f064 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2022-03-22 15:46:15 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2022-03-23 15:16:59 +0000 Add an implementation of .mcount on arm64 To support cc -pg on arm64 we need to implement .mcount. As clang and gcc think it is function like it just needs to load the arguments to _mcount and call it. On gcc the first argument is passed in x0, however this is missing on clang so we need to load it from the stack. As it's the caller return address this will be at a known location. PR: 262709 Reviewed by: emaste (earlier version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34634 lib/libc/aarch64/Symbol.map | 1 + sys/arm64/include/profile.h | 45 +++++++++++++++++++++++++++++++++++++++++= +++- 2 files changed, 45 insertions(+), 1 deletion(-) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-262709-29464-xRlGcom6Vf>