Open amontoison opened 1 year ago
Thank you for the report, let me take a look at this within couple of days.
Actually I think nm
is imprecise here. readelf
shows that symbol is indeed hidden:
$ readelf --dyn-syms -W libmkl_rt.so.2 | grep '\<zupmtr_64_\>'
45616: 00000000006acbb0 176 FUNC GLOBAL DEFAULT 13 zupmtr_64_
$ ~/src/SymbolHider/bin/sym-hider libmkl_rt.so.2 zupmtr_64_
$ readelf --dyn-syms -W libmkl_rt.so.2 | grep '\<zupmtr_64_\>'
45616: 00000000006acbb0 176 FUNC GLOBAL HIDDEN 13 zupmtr_64_
Great, it's exactly what I need!
I plan to use it in the cross-compiler BinaryBuilder.jl.
Is it working if the shared library libmkl_rt.so
and sym-hider
are compiled on different platforms?
I will compile SymbolHider on the host (x86_64-linux-musl
) and use it to hide the symbols of the shared library of
the following platforms:
I suppose that the support of 32-bit ELFs is needed for the platforms:
But it's already great if I can use it for the 3 main 64-bits platforms.
I plan to use it in the cross-compiler BinaryBuilder.jl. Is it working if the shared library
libmkl_rt.so
andsym-hider
are compiled on different platforms?
It should although TBH I haven't tested it. I'll be around for bugs if any.
x86_64-apple-darwin x86_64-w64-mingw32
These might be a problem - unfortunately they use different object file formats (Mach-O and PE) whereas SymbolHider only supports ELFs at the moment (I should make it clear in README). I can't say right now whether it's possible to modify symbol table for linked executables on these platforms.
I suppose that the support of 32-bit ELFs is needed for the platforms:
- i686-linux-gnu
- i686-w64-mingw32
This can be added if needed.
Hi @yugr!
I try to use your tool
SymbolHider
to hide some symbols of a shared library. I would like to link a package with libblastrampoline for the BLAS/LAPACK symbols andlibmkl_rt
for the MKL Pardiso solver. The issue is thatlibmkl_rt
also exports BLAS and LAPACK symbols. I would like to use your tool to hide symbols not related topardiso
inlibmkl_rt
but it seems that nothing is updated.libmkl_rt.so
can be downloaded from https://anaconda.org/intel/mkl/files.