From: Matt Mullins Date: Mon, 26 May 2014 01:24:50 +0000 (-0700) Subject: Use a GNU ld version script to hide all symbols X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=02728eda1f6228507f3753b197cf9520d3522472;p=fuckit_dot_so.git 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. --- 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: *; +};