From 742ebadecb9dfe2e19f9d5708366a4b899492a39 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 8 Nov 2016 01:37:34 +0100 Subject: [PATCH] Use so_names to prevent loading wrong abi https://bugzilla.redhat.com/show_bug.cgi?id=1361037 --- model/elf-cache.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/model/elf-cache.cc b/model/elf-cache.cc index b97a9b08..36183d2d 100644 --- a/model/elf-cache.cc +++ b/model/elf-cache.cc @@ -10,6 +10,7 @@ #include #include #include +#include namespace ns3 { @@ -20,19 +21,19 @@ ElfCache::ElfCache (std::string directory, uint32_t uid) m_uid (uid) { struct Overriden overriden; - overriden.from = "libc.so.6"; + overriden.from = LIBC_SO; overriden.to = "libc-ns3.so"; m_overriden.push_back (overriden); - overriden.from = "libpthread.so.0"; + overriden.from = LIBPTHREAD_SO; overriden.to = "libpthread-ns3.so"; m_overriden.push_back (overriden); - overriden.from = "librt.so.1"; + overriden.from = LIBRT_SO; overriden.to = "librt-ns3.so"; m_overriden.push_back (overriden); - overriden.from = "libm.so.6"; + overriden.from = LIBM_SO; overriden.to = "libm-ns3.so"; m_overriden.push_back (overriden); - overriden.from = "libdl.so.2"; + overriden.from = LIBDL_SO; overriden.to = "libdl-ns3.so"; m_overriden.push_back (overriden); }