Skip to content
  • Peter Smith's avatar
    [ELF] Add support for static TLS to ARM · de3e7388
    Peter Smith authored
    The module index dynamic relocation R_ARM_DTPMOD32 is always 1 for an
    executable. When static linking and when we know that we are not a shared
    object we can resolve the module index relocation statically.
        
    The logic in handleNoRelaxTlsRelocation remains the same for Mips as it
    has its own custom GOT writing code. For ARM we add the module index
    relocation to the GOT when it can be resolved statically.
        
    In addition the type of the RelExpr for the static resolution of TlsGotRel
    should be R_TLS and not R_ABS as we need to include the size of
    the thread control block in the calculation.
        
    Addresses the TLS part of PR30218.
    
    Differential revision: https://reviews.llvm.org/D27213
    
    llvm-svn: 288153
    de3e7388
Loading