[PATCH] D37774: Remove CopyRelSecOff from SharedSymbol
    Rui Ueyama via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Sep 12 14:49:25 PDT 2017
    
    
  
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: ELF/Relocations.cpp:528-529
   bool IsReadOnly = isReadOnly<ELFT>(SS);
-  BssSection *Sec = IsReadOnly ? InX::BssRelRo : InX::Bss;
+  BssSection *Sec = make<BssSection>(IsReadOnly ? ".bss.rel.ro" : ".bss");
   uint64_t Off = Sec->reserveSpace(SymSize, SS->getAlignment<ELFT>());
+  if (IsReadOnly)
----------------
Since you just created Sec, it is too obvious that `Off` is zero, no? I wouldn't assert that.
https://reviews.llvm.org/D37774
    
    
More information about the llvm-commits
mailing list