[PATCH] D40063: Propagate sh_entsize out
    George Rimar via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Nov 15 00:41:00 PST 2017
    
    
  
grimar accepted this revision.
grimar added a comment.
LGTM.
================
Comment at: ELF/SyntheticSections.cpp:2521
+      // Using Entsize in here also allows us to propagate it to the synthetic
+      // section.
       return Sec->Name == OutsecName && Sec->Flags == MS->Flags &&
----------------
In theory I believe there could be equal pieces when we merge string sections with different Entsize.
But that is probably too synthetic and unexpected case to care about.
================
Comment at: ELF/SyntheticSections.cpp:2531
       S = Syn;
+      Syn->Entsize = MS->Entsize;
     } else {
----------------
That is probably fine for this patch, but I find confusing that we emit SHF_MERGE flag and wrong EntSize to
regular output. Currently we select max entrysize when adding input sections to output section.
That does not make much sence I believe.
We probably might want to drop entry size and flag when doing non-relocatable link in followups.
https://reviews.llvm.org/D40063
    
    
More information about the llvm-commits
mailing list