[lld] [ELF] Support relocatable files using CREL (PR #98115)
    Fangrui Song via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Jul 26 11:00:48 PDT 2024
    
    
  
================
@@ -470,6 +481,11 @@ void OutputSection::writeTo(uint8_t *buf, parallel::TaskGroup &tg) {
   llvm::TimeTraceScope timeScope("Write sections", name);
   if (type == SHT_NOBITS)
     return;
+  if (type == SHT_CREL && !(flags & SHF_ALLOC)) {
----------------
MaskRay wrote:
When `-z crel` is added for `.rela.crel` (https://github.com/MaskRay/llvm-project/tree/demo-crel), `SHF_ALLOC SHT_CREL` will be possible, so I'm inclined to keep the `!SHF_ALLOC` check.
https://github.com/llvm/llvm-project/pull/98115
    
    
More information about the llvm-commits
mailing list