005-duplicate_syms.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. --- a/src/mklibs
  2. +++ b/src/mklibs
  3. @@ -540,7 +540,6 @@ while 1:
  4. library_symbols = {}
  5. library_symbols_used = {}
  6. - symbol_provider = {}
  7. # WORKAROUND: Always add libgcc on old-abi arm
  8. header = elf_header(find_lib(libraries.copy().pop()))
  9. @@ -558,20 +557,13 @@ while 1:
  10. library_symbols_used[library] = set()
  11. for symbol in symbols:
  12. for name in symbol.base_names():
  13. - if name in symbol_provider:
  14. - debug(DEBUG_SPAM, "duplicate symbol %s in %s and %s" % (symbol, symbol_provider[name], library))
  15. - else:
  16. - library_symbols[library][name] = symbol
  17. - symbol_provider[name] = library
  18. + library_symbols[library][name] = symbol
  19. # which symbols are actually used from each lib
  20. for name in needed_symbols:
  21. - if not name in symbol_provider:
  22. - if not needed_symbols[name].weak:
  23. - print("WARNING: Unresolvable symbol %s" % name)
  24. - else:
  25. - lib = symbol_provider[name]
  26. - library_symbols_used[lib].add(library_symbols[lib][name])
  27. + for lib in libraries:
  28. + if name in library_symbols[lib]:
  29. + library_symbols_used[lib].add(library_symbols[lib][name])
  30. # reduce libraries
  31. for library in sorted(libraries):