[PATCH] D18499: [ELF] - Implemented prototype of location counter support.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 13 14:27:17 PDT 2016


ruiu added inline comments.

================
Comment at: ELF/LinkerScript.cpp:98-99
@@ +97,4 @@
+void LinkerScript::fixUpLocations(std::vector<OutputSectionBase<ELFT> *> &S) {
+  // FIXME: for now this code just puts all orphan sections to the end of
+  // Locations list. That is not correct, linker can place such sections in
+  // according to predefined rules. It is very well described at
----------------
Although it is technically correct that what we are doing here is different from the doc, I don't think it necessarily mean it needs to be marked as "FIXME". My impression is that if you control section layout using linker scripts, you need to give complete layout. So please remove "FIXME" label from this comment and just state the fact:

Orphan sections are sections present in the input files which are not explicitly placed into the output file by the linker script. We place orphan sections at end of file. Other linkers places them using some heuristics as described in https://sourceware.org/binutils/docs/ld/Orphan-Sections.html#Orphan-Sections.

================
Comment at: ELF/LinkerScript.h:69
@@ +68,3 @@
+  template <class ELFT>
+  void fixUpLocations(std::vector<OutputSectionBase<ELFT> *> &);
+  template <class ELFT>
----------------
fixUp -> fixup


http://reviews.llvm.org/D18499





More information about the llvm-commits mailing list