Coverage Report

Created: 2017-09-19 22:28

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/lld/ELF/Relocations.h
Line
Count
Source
1
//===- Relocations.h -------------------------------------------*- C++ -*-===//
2
//
3
//                             The LLVM Linker
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
10
#ifndef LLD_ELF_RELOCATIONS_H
11
#define LLD_ELF_RELOCATIONS_H
12
13
#include "lld/Core/LLVM.h"
14
#include "llvm/ADT/DenseMap.h"
15
#include <map>
16
#include <vector>
17
18
namespace lld {
19
namespace elf {
20
class SymbolBody;
21
class InputSection;
22
class InputSectionBase;
23
class OutputSection;
24
class OutputSection;
25
26
// List of target-independent relocation types. Relocations read
27
// from files are converted to these types so that the main code
28
// doesn't have to know about architecture-specific details.
29
enum RelExpr {
30
  R_ABS,
31
  R_ARM_SBREL,
32
  R_GOT,
33
  R_GOTONLY_PC,
34
  R_GOTONLY_PC_FROM_END,
35
  R_GOTREL,
36
  R_GOTREL_FROM_END,
37
  R_GOT_FROM_END,
38
  R_GOT_OFF,
39
  R_GOT_PAGE_PC,
40
  R_GOT_PC,
41
  R_HINT,
42
  R_MIPS_GOTREL,
43
  R_MIPS_GOT_GP,
44
  R_MIPS_GOT_GP_PC,
45
  R_MIPS_GOT_LOCAL_PAGE,
46
  R_MIPS_GOT_OFF,
47
  R_MIPS_GOT_OFF32,
48
  R_MIPS_TLSGD,
49
  R_MIPS_TLSLD,
50
  R_NEG_TLS,
51
  R_NONE,
52
  R_PAGE_PC,
53
  R_PC,
54
  R_PLT,
55
  R_PLT_PAGE_PC,
56
  R_PLT_PC,
57
  R_PPC_OPD,
58
  R_PPC_PLT_OPD,
59
  R_PPC_TOC,
60
  R_RELAX_GOT_PC,
61
  R_RELAX_GOT_PC_NOPIC,
62
  R_RELAX_TLS_GD_TO_IE,
63
  R_RELAX_TLS_GD_TO_IE_ABS,
64
  R_RELAX_TLS_GD_TO_IE_END,
65
  R_RELAX_TLS_GD_TO_IE_PAGE_PC,
66
  R_RELAX_TLS_GD_TO_LE,
67
  R_RELAX_TLS_GD_TO_LE_NEG,
68
  R_RELAX_TLS_IE_TO_LE,
69
  R_RELAX_TLS_LD_TO_LE,
70
  R_SIZE,
71
  R_TLS,
72
  R_TLSDESC,
73
  R_TLSDESC_CALL,
74
  R_TLSDESC_PAGE,
75
  R_TLSGD,
76
  R_TLSGD_PC,
77
  R_TLSLD,
78
  R_TLSLD_PC,
79
};
80
81
// Build a bitmask with one bit set for each RelExpr.
82
//
83
// Constexpr function arguments can't be used in static asserts, so we
84
// use template arguments to build the mask.
85
// But function template partial specializations don't exist (needed
86
// for base case of the recursion), so we need a dummy struct.
87
template <RelExpr... Exprs> struct RelExprMaskBuilder {
88
16.3k
  static inline uint64_t build() { return 0; }
89
};
90
91
// Specialization for recursive case.
92
template <RelExpr Head, RelExpr... Tail>
93
struct RelExprMaskBuilder<Head, Tail...> {
94
126k
  static inline uint64_t build() {
95
126k
    static_assert(0 <= Head && Head < 64,
96
126k
                  "RelExpr is too large for 64-bit mask!");
97
126k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
126k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)48>::build()
Line
Count
Source
94
133
  static inline uint64_t build() {
95
133
    static_assert(0 <= Head && Head < 64,
96
133
                  "RelExpr is too large for 64-bit mask!");
97
133
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
133
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)18, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)14, (lld::elf::RelExpr)18, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)17, (lld::elf::RelExpr)14, (lld::elf::RelExpr)18, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)14, (lld::elf::RelExpr)18, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)15, (lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)14, (lld::elf::RelExpr)18, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)8, (lld::elf::RelExpr)15, (lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)14, (lld::elf::RelExpr)18, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)7, (lld::elf::RelExpr)8, (lld::elf::RelExpr)15, (lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)14, (lld::elf::RelExpr)18, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)40, (lld::elf::RelExpr)7, (lld::elf::RelExpr)8, (lld::elf::RelExpr)15, (lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)14, (lld::elf::RelExpr)18, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>::build()
Line
Count
Source
94
3.33k
  static inline uint64_t build() {
95
3.33k
    static_assert(0 <= Head && Head < 64,
96
3.33k
                  "RelExpr is too large for 64-bit mask!");
97
3.33k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.33k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)7>::build()
Line
Count
Source
94
3.21k
  static inline uint64_t build() {
95
3.21k
    static_assert(0 <= Head && Head < 64,
96
3.21k
                  "RelExpr is too large for 64-bit mask!");
97
3.21k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.21k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)10, (lld::elf::RelExpr)7>::build()
Line
Count
Source
94
3.21k
  static inline uint64_t build() {
95
3.21k
    static_assert(0 <= Head && Head < 64,
96
3.21k
                  "RelExpr is too large for 64-bit mask!");
97
3.21k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.21k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)7>::build()
Line
Count
Source
94
3.21k
  static inline uint64_t build() {
95
3.21k
    static_assert(0 <= Head && Head < 64,
96
3.21k
                  "RelExpr is too large for 64-bit mask!");
97
3.21k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.21k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)17, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)7>::build()
Line
Count
Source
94
3.21k
  static inline uint64_t build() {
95
3.21k
    static_assert(0 <= Head && Head < 64,
96
3.21k
                  "RelExpr is too large for 64-bit mask!");
97
3.21k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.21k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)7>::build()
Line
Count
Source
94
3.21k
  static inline uint64_t build() {
95
3.21k
    static_assert(0 <= Head && Head < 64,
96
3.21k
                  "RelExpr is too large for 64-bit mask!");
97
3.21k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.21k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)15, (lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)7>::build()
Line
Count
Source
94
3.21k
  static inline uint64_t build() {
95
3.21k
    static_assert(0 <= Head && Head < 64,
96
3.21k
                  "RelExpr is too large for 64-bit mask!");
97
3.21k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.21k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)8, (lld::elf::RelExpr)15, (lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)7>::build()
Line
Count
Source
94
3.21k
  static inline uint64_t build() {
95
3.21k
    static_assert(0 <= Head && Head < 64,
96
3.21k
                  "RelExpr is too large for 64-bit mask!");
97
3.21k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.21k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)2, (lld::elf::RelExpr)8, (lld::elf::RelExpr)15, (lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)7>::build()
Line
Count
Source
94
3.21k
  static inline uint64_t build() {
95
3.21k
    static_assert(0 <= Head && Head < 64,
96
3.21k
                  "RelExpr is too large for 64-bit mask!");
97
3.21k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
3.21k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)25>::build()
Line
Count
Source
94
4.81k
  static inline uint64_t build() {
95
4.81k
    static_assert(0 <= Head && Head < 64,
96
4.81k
                  "RelExpr is too large for 64-bit mask!");
97
4.81k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
4.81k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)24, (lld::elf::RelExpr)25>::build()
Line
Count
Source
94
4.81k
  static inline uint64_t build() {
95
4.81k
    static_assert(0 <= Head && Head < 64,
96
4.81k
                  "RelExpr is too large for 64-bit mask!");
97
4.81k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
4.81k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)28, (lld::elf::RelExpr)24, (lld::elf::RelExpr)25>::build()
Line
Count
Source
94
4.81k
  static inline uint64_t build() {
95
4.81k
    static_assert(0 <= Head && Head < 64,
96
4.81k
                  "RelExpr is too large for 64-bit mask!");
97
4.81k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
4.81k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)26, (lld::elf::RelExpr)28, (lld::elf::RelExpr)24, (lld::elf::RelExpr)25>::build()
Line
Count
Source
94
4.81k
  static inline uint64_t build() {
95
4.81k
    static_assert(0 <= Head && Head < 64,
96
4.81k
                  "RelExpr is too large for 64-bit mask!");
97
4.81k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
4.81k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)11, (lld::elf::RelExpr)21>::build()
Line
Count
Source
94
1.96k
  static inline uint64_t build() {
95
1.96k
    static_assert(0 <= Head && Head < 64,
96
1.96k
                  "RelExpr is too large for 64-bit mask!");
97
1.96k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
1.96k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)21>::build()
Line
Count
Source
94
1.96k
  static inline uint64_t build() {
95
1.96k
    static_assert(0 <= Head && Head < 64,
96
1.96k
                  "RelExpr is too large for 64-bit mask!");
97
1.96k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
1.96k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)23, (lld::elf::RelExpr)5, (lld::elf::RelExpr)6, (lld::elf::RelExpr)12, (lld::elf::RelExpr)22, (lld::elf::RelExpr)30>::build()
Line
Count
Source
94
515
  static inline uint64_t build() {
95
515
    static_assert(0 <= Head && Head < 64,
96
515
                  "RelExpr is too large for 64-bit mask!");
97
515
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
515
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)5, (lld::elf::RelExpr)6, (lld::elf::RelExpr)12, (lld::elf::RelExpr)22, (lld::elf::RelExpr)30>::build()
Line
Count
Source
94
515
  static inline uint64_t build() {
95
515
    static_assert(0 <= Head && Head < 64,
96
515
                  "RelExpr is too large for 64-bit mask!");
97
515
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
515
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)6, (lld::elf::RelExpr)12, (lld::elf::RelExpr)22, (lld::elf::RelExpr)30>::build()
Line
Count
Source
94
515
  static inline uint64_t build() {
95
515
    static_assert(0 <= Head && Head < 64,
96
515
                  "RelExpr is too large for 64-bit mask!");
97
515
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
515
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)12, (lld::elf::RelExpr)22, (lld::elf::RelExpr)30>::build()
Line
Count
Source
94
515
  static inline uint64_t build() {
95
515
    static_assert(0 <= Head && Head < 64,
96
515
                  "RelExpr is too large for 64-bit mask!");
97
515
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
515
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)22, (lld::elf::RelExpr)30>::build()
Line
Count
Source
94
515
  static inline uint64_t build() {
95
515
    static_assert(0 <= Head && Head < 64,
96
515
                  "RelExpr is too large for 64-bit mask!");
97
515
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
515
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)30>::build()
Line
Count
Source
94
515
  static inline uint64_t build() {
95
515
    static_assert(0 <= Head && Head < 64,
96
515
                  "RelExpr is too large for 64-bit mask!");
97
515
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
515
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)5, (lld::elf::RelExpr)6, (lld::elf::RelExpr)29>::build()
Line
Count
Source
94
1.86k
  static inline uint64_t build() {
95
1.86k
    static_assert(0 <= Head && Head < 64,
96
1.86k
                  "RelExpr is too large for 64-bit mask!");
97
1.86k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
1.86k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)4, (lld::elf::RelExpr)5, (lld::elf::RelExpr)6, (lld::elf::RelExpr)29>::build()
Line
Count
Source
94
1.86k
  static inline uint64_t build() {
95
1.86k
    static_assert(0 <= Head && Head < 64,
96
1.86k
                  "RelExpr is too large for 64-bit mask!");
97
1.86k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
1.86k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)5, (lld::elf::RelExpr)6, (lld::elf::RelExpr)29>::build()
Line
Count
Source
94
1.86k
  static inline uint64_t build() {
95
1.86k
    static_assert(0 <= Head && Head < 64,
96
1.86k
                  "RelExpr is too large for 64-bit mask!");
97
1.86k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
1.86k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)6, (lld::elf::RelExpr)29>::build()
Line
Count
Source
94
1.86k
  static inline uint64_t build() {
95
1.86k
    static_assert(0 <= Head && Head < 64,
96
1.86k
                  "RelExpr is too large for 64-bit mask!");
97
1.86k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
1.86k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)29>::build()
Line
Count
Source
94
1.86k
  static inline uint64_t build() {
95
1.86k
    static_assert(0 <= Head && Head < 64,
96
1.86k
                  "RelExpr is too large for 64-bit mask!");
97
1.86k
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
1.86k
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)42, (lld::elf::RelExpr)44, (lld::elf::RelExpr)43>::build()
Line
Count
Source
94
158
  static inline uint64_t build() {
95
158
    static_assert(0 <= Head && Head < 64,
96
158
                  "RelExpr is too large for 64-bit mask!");
97
158
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
158
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)44, (lld::elf::RelExpr)43>::build()
Line
Count
Source
94
158
  static inline uint64_t build() {
95
158
    static_assert(0 <= Head && Head < 64,
96
158
                  "RelExpr is too large for 64-bit mask!");
97
158
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
158
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)43>::build()
Line
Count
Source
94
158
  static inline uint64_t build() {
95
158
    static_assert(0 <= Head && Head < 64,
96
158
                  "RelExpr is too large for 64-bit mask!");
97
158
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
158
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)48, (lld::elf::RelExpr)47>::build()
Line
Count
Source
94
142
  static inline uint64_t build() {
95
142
    static_assert(0 <= Head && Head < 64,
96
142
                  "RelExpr is too large for 64-bit mask!");
97
142
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
142
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)47>::build()
Line
Count
Source
94
142
  static inline uint64_t build() {
95
142
    static_assert(0 <= Head && Head < 64,
96
142
                  "RelExpr is too large for 64-bit mask!");
97
142
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
142
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)0, (lld::elf::RelExpr)47, (lld::elf::RelExpr)48>::build()
Line
Count
Source
94
133
  static inline uint64_t build() {
95
133
    static_assert(0 <= Head && Head < 64,
96
133
                  "RelExpr is too large for 64-bit mask!");
97
133
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
133
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)47, (lld::elf::RelExpr)48>::build()
Line
Count
Source
94
133
  static inline uint64_t build() {
95
133
    static_assert(0 <= Head && Head < 64,
96
133
                  "RelExpr is too large for 64-bit mask!");
97
133
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
133
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)9>::build()
Line
Count
Source
94
99
  static inline uint64_t build() {
95
99
    static_assert(0 <= Head && Head < 64,
96
99
                  "RelExpr is too large for 64-bit mask!");
97
99
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
99
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)42, (lld::elf::RelExpr)44, (lld::elf::RelExpr)43, (lld::elf::RelExpr)45, (lld::elf::RelExpr)46>::build()
Line
Count
Source
94
126
  static inline uint64_t build() {
95
126
    static_assert(0 <= Head && Head < 64,
96
126
                  "RelExpr is too large for 64-bit mask!");
97
126
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
126
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)44, (lld::elf::RelExpr)43, (lld::elf::RelExpr)45, (lld::elf::RelExpr)46>::build()
Line
Count
Source
94
126
  static inline uint64_t build() {
95
126
    static_assert(0 <= Head && Head < 64,
96
126
                  "RelExpr is too large for 64-bit mask!");
97
126
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
126
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)43, (lld::elf::RelExpr)45, (lld::elf::RelExpr)46>::build()
Line
Count
Source
94
126
  static inline uint64_t build() {
95
126
    static_assert(0 <= Head && Head < 64,
96
126
                  "RelExpr is too large for 64-bit mask!");
97
126
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
126
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)45, (lld::elf::RelExpr)46>::build()
Line
Count
Source
94
126
  static inline uint64_t build() {
95
126
    static_assert(0 <= Head && Head < 64,
96
126
                  "RelExpr is too large for 64-bit mask!");
97
126
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
126
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)46>::build()
Line
Count
Source
94
126
  static inline uint64_t build() {
95
126
    static_assert(0 <= Head && Head < 64,
96
126
                  "RelExpr is too large for 64-bit mask!");
97
126
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
126
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)2, (lld::elf::RelExpr)7, (lld::elf::RelExpr)10, (lld::elf::RelExpr)9>::build()
Line
Count
Source
94
99
  static inline uint64_t build() {
95
99
    static_assert(0 <= Head && Head < 64,
96
99
                  "RelExpr is too large for 64-bit mask!");
97
99
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
99
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)7, (lld::elf::RelExpr)10, (lld::elf::RelExpr)9>::build()
Line
Count
Source
94
99
  static inline uint64_t build() {
95
99
    static_assert(0 <= Head && Head < 64,
96
99
                  "RelExpr is too large for 64-bit mask!");
97
99
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
99
  }
