summaryrefslogtreecommitdiffstats
path: root/libc/tools
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-12-04 11:24:48 -0800
committerElliott Hughes <enh@google.com>2014-12-04 11:24:48 -0800
commit0393221f4738a5a365475067b35a989828b4c4e2 (patch)
tree523eaa882df56692344c91eb02e7ff8ca8c91f17 /libc/tools
parent230005c4bd3910ef974694f88d04e6f6a5a540b4 (diff)
downloadbionic-0393221f4738a5a365475067b35a989828b4c4e2.zip
bionic-0393221f4738a5a365475067b35a989828b4c4e2.tar.gz
bionic-0393221f4738a5a365475067b35a989828b4c4e2.tar.bz2
Make the missing symbols script more useful.
If something's in POSIX, we don't need to show it in the glibc list. If something's not implemented by glibc, we don't need to show it in the POSIX list (because it's probably either a macro or obsolete). Change-Id: Ied0f8d97d3fffb280c22e9cdf6782430d776c02f
Diffstat (limited to 'libc/tools')
-rwxr-xr-xlibc/tools/check-symbols-glibc.py29
1 files changed, 17 insertions, 12 deletions
diff --git a/libc/tools/check-symbols-glibc.py b/libc/tools/check-symbols-glibc.py
index 0c7e28e..153b840 100755
--- a/libc/tools/check-symbols-glibc.py
+++ b/libc/tools/check-symbols-glibc.py
@@ -81,12 +81,12 @@ glibc_to_bionic_names = {
'__xpg_basename': '__gnu_basename',
}
-glibc = GetSymbolsFromSystemSo('libc.so.*', 'librt.so.*', 'libpthread.so.*', 'libresolv.so.*', 'libm.so.*')
+glibc = GetSymbolsFromSystemSo('libc.so.*', 'librt.so.*', 'libpthread.so.*', 'libresolv.so.*', 'libm.so.*', 'libutil.so.*')
bionic = GetSymbolsFromAndroidSo('libc.so', 'libm.so')
posix = GetSymbolsFromTxt(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'posix-2013.txt'))
ndk_ignored = GetNdkIgnored()
-glibc = map(MangleGlibcNameToBionic, glibc)
+glibc = set(map(MangleGlibcNameToBionic, glibc))
# bionic includes various BSD symbols to ease porting other BSD-licensed code.
bsd_stuff = set([
@@ -189,21 +189,26 @@ known = set([
])
if not only_unwanted:
- print 'glibc:'
- for symbol in sorted(glibc):
+ #print 'glibc:'
+ #for symbol in sorted(glibc):
+ # print symbol
+ #print
+
+ #print 'bionic:'
+ #for symbol in sorted(bionic):
+ # print symbol
+ #print
+
+ print 'in glibc (but not posix) but not bionic:'
+ for symbol in sorted((glibc - posix).difference(bionic)):
print symbol
-
print
- print 'bionic:'
- for symbol in sorted(bionic):
- print symbol
- print
- print 'in posix but not bionic:'
- for symbol in sorted(posix.difference(bionic)):
+ print 'in posix (and implemented in glibc) but not bionic:'
+ for symbol in sorted((posix.intersection(glibc)).difference(bionic)):
print symbol
-
print
+
print 'in bionic but not glibc:'
allowed_stuff = (bsd_stuff | FORTIFY_stuff | linux_stuff | macro_stuff |