From 02728eda1f6228507f3753b197cf9520d3522472 Mon Sep 17 00:00:00 2001 From: Matt Mullins Date: Sun, 25 May 2014 18:24:50 -0700 Subject: [PATCH] Use a GNU ld version script to hide all symbols Without this, running clang (or anything else that uses LLVM) will crash because we might LD_PRELOAD the wrong symbol versions into its binary. We don't need to export any symbols at all, since everything is done via the .init section. This library just needs to be mapped in memory somewhere so our function pointers don't disappear. --- Makefile.am | 2 +- version | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 version diff --git a/Makefile.am b/Makefile.am index a050475..4c319b5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,5 +2,5 @@ ACLOCAL_AMFLAGS = -Im4 lib_LTLIBRARIES = libfuckit.la libfuckit_la_CXXFLAGS = @LLVM_CFLAGS@ $(AM_CFLAGS) -libfuckit_la_LDFLAGS = $(shell @LLVM_CONFIG@ --ldflags) @LLVM_LIBS@ +libfuckit_la_LDFLAGS = $(shell @LLVM_CONFIG@ --ldflags) @LLVM_LIBS@ -Wl,--version-script=@srcdir@/version libfuckit_la_SOURCES = fuckit.cpp diff --git a/version b/version new file mode 100644 index 0000000..7c1db4c --- /dev/null +++ b/version @@ -0,0 +1,3 @@ +VERSION_0.1 { + local: *; +}; -- 2.11.0