Skip to content
  1. Jun 02, 2017
    • George Rimar's avatar
      [ELF] - Assign SHF_INFO_LINK flag to REL[A] sections. · ef84219d
      George Rimar authored
      Spec says: (http://www.sco.com/developers/gabi/latest/ch4.sheader.html)
      
      sh_info
      This member holds extra information, whose interpretation depends on the section type.
      If the sh_flags field for this section header includes the attribute SHF_INFO_LINK, 
      then this member represents a section header table index.
      
      SHF_INFO_LINK
      The sh_info field of this section header holds a section header table index.
      
      Since sh_info for SHT_REL[A] sections should contain the section header index of the
      section to which the relocation applies, this is
      consistent with spec to put this flag. Behavior matches both bfd and gold as well.
      
      Differential revision: https://reviews.llvm.org/D33763
      
      llvm-svn: 304531
      ef84219d
  2. Feb 11, 2017
    • Rafael Espindola's avatar
      Create only one section symbol per section. · 08d6a3f1
      Rafael Espindola authored
      Unfortunately some consumers of our .o files produced with -r expect
      only one section symbol per section. That is true of at least of go's
      own linker.
      
      Combining them is a somewhat convoluted process. We have to create a
      symbol for every section since we don't know which ones will be
      needed. The relocation sections also have to be written first to
      handle the Elf_Rel addend.
      
      I did consider a completely different approach:
      
      We could remove the -r special case of relocation sections when
      reading. We would instead have a copyRelocs function that is used
      instead of scanRelocs. It would create a DynamicReloc for each
      relocation and a RelocationSection for each input relocation section.
      
      A complication of such change is that DynamicReloc would have to take
      a section index and a input section instead of a symbol since with
      -emit-relocs some DynamicReloc would hold relocations referring to the
      dynamic symbol table and other to the static symbol table.
      
      That would be a pretty big change, and if we do it it is probably
      better to do it as a refactoring.
      
      llvm-svn: 294816
      08d6a3f1
  3. Feb 08, 2017
Loading