diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-03-16 15:56:50 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-03-16 15:57:16 +0100 |
commit | 3977477d48bc85a5719f3d54040b257cc7e85709 (patch) | |
tree | f18fd66b4e14b6fe40d86a01dc0e22c08dad5f45 | |
parent | b9e29037120380d1cde7b80b47fe1baee3f77a7a (diff) | |
download | glibc-3977477d48bc85a5719f3d54040b257cc7e85709.tar.gz glibc-3977477d48bc85a5719f3d54040b257cc7e85709.tar.xz glibc-3977477d48bc85a5719f3d54040b257cc7e85709.zip |
glibcymbols.read_abilist: Add check for duplicate symbols
This detects some bogus abilist files. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r-- | scripts/glibcsymbols.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/glibcsymbols.py b/scripts/glibcsymbols.py index e329ead7f2..1bdd19e51e 100644 --- a/scripts/glibcsymbols.py +++ b/scripts/glibcsymbols.py @@ -63,7 +63,10 @@ def read_abilist(path): with open(path) as inp: for line in inp: version, symbol, flags = line.strip().split(' ', 2) - result[VersionedSymbol(symbol, version)] = flags + versym = VersionedSymbol(symbol, version) + if versym in result: + raise IOError("{}: duplicate symbol {}".format(path, versym)) + result[versym] = flags return result def abilist_lines(symbols): |