-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: adding a prefix (or suffix) to all function names exported from shared library #436
Comments
Hi @tkelman , You can try to modified In
|
Hi @xianyi. It looks like I tried adding prefixes to everything on that line but had linking failures. Luckily I think I found a solution, at least for Linux. We can't use --- exports/Makefile-old 2014-08-20 20:47:51.000000000 -0700
+++ exports/Makefile 2014-08-20 20:45:16.000000000 -0700
@@ -103,7 +103,10 @@
so : ../$(LIBSONAME)
-../$(LIBSONAME) : ../$(LIBNAME) linktest.c
+../$(LIBSONAME) : ../$(LIBNAME) linktest.c aix.def
+ rm -f prefix.def
+ for i in `cat aix.def`; do echo "$$i jl_$$i" >> prefix.def; done
+ objcopy --redefine-syms prefix.def ../$(LIBNAME)
ifneq ($(C_COMPILER), LSB)
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o ../$(LIBSONAME) \
-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \ I'm using |
Whoops, sorry, this is actually a duplicate of #319 - but I got a little further in testing than @stevengj did. Now I'm also wondering, would it be possible to build one copy of openblas with |
We would like to be able to build a shared library of OpenBLAS using 64 bit integers, and add a prefix or suffix to all functions exported from that shared library, so that we can also load a separate 32-bit-integer shared library OpenBLAS (or Netlib, Atlas, Accelerate, etc) with conventional function names into the same process without having conflicting ABI's. Ref JuliaLang/julia#4923
I found a way to modify https://github.com/xianyi/OpenBLAS/blob/a69dd3fbc5c38f7098d1539a69963c0d2bd3163a/exports/gensymbol#L2827-L2873 for the Windows case, and something similar may also work for OSX. I'm stuck on Linux though. We tried using
objcopy
, but that is apparently unable to modify dynamic symbols. Any ideas?The text was updated successfully, but these errors were encountered: