[PATCH] D24795: [ELF] Linkerscript: Try to put section to the last PT_LOAD, in case there is no exact segment specification

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 19 07:12:56 PDT 2016


rafael added inline comments.


================
Comment at: ELF/LinkerScript.cpp:700
+
+    if (DefPhdrIds.empty() && Phdr.H.p_type == PT_LOAD)
+      DefPhdrIds.push_back(Ret.size() - 1);
----------------
Add a comment saying what you are doing. If I understand it, this just puts the first PT_LOAD from PHDRS in the vector. Also add a comment saying what the vector is.


================
Comment at: ELF/LinkerScript.cpp:713
+
     if (!PhdrIds.empty()) {
       // Assign headers specified by linker script
----------------
This if is not necessary anymore, no?


https://reviews.llvm.org/D24795





More information about the llvm-commits mailing list