lld::elf::RelExprMaskBuilder<(lld::elf::RelExpr)10, (lld::elf::RelExpr)9>::build()
Line
Count
Source
94
99
  static inline uint64_t build() {
95
99
    static_assert(0 <= Head && Head < 64,
96
99
                  "RelExpr is too large for 64-bit mask!");
97
99
    return (uint64_t(1) << Head) | RelExprMaskBuilder<Tail...>::build();
98
99
  }
99
};
100
101
// Return true if `Expr` is one of `Exprs`.
102
// There are fewer than 64 RelExpr's, so we can represent any set of
103
// RelExpr's as a constant bit mask and test for membership with a
104
// couple cheap bitwise operations.
105
16.3k
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
16.3k
  assert(0 <= Expr && (int)Expr < 64 &&
107
16.3k
         "RelExpr is too large for 64-bit mask!");
108
16.3k
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
16.3k
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)40, (lld::elf::RelExpr)7, (lld::elf::RelExpr)8, (lld::elf::RelExpr)15, (lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)14, (lld::elf::RelExpr)18, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)26, (lld::elf::RelExpr)46, (lld::elf::RelExpr)45, (lld::elf::RelExpr)28, (lld::elf::RelExpr)43, (lld::elf::RelExpr)44, (lld::elf::RelExpr)11>(lld::elf::RelExpr)
Line
Count
Source
105
3.33k
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
3.33k
  assert(0 <= Expr && (int)Expr < 64 &&
107
3.33k
         "RelExpr is too large for 64-bit mask!");
