Skip to content

Commit

Permalink
Fix multiple GLIBC versions
Browse files Browse the repository at this point in the history
  • Loading branch information
blackle committed Aug 24, 2020
1 parent 8d85d3d commit 181c809
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions smol/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def list_symbols(readelf_bin, lib):
if vis != "DEFAULT" or ndx == "UND":
continue

# strip away GNU versions
# strip away GLIBC versions
symbol = re.sub(r"@@.*$", "", symbol)
symbols.append(symbol)

Expand All @@ -182,7 +182,7 @@ def build_symbol_map(readelf_bin, libraries):
symbols = list_symbols(readelf_bin, lib)
for symbol in symbols:
if symbol not in symbol_map:
symbol_map[symbol] = []
symbol_map[symbol] = set()
soname = lib.split("/")[-1]
symbol_map[symbol].append(soname)
symbol_map[symbol].add(soname)
return symbol_map
2 changes: 1 addition & 1 deletion smold.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def main():
libs_for_symbol = libs_symbol_map[symbol]
if len(libs_for_symbol) > 1:
error("E: the symbol '" + symbol + "' is provided by more than one library: " + str(libs_for_symbol))
library = libs_for_symbol[0]
library = libs_for_symbol.pop()
symbols.setdefault(library, [])
symbols[library].append((symbol, reloc))

Expand Down

0 comments on commit 181c809

Please sign in to comment.