wafsamba/samba_abi: always hide ABI symbols which must be local
commitccbc9c1973b47fc66d6d7e8f117cdf3d66e60e3d
authorAlexander Bokovoy <ab@samba.org>
Thu, 12 Jul 2018 07:19:41 +0000 (12 10:19 +0300)
committerKarolin Seeger <kseeger@samba.org>
Thu, 23 Aug 2018 08:39:16 +0000 (23 10:39 +0200)
treea75849f6076ac18f1ab976a567798185ab124dbd
parenta89ec4ea2cd8838634570b1cdd32e28142032dd7
wafsamba/samba_abi: always hide ABI symbols which must be local

binutils 2.31 is going to change how shared libraries are linked, such
that they always provide their own local definitions of the _end, _edata
and _bss_start symbols.  This would all be fine, except for shared
libraries that export all symbols be default.  (Rather than just
exporting those symbols that form part of their API).

According to binutils developers, we should only export the symbols we
explicitly want to be used. We don't use this principle for all our
libraries and deliberately don't want to have ABI versioning control for
all of them, so the change I introduce here is to explicitly mark those
symbols that will always be added by default linker configuration with
binutils 2.31 as local. Right now these are '_end', '_edata', and
'__bss_start' symbols.

Fixes: https://bugzilla.samba.org/show_bug.cgi?id=13579

Cherry-picked from commit 4e123c46820e737968fa3d1c594aa016cca39637

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_abi.py
buildtools/wafsamba/tests/test_abi.py