[Bug 262709] -pg profiling not available on arm64 [fails with undefined symbol: .mcount]
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 23 Mar 2022 15:32:02 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262709
--- Comment #7 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:
URL:
https://cgit.FreeBSD.org/src/commit/?id=16d5f9a1649e6a3e5841c6c41d6af9430ed9f064
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(-)
--
You are receiving this mail because:
You are the assignee for the bug.