Skip to content
  1. Apr 07, 2017
  2. Apr 06, 2017
    • Rui Ueyama's avatar
      Create GOT and PLT entries early in scanRelocs(). · 5036cc67
      Rui Ueyama authored
      scanRelocs() does a lot of things. It fills InputSection's Relocations vector,
      making a decision whether a TLS relocation should be relaxed or not,
      and making a decision whether a GOT/PLT slot needs to be created or not.
      
      They don't actually have to be done in a single loop. I want to separate
      them so that some of them can be run concurently. As a first step, this
      patch moves PLT/GOT slot assignment to beginning of the loop, so that
      they just fall through to the next statements. This should make it clear
      that that code doesn't affect other parts of the loop.
      
      llvm-svn: 299615
      5036cc67
    • Rui Ueyama's avatar
      Remove Target::isTlsGlobalDynamicRel() · c2a49bf9
      Rui Ueyama authored
      Relocations are abstracted as platform-independent R_TLS_* relocations,
      so we don't need to check platform-specific ones to see if a relocation
      is TLS GD.
      
      llvm-svn: 299614
      c2a49bf9
  3. Apr 05, 2017
    • Peter Smith's avatar
      [ELF] Make createThunks a class [NFC] · 56abf209
      Peter Smith authored
          
      For range extension thunks we will need to repeatedly call createThunks()
      until no more thunks are created. We will need to retain the state of
      Thunks that we have created so far to avoid recreating them on later
      passes. This change does not change the functionality of createThunks().
      
      Differential Revision: https://reviews.llvm.org/D31654
      
      llvm-svn: 299530
      56abf209
  4. Apr 03, 2017
    • Rui Ueyama's avatar
      Change the error message format for an incompatible relocation. · 6ea72527
      Rui Ueyama authored
      Previous error message style:
      
        error: /home/alice/src/bar.c:12: relocation R_X86_64_PLT32 cannot refer to absolute symbol 'answer' defined in /home/alice/src/foo.o
      
      New error message style:
      
        error: relocation R_X86_64_PLT32 cannot refer to absolute symbol: foo
        >>> defined in /home/alice/src/foo.o
        >>> referenced by bar.c:12 (/home/alice/src/bar.c:12)
        >>>               /home/alice/src/bar.o:(.text+0x1)
      
      llvm-svn: 299390
      6ea72527
  5. Mar 31, 2017
  6. Mar 30, 2017
  7. Mar 29, 2017
  8. Mar 27, 2017
    • Rui Ueyama's avatar
      Simplify. NFC. · ceb5bd59
      Rui Ueyama authored
      This patch calls getAddend on a relocation only when the relocation is RELA.
      That doesn't really improve runtime performance but should improve
      readability as the code now matches the function description.
      
      llvm-svn: 298828
      ceb5bd59
  9. Mar 26, 2017
  10. Mar 25, 2017
  11. Mar 24, 2017
    • Rui Ueyama's avatar
      Return early. · c3ddb655
      Rui Ueyama authored
      llvm-svn: 298675
      c3ddb655
    • Rui Ueyama's avatar
      Early continue. NFC. · 2c88cee1
      Rui Ueyama authored
      The original code is a big `if` and `else` which ends with `continue`
      like this:
      
        if (cond) {
          ...
          // fall through
        } else {
          ...
          continue;
        }
      
      This patch rewrites it with the following.
      
        if (!cond) {
          ...
          continue;
        }
        ...
      
      llvm-svn: 298672
      2c88cee1
  12. Mar 23, 2017
  13. Mar 20, 2017
    • Simon Atanasyan's avatar
      [ELF][MIPS] Calculate relocations agains _gp_disp / __gnu_local_gp using dedicated 'expressions' · d34a3631
      Simon Atanasyan authored
      The patch introduces two new relocations expressions R_MIPS_GOT_GP and
      R_MIPS_GOT_GP_PC. The first one represents a current value of `_gp`
      pointer and used to calculate relocations against the `__gnu_local_gp`
      symbol. The second one represents the offset between the beginning of
      the function and the `_gp` pointer's value.
      
      There are two motivations for introducing new expressions:
      - It's better to keep all non-trivial relocation calculations in the
        single place - `getRelocTargetVA` function.
      - Relocations against both `_gp_disp` and `__gnu_local_gp` symbols
        depend on the `_gp` value. It's a magical value points to the "middle"
        of GOT. Now all relocations use a common `_gp` value. But in fact,
        under some conditions each input file might require its own `_gp`
        value. I'm going to implement it in the future patches. So it's
        better to make `MipsGotSection` responsible for calculation of
        the `_gp` value.
      
      llvm-svn: 298306
      d34a3631
  14. Mar 18, 2017
    • Rui Ueyama's avatar
      Compute Config member function return values only once. · d57e74b7
      Rui Ueyama authored
      We had a few Config member functions that returns configuration values.
      For example, we had is64() which returns true if the target is 64-bit.
      The return values of these functions are constant and never change.
      
      This patch is to compute them only once to make it clear that they'll
      never change.
      
      llvm-svn: 298168
      d57e74b7
  15. Mar 17, 2017
    • Bob Haarman's avatar
      · f790f788
      Bob Haarman authored
      recommend using llvm-ar when finding undefined references and empty archives
      
      Summary:
      When we perform LTO builds with a version of ar that does not
      understand LLVM bitcode objects, we end up with undefined references,
      because our archive files do not list the bitcode symbols in their
      indices. The error messages do not make it clear what the real problem
      is. This change adds a note that points out the likely problem and
      solution. It is similar in spirit to r282633, but aims to avoid false
      positives by only triggering when we see both undefined references and
      archives without symbols in their indices.
      
      Fixes PR32281.
      
      Reviewers: davide, ruiu, tejohnson
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D31011
      
      llvm-svn: 298124
      f790f788
    • George Rimar's avatar
      [ELF] - Detemplate SymbolBody::getGotOffset(). NFC. · 4afe42e5
      George Rimar authored
      llvm-svn: 298091
      4afe42e5
    • George Rimar's avatar
      [ELF] - Detemplate DynamicReloc class. NFC. · 97def8c2
      George Rimar authored
      llvm-svn: 298072
      97def8c2
    • George Rimar's avatar
      [ELF] - Fix linux build bot. · 5a5c54f7
      George Rimar authored
      Error was:
      Relocations.cpp:792:38: error: expected primary-expression before ‘>’ token
               In<ELFT>::Iplt->addEntry<ELFT>(Body);
      
      llvm-svn: 298070
      5a5c54f7
    • George Rimar's avatar
      [ELF] - Detemplate PltSection. NFC. · dfc020e9
      George Rimar authored
      Alternative approach can be remove templated method
      either, like D31028 do.
      
      llvm-svn: 298065
      dfc020e9
Loading