aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-01-01 13:19:12 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-01-07 18:08:20 +0100
commit9bb758aab63dd5972b27b8dc1a0f22224b54f885 (patch)
tree36e201d9525fec9877437359b10e4a6fbbf5bc0a /lib
parent9b8d264b5af801a56e06aceab34dc74cb66121b1 (diff)
downloadu-boot-9bb758aab63dd5972b27b8dc1a0f22224b54f885.zip
u-boot-9bb758aab63dd5972b27b8dc1a0f22224b54f885.tar.gz
u-boot-9bb758aab63dd5972b27b8dc1a0f22224b54f885.tar.bz2
efi_loader: __cyg_profile_func_enter/_exit
U-Boot can be compiled with function tracing enabled. When compiling with FTRACE __cyg_profile_func_enter() is called when a function is entered and __cyg_profile_func_exit() when the function is left. To avoid a crash we have to define these function for the free-standing UEFI binaries. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_freestanding.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_freestanding.c b/lib/efi_loader/efi_freestanding.c
index bd9da5b..dcf5d1c 100644
--- a/lib/efi_loader/efi_freestanding.c
+++ b/lib/efi_loader/efi_freestanding.c
@@ -88,3 +88,35 @@ void *memset(void *s, int c, size_t n)
*d++ = c;
return s;
}
+
+/**
+ * __cyg_profile_func_enter() - record function entry
+ *
+ * This is called on every function entry when compiling with
+ * -finstrument-functions.
+ *
+ * We do nothing here.
+ *
+ * @param func_ptr Pointer to function being entered
+ * @param caller Pointer to function which called this function
+ */
+void __attribute__((no_instrument_function))
+__cyg_profile_func_enter(void *func_ptr, void *caller)
+{
+}
+
+/**
+ * __cyg_profile_func_exit() - record function exit
+ *
+ * This is called on every function exit when compiling with
+ * -finstrument-functions.
+ *
+ * We do nothing here.
+ *
+ * @param func_ptr Pointer to function being entered
+ * @param caller Pointer to function which called this function
+ */
+void __attribute__((no_instrument_function))
+__cyg_profile_func_exit(void *func_ptr, void *caller)
+{
+}