Previously extensions/trace.so with two different names loaded by "extend"
command twice will segfault crash.
This patch fixed the problem by making related functions static.
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
extensions/trace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/extensions/trace.c b/extensions/trace.c
index c33907f..23a9667 100644
--- a/extensions/trace.c
+++ b/extensions/trace.c
@@ -1888,7 +1888,7 @@ static struct command_table_entry command_table[] = {
static int ftrace_initialized;
-void __attribute__((constructor))
+static void __attribute__((constructor))
trace_init(void)
{
if (ftrace_init() < 0)
@@ -1898,7 +1898,7 @@ trace_init(void)
register_extension(command_table);
}
-void __attribute__((destructor))
+static void __attribute__((destructor))
trace_fini(void)
{
if (ftrace_initialized)
--
2.29.2