[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Fri Jul 13 15:46:02 UTC 2018


The branch, master has been updated
       via  4e123c4 wafsamba/samba_abi: always hide ABI symbols which must be local
      from  c9656fd s3: libsmbclient: Fix cli_splice() fallback when reading less than a complete file.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4e123c46820e737968fa3d1c594aa016cca39637
Author: Alexander Bokovoy <ab at samba.org>
Date:   Thu Jul 12 10:19:41 2018 +0300

    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.
    
    Signed-off-by: Alexander Bokovoy <ab at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Fri Jul 13 17:45:36 CEST 2018 on sn-devel-144

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafsamba/samba_abi.py      | 10 ++++++----
 buildtools/wafsamba/tests/test_abi.py | 14 ++++++++++++++
 2 files changed, 20 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
index 196b468..4603e76 100644
--- a/buildtools/wafsamba/samba_abi.py
+++ b/buildtools/wafsamba/samba_abi.py
@@ -192,10 +192,12 @@ def abi_write_vscript(f, libname, current_version, versions, symmap, abi_match):
             f.write("\t\t%s;\n" % x)
     else:
         f.write("\t\t*;\n")
-    if abi_match != ["*"]:
-        f.write("\tlocal:\n")
-        for x in local_abi:
-            f.write("\t\t%s;\n" % x[1:])
+    # Always hide symbols that must be local if exist
+    local_abi.extend(["!_end", "!__bss_start", "!_edata"])
+    f.write("\tlocal:\n")
+    for x in local_abi:
+        f.write("\t\t%s;\n" % x[1:])
+    if global_abi != ["*"]:
         if len(global_abi) > 0:
             f.write("\t\t*;\n")
     f.write("};\n")
diff --git a/buildtools/wafsamba/tests/test_abi.py b/buildtools/wafsamba/tests/test_abi.py
index bba78c1..7489214 100644
--- a/buildtools/wafsamba/tests/test_abi.py
+++ b/buildtools/wafsamba/tests/test_abi.py
@@ -66,6 +66,10 @@ class WriteVscriptTests(TestCase):
 1.0 {
 \tglobal:
 \t\t*;
+\tlocal:
+\t\t_end;
+\t\t__bss_start;
+\t\t_edata;
 };
 """)
 
@@ -84,6 +88,10 @@ MYLIB_0.1 {
 1.0 {
 \tglobal:
 \t\t*;
+\tlocal:
+\t\t_end;
+\t\t__bss_start;
+\t\t_edata;
 };
 """)
 
@@ -99,6 +107,9 @@ MYLIB_0.1 {
 \t\t*;
 \tlocal:
 \t\texc_*;
+\t\t_end;
+\t\t__bss_start;
+\t\t_edata;
 };
 """)
 
@@ -115,6 +126,9 @@ MYLIB_0.1 {
 \t\tpub_*;
 \tlocal:
 \t\texc_*;
+\t\t_end;
+\t\t__bss_start;
+\t\t_edata;
 \t\t*;
 };
 """)


-- 
Samba Shared Repository



More information about the samba-cvs mailing list