Browse Source

Pass -fvisibility-inlines-hidden to g++

This reduces the number of symbols by about 10%. Unfortunately,
it does not seem to cover all the weird std::vector and friend
template expansions.

ABI should not brake due to that change: It was never specified
before whether an inline symbol was exported or not; so no library
could rely on its presence. Instead, the symbols were exported in
each library/program needing it and and then merged into a common
one by the dynamic linker.

Also update the symbol files to account for the removed symbols.
Julian Andres Klode 7 years ago
parent
commit
addbf58217
3 changed files with 2 additions and 127 deletions
  1. 2 0
      buildlib/environment.mak.in
  2. 0 6
      debian/libapt-inst2.0.symbols
  3. 0 121
      debian/libapt-pkg5.0.symbols

+ 2 - 0
buildlib/environment.mak.in

@@ -19,6 +19,8 @@ CXXFLAGS+= -Wctor-dtor-privacy -Wdisabled-optimization -Winit-self -Wmissing-inc
 #CXXFLAGS+= -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr
 # a bit too pedantic to be run by default
 #CXXFLAGS+= -Wpedantic -Wno-long-long -Wno-vla -Wno-variadic-macros
+# hide inlines
+CXXFLAGS+= -fvisibility-inlines-hidden
 NUM_PROCS = @NUM_PROCS@
 
 # Linker stuff

+ 0 - 6
debian/libapt-inst2.0.symbols

@@ -9,14 +9,12 @@ libapt-inst.so.2.0 libapt-inst2.0 #MINVER#
  (c++)"debDebFile::GotoMember(char const*)@APTINST_2.0" 0.8.0
  (c++)"debDebFile::CheckMember(char const*)@APTINST_2.0" 0.8.0
  (c++)"debDebFile::ControlExtract::DoItem(pkgDirStream::Item&, int&)@APTINST_2.0" 0.8.0
- (c++)"debDebFile::ControlExtract::~ControlExtract()@APTINST_2.0" 0.8.0
  (c++)"debDebFile::ExtractTarMember(pkgDirStream&, char const*)@APTINST_2.0" 0.9.15.4
  (c++)"debDebFile::ExtractArchive(pkgDirStream&)@APTINST_2.0" 0.8.0
  (c++)"debDebFile::MemControlExtract::TakeControl(void const*, unsigned long long)@APTINST_2.0" 1.0.5
  (c++)"debDebFile::MemControlExtract::Read(debDebFile&)@APTINST_2.0" 0.8.0
  (c++)"debDebFile::MemControlExtract::DoItem(pkgDirStream::Item&, int&)@APTINST_2.0" 0.8.0
  (c++)"debDebFile::MemControlExtract::Process(pkgDirStream::Item&, unsigned char const*, unsigned long long, unsigned long long)@APTINST_2.0" 1.0.5
- (c++)"debDebFile::MemControlExtract::~MemControlExtract()@APTINST_2.0" 0.8.0
  (c++)"debDebFile::debDebFile(FileFd&)@APTINST_2.0" 0.8.0
  (c++)"pkgExtract::FinishedFile(pkgDirStream::Item&, int)@APTINST_2.0" 0.8.0
  (c++)"pkgExtract::CheckDirReplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int)@APTINST_2.0" 0.8.0
@@ -26,7 +24,6 @@ libapt-inst.so.2.0 libapt-inst2.0 #MINVER#
  (c++)"pkgExtract::Aborted()@APTINST_2.0" 0.8.0
  (c++)"pkgExtract::Finished()@APTINST_2.0" 0.8.0
  (c++)"pkgExtract::pkgExtract(pkgFLCache&, pkgCache::VerIterator)@APTINST_2.0" 0.8.0
- (c++)"pkgExtract::~pkgExtract()@APTINST_2.0" 0.8.0
  (c++)"pkgFLCache::TreeLookup(unsigned int*, char const*, char const*, unsigned long, unsigned int*, bool)@APTINST_2.0" 0.8.0
  (c++)"pkgFLCache::AddConfFile(char const*, char const*, pkgFLCache::PkgIterator const&, unsigned char const*)@APTINST_2.0" 0.8.0
  (c++)"pkgFLCache::AddDiversion(pkgFLCache::PkgIterator const&, char const*, char const*)@APTINST_2.0" 0.8.0
@@ -42,8 +39,6 @@ libapt-inst.so.2.0 libapt-inst2.0 #MINVER#
  (c++)"pkgDirStream::FinishedFile(pkgDirStream::Item&, int)@APTINST_2.0" 0.8.0
  (c++)"pkgDirStream::Fail(pkgDirStream::Item&, int)@APTINST_2.0" 0.8.0
  (c++)"pkgDirStream::DoItem(pkgDirStream::Item&, int&)@APTINST_2.0" 0.8.0
- (c++)"pkgDirStream::Process(pkgDirStream::Item&, unsigned char const*, unsigned long long, unsigned long long)@APTINST_2.0" 1.0.5
- (c++)"pkgDirStream::~pkgDirStream()@APTINST_2.0" 0.8.0
  (c++)"ARArchive::LoadHeaders()@APTINST_2.0" 0.8.0
  (c++)"ARArchive::ARArchive(FileFd&)@APTINST_2.0" 0.8.0
  (c++)"ARArchive::~ARArchive()@APTINST_2.0" 0.8.0
@@ -70,4 +65,3 @@ libapt-inst.so.2.0 libapt-inst2.0 #MINVER#
 ### symbol versioning
  APTINST_2.0@APTINST_2.0 1.1~exp9
 ### try to ignore std:: template instances
- (c++|optional=std)"std::ctype<char>::do_widen(char) const@APTINST_2.0" 1.0.3

File diff suppressed because it is too large
+ 0 - 121
debian/libapt-pkg5.0.symbols