Package: bzip2
Version: 1.0.6-9

Currently libbz2.so exports all of it's symbols, including private
ones. This may cause slower startup time and inadverent dependency on
library internals in client code. Attached patch uses
-fvisibility=hidden and -Wl,-version-script (whenever they are
supported by compiler) to export only symbols which are present in
public header. `make check' passed but I haven't tested dependent
packages. Code may be ugly, I'd be happy to update it if deemed
necessary.

Removed symbols are:
  BZ2_blockSort
  BZ2_bsInitWrite
  BZ2_bz__AssertH__fail
  BZ2_compressBlock
  BZ2_crc32Table
  BZ2_decompress
  BZ2_hbAssignCodes
  BZ2_hbCreateDecodeTables
  BZ2_hbMakeCodeLengths
  BZ2_indexIntoF
  BZ2_rNums
  _edata
  _end
  _fini
  _init
  _bss_start

My system is
$ uname -a
Linux yugr-VirtualBox 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar
14 17:48:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ ls -l /lib/*/libc.so.6
lrwxrwxrwx 1 root root 12 Jan 15 02:51 /lib/x86_64-linux-gnu/libc.so.6
-> libc-2.23.so

The issue was found using https://github.com/yugr/ShlibVisibilityChecker

-Yury Gribov

Attachment: 0001-Hide-private-symbols.patch
Description: Binary data

Reply via email to