Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175928622
D34634.id104089.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34634.id104089.diff
View Options
Index: lib/libc/aarch64/Symbol.map
===================================================================
--- lib/libc/aarch64/Symbol.map
+++ lib/libc/aarch64/Symbol.map
@@ -11,6 +11,7 @@
/* PSEUDO syscalls */
_exit;
+ .mcount;
_setjmp;
_longjmp;
fabs;
Index: sys/arm64/include/profile.h
===================================================================
--- sys/arm64/include/profile.h
+++ sys/arm64/include/profile.h
@@ -44,8 +44,29 @@
typedef __uintfptr_t uintfptr_t;
-#define _MCOUNT_DECL void mcount
+#define _MCOUNT_DECL \
+static void _mcount(uintfptr_t frompc, uintfptr_t selfpc) __used; \
+static void _mcount
+
+#ifdef __GNUCLIKE_ASM
+#define MCOUNT __asm( \
+" .text \n" \
+" .align 6 \n" \
+" .type .mcount,#function \n" \
+" .globl .mcount \n" \
+" .mcount: \n" \
+" .cfi_startproc \n" \
+ /* Load the caller return address as frompc */ \
+" ldr x0, [x29, #8] \n" \
+ /* Use our return address as selfpc */ \
+" mov x1, lr \n" \
+" b _mcount \n" \
+" .cfi_endproc \n" \
+" .size .mcount, . - .mcount \n" \
+ );
+#else
#define MCOUNT
+#endif
#endif /* !_KERNEL */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 15, 2:12 PM (3 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40852199
Default Alt Text
D34634.id104089.diff (1 KB)
Attached To
Mode
D34634: Add an implementation of .mcount on arm64.
Attached
Detach File
Event Timeline
Log In to Comment