[PATCH] D51376: ELF: Don't examine values of linker script symbols during ICF.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 01:15:40 PDT 2018


grimar accepted this revision.
grimar added a comment.
This revision is now accepted and ready to land.

LGTM. Minor nits/suggestions.



================
Comment at: lld/ELF/Symbols.h:119
+  // True if this symbol is defined by a linker script.
+  unsigned ScriptDefined : 1;
+
----------------
I think this should be added after the `NeedsTocRestore` below. Because this group of flags is
not initialized in the constructor.


================
Comment at: lld/test/ELF/linkerscript/Inputs/icf.script:2
+foo = 1;
+bar = 2;
----------------
I would avoid adding the input and just used `echo "foo = 1; bar = 1" >  %t.script` instead,


Repository:
  rL LLVM

https://reviews.llvm.org/D51376





More information about the llvm-commits mailing list