108
3.33k
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
3.33k
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)2, (lld::elf::RelExpr)8, (lld::elf::RelExpr)15, (lld::elf::RelExpr)16, (lld::elf::RelExpr)17, (lld::elf::RelExpr)9, (lld::elf::RelExpr)10, (lld::elf::RelExpr)7>(lld::elf::RelExpr)
Line
Count
Source
105
3.21k
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
3.21k
  assert(0 <= Expr && (int)Expr < 64 &&
107
3.21k
         "RelExpr is too large for 64-bit mask!");
108
3.21k
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
3.21k
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)26, (lld::elf::RelExpr)28, (lld::elf::RelExpr)24, (lld::elf::RelExpr)25>(lld::elf::RelExpr)
Line
Count
Source
105
4.81k
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
4.81k
  assert(0 <= Expr && (int)Expr < 64 &&
107
4.81k
         "RelExpr is too large for 64-bit mask!");
108
4.81k
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
4.81k
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)2, (lld::elf::RelExpr)7, (lld::elf::RelExpr)10, (lld::elf::RelExpr)9>(lld::elf::RelExpr)
Line
Count
Source
105
99
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
99
  assert(0 <= Expr && (int)Expr < 64 &&
107
99
         "RelExpr is too large for 64-bit mask!");
108
99
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
99
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)42, (lld::elf::RelExpr)44, (lld::elf::RelExpr)43, (lld::elf::RelExpr)45, (lld::elf::RelExpr)46>(lld::elf::RelExpr)
Line
Count
Source
105
126
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
126
  assert(0 <= Expr && (int)Expr < 64 &&
107
126
         "RelExpr is too large for 64-bit mask!");
