Skip to content
  1. Jan 27, 2017
  2. Jan 26, 2017
  3. Jan 25, 2017
  4. Jan 24, 2017
    • Rui Ueyama's avatar
      Add a file comment to SyntheticSections.h. · 8981f3aa
      Rui Ueyama authored
      llvm-svn: 292980
      8981f3aa
    • George Rimar's avatar
      [ELF] - Fixed crash after incrementing end iterator. · 3a934abe
      George Rimar authored
      Next code crashed under MSVS2015 for me:
      this->OutSec->Info = this->Info = 1 + It - Symbols.begin();
      
      Because It was end() and addition of 1 is not allowed. 
      vector implementation catched and failed that inside:
      
      _Myiter& operator+=(difference_type _Off)
      {	// increment by integer
       #if _ITERATOR_DEBUG_LEVEL == 2
      if (this->_Getcont() == 0
      	|| this->_Ptr + _Off < ((_Myvec *)this->_Getcont())->_Myfirst
      	|| ((_Myvec *)this->_Getcont())->_Mylast < this->_Ptr + _Off)
         {	// report error
      	_DEBUG_ERROR("vector iterator + offset out of range");
      	_SCL_SECURE_OUT_OF_RANGE;
      
      llvm-svn: 292940
      3a934abe
    • Peter Smith's avatar
      [ELF] Correct sh_info for static symbol table · ccb34efa
      Peter Smith authored
          
      The sh_info field of the SHT_SYMTAB section holds the index for the
      first non-local symbol. When there are global symbols that are output
      with STB_LOCAL binding due to having hidden visibility or matching
      the local version from a version script, the calculated value of
      NumLocals + 1 does not account for them. This change accounts for
      global symbols being output with local binding.
      
      Differential Revision: https://reviews.llvm.org/D28950
      
      llvm-svn: 292910
      ccb34efa
    • George Rimar's avatar
      [ELF] - Added additional comments on top of r292789 (D29021) · e3c2051d
      George Rimar authored
      It was requested during post commit review.
      
      llvm-svn: 292903
      e3c2051d
    • Rui Ueyama's avatar
      Do not allocate space for common symbols with -r · b2a23cf3
      Rui Ueyama authored
      Currently ld.lld -r allocates space for common symbols, whereas ld.bfd
      -r doesn't.  As a result the OpenBSD makefile bits for creating libraries
      fail as they use ld -X -r to strip local symbols, which results in
      duplicate symbol errors because space for the common symbols has been
      allocated.
      
      The diff also implements the --define-commons option such that allocation
      of commons can be forced even if -r is used.
      
      Patch by Mark Kettenis.
      
      llvm-svn: 292878
      b2a23cf3
    • Meador Inge's avatar
      [LinkerScript] Implement `MEMORY` command · b889744e
      Meador Inge authored
      As specified here:
      
      * https://sourceware.org/binutils/docs/ld/MEMORY.html#MEMORY
      
      There are two deviations from what is specified for GNU ld:
      
        1. Only integer constants and *not* constant expressions
           are allowed in `LENGTH` and `ORIGIN` initializations.
      
        2. The `I` and `L` attributes are *not* implemented.
      
      With (1) there is currently no easy way to evaluate integer
      only constant expressions.  This can be enhanced in the
      future.
      
      With (2) it isn't clear how these flags map to the `SHF_*`
      flags or if they even make sense for an ELF linker.
      
      Differential Revision: https://reviews.llvm.org/D28911
      
      llvm-svn: 292875
      b889744e
  5. Jan 23, 2017
  6. Jan 20, 2017
  7. Jan 19, 2017
  8. Jan 18, 2017
    • Peter Smith's avatar
      [ELF] Move createThunks() after scanRelocations() · ee6d7186
      Peter Smith authored
          
      A necessary first step towards range extension thunks is to delay
      the creation of thunks until the layout of InputSections within
      OutputSections has been done.
          
      The change scans the relocations directly from InputSections rather
      than looking in the ELF File the InputSection came from. This will
      allow a future change to redirect the relocations to symbols defined
      by Thunks rather than indirect when resolving relocations.
          
      A side-effect of moving ThunkCreation is that the OutSecOff of
      InputSections may change in an OutputSection that contains Thunks.
      In well behaved programs thunks are not in OutputSections with
      dynamic relocations.
          
      Differential Revision: https://reviews.llvm.org/D28811
      
      llvm-svn: 292359
      ee6d7186
    • Rui Ueyama's avatar
      Return early if writeMapFile failed. · 40eaa996
      Rui Ueyama authored
      This patch adds a test for an invalid output path for -Map option,
      though that test is not for verifying that we are using error()
      instead of fatal() in writeMapFile.
      
      llvm-svn: 292336
      40eaa996
    • Peter Collingbourne's avatar
      ELF: Add support for relocation type R_X86_64_8. · ae30386f
      Peter Collingbourne authored
      Although this relocation type is not part of the x86-64 psABI, I intend to
      use it internally as part of the ThinLTO implementation.
      
      Differential Revision: https://reviews.llvm.org/D28841
      
      llvm-svn: 292330
      ae30386f
  9. Jan 17, 2017
  10. Jan 16, 2017
    • Simon Atanasyan's avatar
      [ELF][MIPS] Exclude mips .got from PT_GNU_RELRO segment · 2bd98af5
      Simon Atanasyan authored
      On MIPS .got section cannot be included into the PT_GNU_RELRO segment.
      Sometimes it might work, but in general it is unsupported. One of the
      problem is that all sections marked by SHF_MIPS_GPREL should be grouped
      together because data in these sections is addressable with a gp
      relative address, but such sections might be writable.
      
      This patch exclude mips .got from PT_GNU_RELRO segment and group
      SHF_MIPS_GPREL sections.
      
      llvm-svn: 292161
      2bd98af5
Loading