Add symbol versions to libstdc++.so

Bug: http://b/28987948
Change-Id: I3853528bd432ceab37e4867f2c4112d9ee0b40dc
This commit is contained in:
Dimitry Ivanov 2016-07-28 13:52:17 -07:00
parent c7d97ec31d
commit 6cc8d47a1f
9 changed files with 153 additions and 2 deletions

View File

@ -1769,13 +1769,27 @@ cc_library {
static_libs: ["libc_logging"],
},
//TODO: This is to work around b/24465209. Remove after root cause is fixed
//TODO (dimitry): This is to work around b/24465209. Remove after root cause is fixed
arch: {
arm: {
ldflags: ["-Wl,--hash-style=both"],
version_script: "libstdc++.arm.map",
},
arm64: {
version_script: "libstdc++.arm64.map",
},
mips: {
version_script: "libstdc++.mips.map",
},
mips64: {
version_script: "libstdc++.mips64.map",
},
x86: {
ldflags: ["-Wl,--hash-style=both"],
version_script: "libstdc++.x86.map",
},
x86_64: {
version_script: "libstdc++.x86_64.map",
},
},
}

19
libc/libstdc++.arm.map Normal file
View File

@ -0,0 +1,19 @@
# Generated by genversion-scripts.py. Do not edit.
LIBC {
global:
_ZdaPv;
_ZdaPvRKSt9nothrow_t;
_ZdlPv;
_ZdlPvRKSt9nothrow_t;
_Znaj; # arm x86 mips
_ZnajRKSt9nothrow_t; # arm x86 mips
_Znwj; # arm x86 mips
_ZnwjRKSt9nothrow_t; # arm x86 mips
_ZSt7nothrow;
__cxa_guard_abort;
__cxa_guard_acquire;
__cxa_guard_release;
__cxa_pure_virtual;
local:
*;
};

19
libc/libstdc++.arm64.map Normal file
View File

@ -0,0 +1,19 @@
# Generated by genversion-scripts.py. Do not edit.
LIBC {
global:
_ZdaPv;
_ZdaPvRKSt9nothrow_t;
_ZdlPv;
_ZdlPvRKSt9nothrow_t;
_Znam; # arm64 x86_64 mips64
_ZnamRKSt9nothrow_t; # arm64 x86_64 mips64
_Znwm; # arm64 x86_64 mips64
_ZnwmRKSt9nothrow_t; # arm64 x86_64 mips64
_ZSt7nothrow;
__cxa_guard_abort;
__cxa_guard_acquire;
__cxa_guard_release;
__cxa_pure_virtual;
local:
*;
};

22
libc/libstdc++.map.txt Normal file
View File

@ -0,0 +1,22 @@
LIBC {
global:
_ZdaPv;
_ZdaPvRKSt9nothrow_t;
_ZdlPv;
_ZdlPvRKSt9nothrow_t;
_Znam; # arm64 x86_64 mips64
_ZnamRKSt9nothrow_t; # arm64 x86_64 mips64
_Znwm; # arm64 x86_64 mips64
_ZnwmRKSt9nothrow_t; # arm64 x86_64 mips64
_Znaj; # arm x86 mips
_ZnajRKSt9nothrow_t; # arm x86 mips
_Znwj; # arm x86 mips
_ZnwjRKSt9nothrow_t; # arm x86 mips
_ZSt7nothrow;
__cxa_guard_abort;
__cxa_guard_acquire;
__cxa_guard_release;
__cxa_pure_virtual;
local:
*;
};

19
libc/libstdc++.mips.map Normal file
View File

@ -0,0 +1,19 @@
# Generated by genversion-scripts.py. Do not edit.
LIBC {
global:
_ZdaPv;
_ZdaPvRKSt9nothrow_t;
_ZdlPv;
_ZdlPvRKSt9nothrow_t;
_Znaj; # arm x86 mips
_ZnajRKSt9nothrow_t; # arm x86 mips
_Znwj; # arm x86 mips
_ZnwjRKSt9nothrow_t; # arm x86 mips
_ZSt7nothrow;
__cxa_guard_abort;
__cxa_guard_acquire;
__cxa_guard_release;
__cxa_pure_virtual;
local:
*;
};

19
libc/libstdc++.mips64.map Normal file
View File

@ -0,0 +1,19 @@
# Generated by genversion-scripts.py. Do not edit.
LIBC {
global:
_ZdaPv;
_ZdaPvRKSt9nothrow_t;
_ZdlPv;
_ZdlPvRKSt9nothrow_t;
_Znam; # arm64 x86_64 mips64
_ZnamRKSt9nothrow_t; # arm64 x86_64 mips64
_Znwm; # arm64 x86_64 mips64
_ZnwmRKSt9nothrow_t; # arm64 x86_64 mips64
_ZSt7nothrow;
__cxa_guard_abort;
__cxa_guard_acquire;
__cxa_guard_release;
__cxa_pure_virtual;
local:
*;
};

19
libc/libstdc++.x86.map Normal file
View File

@ -0,0 +1,19 @@
# Generated by genversion-scripts.py. Do not edit.
LIBC {
global:
_ZdaPv;
_ZdaPvRKSt9nothrow_t;
_ZdlPv;
_ZdlPvRKSt9nothrow_t;
_Znaj; # arm x86 mips
_ZnajRKSt9nothrow_t; # arm x86 mips
_Znwj; # arm x86 mips
_ZnwjRKSt9nothrow_t; # arm x86 mips
_ZSt7nothrow;
__cxa_guard_abort;
__cxa_guard_acquire;
__cxa_guard_release;
__cxa_pure_virtual;
local:
*;
};

19
libc/libstdc++.x86_64.map Normal file
View File

@ -0,0 +1,19 @@
# Generated by genversion-scripts.py. Do not edit.
LIBC {
global:
_ZdaPv;
_ZdaPvRKSt9nothrow_t;
_ZdlPv;
_ZdlPvRKSt9nothrow_t;
_Znam; # arm64 x86_64 mips64
_ZnamRKSt9nothrow_t; # arm64 x86_64 mips64
_Znwm; # arm64 x86_64 mips64
_ZnwmRKSt9nothrow_t; # arm64 x86_64 mips64
_ZSt7nothrow;
__cxa_guard_abort;
__cxa_guard_acquire;
__cxa_guard_release;
__cxa_pure_virtual;
local:
*;
};

View File

@ -17,6 +17,7 @@ bionic_libdl_root = os.path.join(os.environ["ANDROID_BUILD_TOP"], "bionic/libdl"
libc_script = os.path.join(bionic_libc_root, "libc.map.txt")
libm_script = os.path.join(bionic_libm_root, "libm.map.txt")
libdl_script = os.path.join(bionic_libdl_root, "libdl.map.txt")
libstdcxx_script = os.path.join(bionic_libc_root, "libstdc++.map.txt")
script_name = os.path.basename(sys.argv[0])
@ -35,7 +36,7 @@ warning = "Generated by %s. Do not edit." % script_name
class VersionScriptGenerator(object):
def run(self):
for script in [libc_script, libm_script, libdl_script]:
for script in [libc_script, libstdcxx_script, libm_script, libdl_script]:
basename = os.path.basename(script)
dirname = os.path.dirname(script)
for arch in all_arches: