Changeset View
Changeset View
Standalone View
Standalone View
contrib/llvm/tools/lld/ELF/Relocations.h
Show All 28 Lines | |||||
// List of target-independent relocation types. Relocations read | // List of target-independent relocation types. Relocations read | ||||
// from files are converted to these types so that the main code | // from files are converted to these types so that the main code | ||||
// doesn't have to know about architecture-specific details. | // doesn't have to know about architecture-specific details. | ||||
enum RelExpr { | enum RelExpr { | ||||
R_INVALID, | R_INVALID, | ||||
R_ABS, | R_ABS, | ||||
R_ADDEND, | R_ADDEND, | ||||
R_AARCH64_GOT_PAGE_PC, | R_AARCH64_GOT_PAGE_PC, | ||||
// The expression is used for IFUNC support. Describes PC-relative | |||||
// address of the memory page of GOT entry. This entry is used for | |||||
// a redirection to IPLT. | |||||
R_AARCH64_GOT_PAGE_PC_PLT, | |||||
R_AARCH64_RELAX_TLS_GD_TO_IE_PAGE_PC, | R_AARCH64_RELAX_TLS_GD_TO_IE_PAGE_PC, | ||||
R_AARCH64_PAGE_PC, | R_AARCH64_PAGE_PC, | ||||
R_AARCH64_PLT_PAGE_PC, | |||||
R_AARCH64_TLSDESC_PAGE, | R_AARCH64_TLSDESC_PAGE, | ||||
R_ARM_SBREL, | R_ARM_SBREL, | ||||
R_GOT, | R_GOT, | ||||
// The expression is used for IFUNC support. Evaluates to GOT entry, | |||||
// containing redirection to the IPLT. | |||||
R_GOT_PLT, | |||||
R_GOTONLY_PC, | R_GOTONLY_PC, | ||||
R_GOTONLY_PC_FROM_END, | R_GOTONLY_PC_FROM_END, | ||||
R_GOTREL, | R_GOTREL, | ||||
R_GOTREL_FROM_END, | R_GOTREL_FROM_END, | ||||
R_GOT_FROM_END, | R_GOT_FROM_END, | ||||
R_GOT_OFF, | R_GOT_OFF, | ||||
R_GOT_PC, | R_GOT_PC, | ||||
R_HEXAGON_GOT, | R_HEXAGON_GOT, | ||||
▲ Show 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | struct RelocationOffsetComparator { | ||||
} | } | ||||
bool operator()(uint64_t Val, const Relocation &Rel) { | bool operator()(uint64_t Val, const Relocation &Rel) { | ||||
return Val < Rel.Offset; | return Val < Rel.Offset; | ||||
} | } | ||||
}; | }; | ||||
template <class ELFT> void scanRelocations(InputSectionBase &); | template <class ELFT> void scanRelocations(InputSectionBase &); | ||||
void addIRelativeRelocs(); | |||||
class ThunkSection; | class ThunkSection; | ||||
class Thunk; | class Thunk; | ||||
struct InputSectionDescription; | struct InputSectionDescription; | ||||
class ThunkCreator { | class ThunkCreator { | ||||
public: | public: | ||||
// Return true if Thunks have been added to OutputSections | // Return true if Thunks have been added to OutputSections | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |