[PATCH] D19538: [ELF] - Some cleanup of Writer<ELFT>::createSections()
    George Rimar via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Apr 27 03:33:19 PDT 2016
    
    
  
grimar added inline comments.
================
Comment at: ELF/Writer.cpp:883
@@ +882,3 @@
+  // on the first page of the executable file when loaded into memory.
+  if (A == Out<ELFT>::Interp || B == Out<ELFT>::Interp)
+    return A == Out<ELFT>::Interp;
----------------
rafael wrote:
> Please use the same structure we use for the other comparisons:
> 
> AIsFoo = ...;
> BIsFoo = ...;
> if (AIsFoo != BIsFoo)
>  return ...;
> 
> I wonder if it wouldn't be nicer to just put Interp and BuildId at the start of the section list in addPredefinedSections and avoid having this special cases in the comparison function.
> 
I am not sure, because that is not so obvious, but since we had very close logic before
 and its really shorter, lets try your suggestion.
http://reviews.llvm.org/D19538
    
    
More information about the llvm-commits
mailing list