From 282ff2a5e613b8291b44848fad42904541a031c1 Mon Sep 17 00:00:00 2001 From: Eric DeVolder Date: Wed, 24 Jan 2018 13:20:21 -0600 Subject: kexec-tools: Make xc_dlhandle static This patch is a follow-on to commit 894bea93 "kexec-tools: Perform run-time linking of libxenctrl.so". This patch addresses feedback from Daniel Kiper. This patch implements Daniel's suggestion to make the xc_dlhandle variable static, insert missing 'extern' qualifier for the new __xc() wrappers, and correct some style issues. Signed-off-by: Eric DeVolder Reviewed-by: Daniel Kiper Signed-off-by: Simon Horman --- kexec/kexec-xen.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'kexec/kexec-xen.c') diff --git a/kexec/kexec-xen.c b/kexec/kexec-xen.c index 75f8758..1887390 100644 --- a/kexec/kexec-xen.c +++ b/kexec/kexec-xen.c @@ -15,8 +15,17 @@ #include "crashdump.h" #ifdef CONFIG_LIBXENCTRL_DL -void *xc_dlhandle; +#include + +/* The handle from dlopen(), needed by dlsym(), dlclose() */ +static void *xc_dlhandle; xc_hypercall_buffer_t XC__HYPERCALL_BUFFER_NAME(HYPERCALL_BUFFER_NULL); + +void *__xc_dlsym(const char *symbol) +{ + return dlsym(xc_dlhandle, symbol); +} + xc_interface *__xc_interface_open(xentoollog_logger *logger, xentoollog_logger *dombuild_logger, unsigned open_flags) -- cgit