Skip to content

Commit

Permalink
Fix multiple gnu versions
Browse files Browse the repository at this point in the history
  • Loading branch information
blackle committed Aug 24, 2020
1 parent 8d85d3d commit b2c5c50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions smol/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 b2c5c50

Please sign in to comment.