[PATCH] D28761: [ELF] Bypass section type check.
    Rafael Avila de Espindola via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jan 26 13:15:11 PST 2017
    
    
  
Evgeny Leviant <eleviant at accesssoftek.com> writes:
> I didn't get your previous response, so I guess something went wrong with phab.
>
> Regarding your question: I have kernel build script which generates 3 main sections (RX, RO, RW), 
> grouping all sections with corresponding access permissions and assigns specific LMA to RX, RW and RO correspondingly. 
> Both ld and gold process this script correctly out of the box.
>
> My understanding is that even though init_array (and friends) has special type it's still an RW section,
> so I think I should still be able to join it with other RW sections in linker script.
>
> So is it okay to commit this patch as is?
Please add a case similar to how we handle nobits/progbits with a comment. We
should avoid having different behavior with or without linker scripts.
The existing code I am referring to is:
    // Convert notbits to progbits if they are mixed. This happens is some
    // linker scripts.
    if (Sec->Type == SHT_NOBITS && C->Type == SHT_PROGBITS)
      Sec->Type = SHT_PROGBITS;
Cheers,
Rafael
    
    
More information about the llvm-commits
mailing list