[PATCH 4/4] kernel-shark: Fix dependency (symbol resolving) issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When linking KernelShark libraries we must take into account the
intrinsic dependency hierarchy of the trace-cmd libraries.
"libtraceevent" is the most basic one. "libtracefs" depends on
"libtraceevent" and "libtracecmd" depends on both "libtraceevent"
and "libtracefs". In order to guarantee a correct symbol resolution
during linking, those libraries must be listed in a reverse order
(the most basic comes last).

Reported-by: Ziqian SUN (Zamir) <sztsian@xxxxxxxxx>
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx>
---
 kernel-shark/src/CMakeLists.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
index 9666b18..0627783 100644
--- a/kernel-shark/src/CMakeLists.txt
+++ b/kernel-shark/src/CMakeLists.txt
@@ -7,10 +7,10 @@ add_library(kshark SHARED libkshark.c
                           libkshark-configio.c
                           libkshark-collection.c)
 
-target_link_libraries(kshark ${TRACEEVENT_LIBRARY}
-                             ${TRACECMD_LIBRARY}
+target_link_libraries(kshark ${TRACECMD_LIBRARY}
                              ${TRACEFS_LIBRARY}
-                             ${JSONC_LIBRARY}
+                             ${TRACEEVENT_LIBRARY}
+			     ${JSONC_LIBRARY}
                              ${CMAKE_DL_LIBS})
 
 set_target_properties(kshark  PROPERTIES SUFFIX	".so.${KS_VERSION_STRING}")
-- 
2.26.2




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux