Skip to content
  1. Jan 10, 2017
  2. Dec 21, 2016
  3. Dec 18, 2016
    • Rui Ueyama's avatar
      Remove lld/Support/Memory.h. · 9381eb10
      Rui Ueyama authored
      I thought for a while about how to remove it, but it looks like we
      can just copy the file for now. Of course I'm not happy about that,
      but it's just less than 50 lines of code, and we already have
      duplicate code in Error.h and some other places. I want to solve
      them all at once later.
      
      Differential Revision: https://reviews.llvm.org/D27819
      
      llvm-svn: 290062
      9381eb10
  4. Dec 15, 2016
  5. Dec 12, 2016
  6. Dec 09, 2016
    • Peter Smith's avatar
      [ELF][I386] .got.plt entries for i386 should use VA of ifunc resolver · 4b360292
      Peter Smith authored
      The i386 glibc ld.so expects the .got.slot entry that is relocated by a 
      R_386_IRELATIVE relocation to point directly at the ifunc resolver and
      not the address of the PLT entry + 6 (thus entering the lazy resolver).
      This is also the case for ARM and I suspect it is because these use REL
      relocations and can't use the addend field to store the address of the
      ifunc resolver. If the lazy resolver is used we get an error message
      stating that only R_386_JUMP_SLOT is supported.
      
      As ARM and i386 share the same code, I've removed the ARM specific test
      and added a writeIgotPlt() function that by default calls writeGotPlt().
      ARM and i386 override this to write the address of the ifunc resolver.
      
      Differential Revision: https://reviews.llvm.org/D27581
      
      llvm-svn: 289198
      4b360292
  7. Dec 08, 2016
    • Rui Ueyama's avatar
      Move Memory.{h,cpp} to lld/Support so that we can use them from COFF. · 520d9169
      Rui Ueyama authored
      llvm-svn: 289084
      520d9169
    • Peter Smith's avatar
      [ELF] ifunc implementation using synthetic sections · baffdb8b
      Peter Smith authored
      This change introduces new synthetic sections IpltSection, IgotPltSection
      that represent the ifunc entries that would previously have been put in
      the PltSection and the GotPltSection. The separation makes sure that
      the R_*_IRELATIVE relocations are placed after the non R_*_IRELATIVE
      relocations, which permits ifunc resolvers to know that the .got.plt
      slots will be initialized prior to the resolver being called.
      
      A secondary benefit is that for ARM we can move the IgotPltSection and its
      dynamic relocations to the .got and .rel.dyn as the ARM glibc expects all
      the R_*_IRELATIVE relocations to be in the .rel.dyn
      
      Differential revision: https://reviews.llvm.org/D27406
      
      llvm-svn: 289045
      baffdb8b
  8. Dec 07, 2016
  9. Dec 03, 2016
  10. Nov 29, 2016
    • George Rimar's avatar
      [ELF] - Add support of proccessing of the rest allocatable synthetic sections from linkerscript. · 3fb5a6dc
      George Rimar authored
      This change continues what was started by D27040
      Now all allocatable synthetics should be available from script side.
      
      Differential revision: https://reviews.llvm.org/D27131
      
      llvm-svn: 288150
      3fb5a6dc
    • Simon Atanasyan's avatar
      [ELF][MIPS] Do not change MipsGotSection state in the getPageEntryOffset method · 9fae3b8a
      Simon Atanasyan authored
      The MipsGotSection::getPageEntryOffset calculates index of GOT entry
      with a "page" address. Previously this method changes the state
      of MipsGotSection because it modifies PageIndexMap field. That leads
      to the unpredictable results if getPageEntryOffset called from multiple threads.
      
      The patch makes getPageEntryOffset constant. To do so it calculates GOT
      entry index but does not update PageIndexMap field. Later in the
      MipsGotSection::writeTo method linker calculates "page" addresses and
      writes them to the output.
      
      llvm-svn: 288129
      9fae3b8a
    • Simon Atanasyan's avatar
      a0efc426
    • Simon Atanasyan's avatar
      [ELF][MIPS] Fix calculation of GOT "page address" entries number · 80f3d9ce
      Simon Atanasyan authored
      If output section which referenced by R_MIPS_GOT_PAGE or R_MIPS_GOT16
      relocations is small (less that 0x10000 bytes) and occupies two adjacent
      0xffff-bytes pages, current formula gives incorrect number of required "page"
      GOT entries. The problem is that in time of calculation we do not know
      the section address and so we cannot calculate number of 0xffff-bytes
      pages exactly.
      
      This patch fix the formula. Now it gives a correct number of pages in
      the worst case when "small" section intersects 0xffff-bytes page
      boundary. From the other side, sometimes it adds one more redundant GOT
      entry for each output section. But usually number of output sections
      referenced by GOT relocations is small.
      
      llvm-svn: 288127
      80f3d9ce
    • Rafael Espindola's avatar
      Use relocations to fill statically known got entries. · f1e24531
      Rafael Espindola authored
      Right now we just remember a SymbolBody for each got entry and
      duplicate a bit of logic to decide what value, if any, should be
      written for that SymbolBody.
      
      With ARM there will be more complicated values, and it seems better to
      just use the relocation code to fill the got entries. This makes it
      clear that each entry is filled by the dynamic linker or by the static
      linker.
      
      llvm-svn: 288107
      f1e24531
  11. Nov 27, 2016
  12. Nov 25, 2016
  13. Nov 24, 2016
    • Rafael Espindola's avatar
      Use a more explicit type for the sizeof. · 4862ae8c
      Rafael Espindola authored
      llvm-svn: 287895
      4862ae8c
    • Peter Smith's avatar
      [ELF] Add terminating sentinel .ARM.exidx table entry · 719eb8ef
      Peter Smith authored
          
      The .ARM.exidx table has an entry for each function with the first entry
      giving the start address of the function, the table is sorted in ascending
      order of function address. Given a PC value, the unwinder will search the
      table for the entry that contains the PC value.
          
      If the table entry happens to be the last, the range of the addresses that
      the final unwinding table describes will extend to the end of the address
      space. To prevent an incorrect address outside the address range of the
      program matching the last entry we follow ld.bfd's example and add a
      sentinel EXIDX_CANTUNWIND entry at the end of the table. This gives the
      final real table entry an upper bound.
          
      In addition the llvm libunwind unwinder currently depends on the presence
      of a sentinel entry (PR31091).
      
      Differential revision: https://reviews.llvm.org/D26977
      
      llvm-svn: 287869
      719eb8ef
  14. Nov 23, 2016
  15. Nov 22, 2016
Loading