[PATCH] D22625: [ELF] Support PROVIDE and PROVIDE_HIDDEN within SECTIONS {} block

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 06:45:00 PDT 2016


evgeny777 added inline comments.

================
Comment at: ELF/LinkerScript.cpp:283
@@ -283,3 +282,3 @@
         Dot = Val;
-      } else {
+      else if (Cmd->Provision != SymbolProvision::Ignore) {
         auto *D = cast<DefinedRegular<ELFT>>(Symtab<ELFT>::X->find(Cmd->Name));
----------------
ruiu wrote:
> So, is it equivalent to `Cmd->Provision == SymbolProvision::Create`, no?
Not exactly. It could also be SymbolProvision::Provide and SymbolProvision::ProvideHidden.

We set Provision to Ignore only when the following two conditions are met:
a) Initially Provision == Provide or Provsion == ProvideHidden
b) Symbol has been already defined (Symtab::find(Name) returns valid pointer)

In all other cases we should set the Symbol value


Repository:
  rL LLVM

https://reviews.llvm.org/D22625





More information about the llvm-commits mailing list