108
126
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
126
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)0, (lld::elf::RelExpr)47, (lld::elf::RelExpr)48>(lld::elf::RelExpr)
Line
Count
Source
105
133
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
133
  assert(0 <= Expr && (int)Expr < 64 &&
107
133
         "RelExpr is too large for 64-bit mask!");
108
133
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
133
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)48, (lld::elf::RelExpr)47>(lld::elf::RelExpr)
Line
Count
Source
105
142
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
142
  assert(0 <= Expr && (int)Expr < 64 &&
107
142
         "RelExpr is too large for 64-bit mask!");
108
142
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
142
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)42, (lld::elf::RelExpr)44, (lld::elf::RelExpr)43>(lld::elf::RelExpr)
Line
Count
Source
105
158
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
158
  assert(0 <= Expr && (int)Expr < 64 &&
107
158
         "RelExpr is too large for 64-bit mask!");
108
158
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
158
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)3, (lld::elf::RelExpr)4, (lld::elf::RelExpr)5, (lld::elf::RelExpr)6, (lld::elf::RelExpr)29>(lld::elf::RelExpr)
Line
Count
Source
105
1.86k
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
1.86k
  assert(0 <= Expr && (int)Expr < 64 &&
107
1.86k
         "RelExpr is too large for 64-bit mask!");
