From db5b6fd35a5c50d86323b4d6f2674452ac0e4fd6 Mon Sep 17 00:00:00 2001 From: Felix Kuehling Date: Fri, 22 Jan 2016 18:08:19 -0500 Subject: [PATCH] Link libhsakmt with -z nodelete This prevents the library from being unloaded at runtime, even when dlclose is called. This preserves global variables, such as state about the SVM address space and avoids catastrophic leaks on dlclose. Change-Id: I34f1d19a450835200e9d4815458e8d1b3045053c [ROCm/ROCR-Runtime commit: cc7491ec7191562d93e102a2b6b76a29a956e0ae] --- projects/rocr-runtime/src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocr-runtime/src/Makefile b/projects/rocr-runtime/src/Makefile index 03ce54e07e..143385b5f6 100644 --- a/projects/rocr-runtime/src/Makefile +++ b/projects/rocr-runtime/src/Makefile @@ -20,7 +20,7 @@ ifneq ($(REL),1) CFLAGS += -ggdb endif -LDFLAGS += -lrt -pthread -Wl,--version-script=libhsakmt.ver -Wl,-soname=$(LIB_NAME).$(LIB_MAJOR_VER) +LDFLAGS += -lrt -pthread -Wl,--version-script=libhsakmt.ver -Wl,-soname=$(LIB_NAME).$(LIB_MAJOR_VER) -Wl,-z,nodelete OBJS = debug.o globals.o memory.o perfctr.o time.o version.o \ events.o openclose.o queues.o topology.o fmm.o pmc_table.o \