[PATCH] D19190: [ELF] - Implemented PROVIDE linker script command.

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 12:47:55 PDT 2016


rafael added a comment.

I think this is fine, but since it is linker script please wait for Rui's final check.


================
Comment at: ELF/LinkerScript.cpp:175
@@ -174,3 +174,3 @@
 static OutputSectionBase<ELFT> *
-findSection(std::vector<OutputSectionBase<ELFT> *> &V, StringRef Name) {
+findSection(ArrayRef<OutputSectionBase<ELFT> *> V, StringRef Name) {
   for (OutputSectionBase<ELFT> *Sec : V)
----------------
Using ArrayRef is a nice independent cleanup. Please commit it first.

================
Comment at: ELF/LinkerScript.cpp:243
@@ +242,3 @@
+template <class ELFT>
+void LinkerScript::createSymbols(SymbolTable<ELFT> &Symtab,
+                                 ArrayRef<OutputSectionBase<ELFT> *> Sections) {
----------------
This only handles symbols at the start and end of output sections, right?

I guess that is a reasonable restriction for now. We can add support afterwards for recording an offset.



http://reviews.llvm.org/D19190





More information about the llvm-commits mailing list