Skip to content
  • Rafael Espindola's avatar
    Alternative way to detemplate GotSection. · a6465bbb
    Rafael Espindola authored
    GetSection is a template because write calls relocate.
    
    relocate has two parts. The non alloc code really has to be a
    template, as it is looking a raw input file data.
    
    The alloc part is only a template because of getSize.
    
    This patch folds the value of getSize early, detemplates
    getRelocTargetVA and splits relocate into a templated non alloc case
    and a regular function for the alloc case. This has the nice advantage
    of making sure we collect all the information we need for relocations
    before getting to InputSection::relocateNonAlloc.
    
    Since we know got is alloc, it can just call the function directly and
    avoid the template.
    
    llvm-svn: 303355
    a6465bbb
Loading