108
1.86k
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
1.86k
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)23, (lld::elf::RelExpr)5, (lld::elf::RelExpr)6, (lld::elf::RelExpr)12, (lld::elf::RelExpr)22, (lld::elf::RelExpr)30>(lld::elf::RelExpr)
Line
Count
Source
105
515
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
515
  assert(0 <= Expr && (int)Expr < 64 &&
107
515
         "RelExpr is too large for 64-bit mask!");
108
515
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
515
}
bool lld::elf::isRelExprOneOf<(lld::elf::RelExpr)11, (lld::elf::RelExpr)21>(lld::elf::RelExpr)
Line
Count
Source
105
1.96k
template <RelExpr... Exprs> bool isRelExprOneOf(RelExpr Expr) {
106
1.96k
  assert(0 <= Expr && (int)Expr < 64 &&
107
1.96k
         "RelExpr is too large for 64-bit mask!");
108
1.96k
  return (uint64_t(1) << Expr) & RelExprMaskBuilder<Exprs...>::build();
109
1.96k
}
110
111
// Architecture-neutral representation of relocation.
112
struct Relocation {
113
  RelExpr Expr;
114
  uint32_t Type;
115
  uint64_t Offset;
116
  int64_t Addend;
117
  SymbolBody *Sym;
118
};
119
120
template <class ELFT> void scanRelocations(InputSectionBase &);
121
122
class ThunkSection;
123
class Thunk;
124
125
class ThunkCreator {
126
public:
127
  // Return true if Thunks have been added to OutputSections
128
  bool createThunks(ArrayRef<OutputSection *> OutputSections);
129
130
  // The number of completed passes of createThunks this permits us
131
  // to do one time initialization on Pass 0 and put a limit on the
132
  // number of times it can be called to prevent infinite loops.
133
  uint32_t Pass = 0;
134
135
private:
136
  void mergeThunks();
137
  ThunkSection *getOSThunkSec(OutputSection *OS,
138
                              std::vector<InputSection *> *ISR);
139
  ThunkSection *getISThunkSec(InputSection *IS);
140
  void forEachExecInputSection(
141
      ArrayRef<OutputSection *> OutputSections,
142
      std::function<void(OutputSection *, std::vector<InputSection *> *,
143
                         InputSection *)>
144
          Fn);
145
  std::pair<Thunk *, bool> getThunk(SymbolBody &Body, uint32_t Type);
146
  ThunkSection *addThunkSection(OutputSection *OS,
147
                                std::vector<InputSection *> *, uint64_t Off);
148
  // Record all the available Thunks for a Symbol
149
  llvm::DenseMap<SymbolBody *, std::vector<Thunk *>> ThunkedSymbols;
150
151
  // Find a Thunk from the Thunks symbol definition, we can use this to find
152
  // the Thunk from a relocation to the Thunks symbol definition.
153
  llvm::DenseMap<SymbolBody *, Thunk *> Thunks;
154
155
  // Track InputSections that have an inline ThunkSection placed in front
156
  // an inline ThunkSection may have control fall through to the section below
157
  // so we need to make sure that there is only one of them.
158
  // The Mips LA25 Thunk is an example of an inline ThunkSection.
159
  llvm::DenseMap<InputSection *, ThunkSection *> ThunkedSections;
160
161
  // All the ThunkSections that we have created, organised by OutputSection
162
  // will contain a mix of ThunkSections that have been created this pass, and
163
  // ThunkSections that have been merged into the OutputSection on previous
164
  // passes
165
  std::map<std::vector<InputSection *> *, std::vector<ThunkSection *>>
166
      ThunkSections;
167
168
  // The ThunkSection for this vector of InputSections
169
  ThunkSection *CurTS;
170
};
171
172
// Return a int64_t to make sure we get the sign extension out of the way as
173
// early as possible.
174
template <class ELFT>
175
3
static inline int64_t getAddend(const typename ELFT::Rel &Rel) {
176
3
  return 0;
177
3
}
Unexecuted instantiation: GdbIndex.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, false> >(llvm::object::ELFType<(llvm::support::endianness)1, false>::Rel const&)
Unexecuted instantiation: ICF.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, false> >(llvm::object::ELFType<(llvm::support::endianness)0, false>::Rel const&)
Unexecuted instantiation: InputSection.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::object::ELFType<(llvm::support::endianness)1, true>::Rel const&)
Unexecuted instantiation: GdbIndex.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, false> >(llvm::object::ELFType<(llvm::support::endianness)0, false>::Rel const&)
Unexecuted instantiation: GdbIndex.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::object::ELFType<(llvm::support::endianness)1, true>::Rel const&)
Unexecuted instantiation: GdbIndex.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, true> >(llvm::object::ELFType<(llvm::support::endianness)0, true>::Rel const&)
Unexecuted instantiation: Relocations.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, false> >(llvm::object::ELFType<(llvm::support::endianness)0, false>::Rel const&)
Unexecuted instantiation: Relocations.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::object::ELFType<(llvm::support::endianness)1, true>::Rel const&)
Unexecuted instantiation: Relocations.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, true> >(llvm::object::ELFType<(llvm::support::endianness)0, true>::Rel const&)
Unexecuted instantiation: Relocations.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, false> >(llvm::object::ELFType<(llvm::support::endianness)1, false>::Rel const&)
Unexecuted instantiation: InputSection.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, true> >(llvm::object::ELFType<(llvm::support::endianness)0, true>::Rel const&)
Unexecuted instantiation: ICF.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, false> >(llvm::object::ELFType<(llvm::support::endianness)1, false>::Rel const&)
InputSection.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, false> >(llvm::object::ELFType<(llvm::support::endianness)0, false>::Rel const&)
Line
Count
Source
175
2
static inline int64_t getAddend(const typename ELFT::Rel &Rel) {
176
2
  return 0;
177
2
}
InputSection.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, false> >(llvm::object::ELFType<(llvm::support::endianness)1, false>::Rel const&)
Line
Count
Source
175
1
static inline int64_t getAddend(const typename ELFT::Rel &Rel) {
176
1
  return 0;
177
1
}
Unexecuted instantiation: ICF.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, true> >(llvm::object::ELFType<(llvm::support::endianness)0, true>::Rel const&)
Unexecuted instantiation: ICF.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::object::ELFType<(llvm::support::endianness)1, true>::Rel const&)
178
template <class ELFT>
179
1.35k
static inline int64_t getAddend(const typename ELFT::Rela &Rel) {
180
1.35k
  return Rel.r_addend;
181
1.35k
}
Unexecuted instantiation: ICF.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, false> >(llvm::object::ELFType<(llvm::support::endianness)1, false>::Rela const&)
Unexecuted instantiation: ICF.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, false> >(llvm::object::ELFType<(llvm::support::endianness)0, false>::Rela const&)
Unexecuted instantiation: GdbIndex.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, false> >(llvm::object::ELFType<(llvm::support::endianness)1, false>::Rela const&)
Unexecuted instantiation: GdbIndex.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, false> >(llvm::object::ELFType<(llvm::support::endianness)0, false>::Rela const&)
GdbIndex.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::object::ELFType<(llvm::support::endianness)1, true>::Rela const&)
Line
Count
Source
179
27
static inline int64_t getAddend(const typename ELFT::Rela &Rel) {
180
27
  return Rel.r_addend;
181
27
}
ICF.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::object::ELFType<(llvm::support::endianness)1, true>::Rela const&)
Line
Count
Source
179
14
static inline int64_t getAddend(const typename ELFT::Rela &Rel) {
180
14
  return Rel.r_addend;
181
14
}
Unexecuted instantiation: ICF.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, true> >(llvm::object::ELFType<(llvm::support::endianness)0, true>::Rela const&)
Unexecuted instantiation: InputSection.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, false> >(llvm::object::ELFType<(llvm::support::endianness)1, false>::Rela const&)
Unexecuted instantiation: InputSection.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, false> >(llvm::object::ELFType<(llvm::support::endianness)0, false>::Rela const&)
InputSection.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::object::ELFType<(llvm::support::endianness)1, true>::Rela const&)
Line
Count
Source
179
150
static inline int64_t getAddend(const typename ELFT::Rela &Rel) {
180
150
  return Rel.r_addend;
181
150
}
Unexecuted instantiation: InputSection.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, true> >(llvm::object::ELFType<(llvm::support::endianness)0, true>::Rela const&)
Relocations.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, false> >(llvm::object::ELFType<(llvm::support::endianness)1, false>::Rela const&)
Line
Count
Source
179
1
static inline int64_t getAddend(const typename ELFT::Rela &Rel) {
180
1
  return Rel.r_addend;
181
1
}
Relocations.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, false> >(llvm::object::ELFType<(llvm::support::endianness)0, false>::Rela const&)
Line
Count
Source
179
8
static inline int64_t getAddend(const typename ELFT::Rela &Rel) {
180
8
  return Rel.r_addend;
181
8
}
Relocations.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::object::ELFType<(llvm::support::endianness)1, true>::Rela const&)
Line
Count
Source
179
1.05k
static inline int64_t getAddend(const typename ELFT::Rela &Rel) {
180
1.05k
  return Rel.r_addend;
181
1.05k
}
Unexecuted instantiation: GdbIndex.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, true> >(llvm::object::ELFType<(llvm::support::endianness)0, true>::Rela const&)
Relocations.cpp:long long lld::elf::getAddend<llvm::object::ELFType<(llvm::support::endianness)0, true> >(llvm::object::ELFType<(llvm::support::endianness)0, true>::Rela const&)
Line
Count
Source
179
96
static inline int64_t getAddend(const typename ELFT::Rela &Rel) {
180
96
  return Rel.r_addend;
181
96
}
182
} // namespace elf
183
} // namespace lld
184
185
#endif