Building gmp with -fvisibility=hidden
Yuri Gribov
tetra2005 at gmail.com
Thu Apr 26 21:55:41 UTC 2018
Hi all,
Is there any interest in building GMP with -fvisility=hidden on Linux?
I gave it a try recently but it only removed few symbols:
__gmp_asprintf_funs
__gmp_fac2cnt_table
__gmp_fprintf_funs
__gmp_fscanf_funs
__gmp_limbroots_table
__gmp_mt_recalc_buffer
__gmpn_divexact_by3
__gmpn_divmod_1
__gmpn_gcdext_hook
__gmp_obstack_printf_funs
__gmp_odd2fac_table
__gmp_oddfac_table
__gmp_randclear_mt
__gmp_randget_mt
__gmp_randiset_mt
__gmp_snprintf_funs
__gmp_sprintf_funs
__gmp_sscanf_funs
__gmpz_legendre
.text size didn't change which means that hiding those didn't allow
for any new optimizations. Dynamic linker sections (.plt, .got,
.rela.dyn, etc.) decreased so maybe applications startup will be
slightly faster.
I attached draft patch (passes `make check').
Best regards,
Yury Gribov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp-visibility-1.patch
Type: application/octet-stream
Size: 3943 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-discuss/attachments/20180426/8b602f40/attachment.obj>
More information about the gmp-discuss
mailing list