[PATCH] D16405: [ELF] - Symbols from object files that override symbols in DSO are added to .dynsym table.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 11:00:11 PST 2016


ruiu added inline comments.

================
Comment at: ELF/Symbols.cpp:66
@@ +65,3 @@
+    if (isShared() != Other->isShared())
+      checkDynamicSymbolOverride<ELFT>(this, Other);
+  }
----------------
Let's do this here for consistency.

  // We want to export all symbols that exist both in the executable and in DSOs
  // so that the symbols in the executable can interrupt symbols in the DSO at runtime.
  if (isShared() != Other->isShared())
    if (!isa<DefinedRegular<ELFT>>(isShared() ? this : Other))
      IsUsedInDynamicReloc = Other->IsUsedInDynamicReloc = true;

By the way, is this correct to have this inside if (IsUsedInRegularObj || Other->IsUsedInRegularObj) {}?


http://reviews.llvm.org/D16405





More information about the llvm-commits mailing list