Browse Source

Fix multiple GLIBC versions

pull/17/head
blackle 1 year ago
parent
commit
181c80984b
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      smol/parse.py
  2. +1
    -1
      smold.py

+ 3
- 3
smol/parse.py View File

@ -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)
@ -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

+ 1
- 1
smold.py View File

@ -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))


Loading…
Cancel
Save