[PATCH] D26130: [ELF] - Implemented --symbol-ordering-file option.

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 06:22:41 PST 2016


rafael added a comment.

Please also add to the test to show that if a section has multiple symbols, we use the one with the lowest index in the order file.



================
Comment at: ELF/SymbolListFile.cpp:66
+  unsigned I = 0;
+  SmallVector<StringRef, 32> Arr;
+  MB.getBuffer().split(Arr, '\n');
----------------
I would probably just use 0 instead of 32. This will not be small in any interesting case.


================
Comment at: ELF/Writer.cpp:668
+        continue;
+      SectionsOrder.insert({D->Section, It->second});
+    }
----------------
In case two symbols point to the same section, we probably want the first one to win. This means that this should probably use the minimum.


https://reviews.llvm.org/D26130





More information about the llvm-commits mailing list