[PATCH] D47975: [ELF] Fix copy relocation when two symbols share the same Symbol instance.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 11 09:41:47 PDT 2018


MaskRay marked an inline comment as done.
MaskRay added inline comments.


================
Comment at: ELF/Relocations.cpp:455
+  // Use a set to deduplicate symbols.
+  SmallSet<SharedSymbol *, 4> Ret;
   for (const Elf_Sym &S : File.getGlobalELFSyms()) {
----------------
bkramer wrote:
> SmallSet of pointers doesn't have a stable iteration order. Does that matter here?
The iteration order doesn't matter here. These `SharedSymbol`'s are already in the symbol table. This function returns a set of pointers that will be changed to `Defined`'s.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D47975





More information about the llvm-commits mailing list