LLVM 22.0.0git
RelocationResolver.h
Go to the documentation of this file.
1//===- RelocVisitor.h - Visitor for object file relocations -----*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file provides a wrapper around all the different types of relocations
10// in different file formats, such that a client can handle them in a unified
11// manner by only implementing a minimal number of functions.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_OBJECT_RELOCATIONRESOLVER_H
16#define LLVM_OBJECT_RELOCATIONRESOLVER_H
17
19#include <cstdint>
20#include <utility>
21
22namespace llvm {
23namespace object {
24
25class ObjectFile;
26class RelocationRef;
27
30 uint64_t S, uint64_t LocData,
31 int64_t Addend);
32
33LLVM_ABI std::pair<SupportsRelocation, RelocationResolver>
35
37 const RelocationRef &R, uint64_t S,
38 uint64_t LocData);
39
40} // end namespace object
41} // end namespace llvm
42
43#endif // LLVM_OBJECT_RELOCATIONRESOLVER_H
RelocType Type
Definition: COFFYAML.cpp:410
#define LLVM_ABI
Definition: Compiler.h:213
Interface for looking up the initializer for a variable name, used by Init::resolveReferences.
Definition: Record.h:2196
This class is the base class for all object file types.
Definition: ObjectFile.h:231
This is a value type class that represents a single relocation in the list of relocations in the obje...
Definition: ObjectFile.h:54
uint64_t(*)(uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t Addend) RelocationResolver
bool(*)(uint64_t) SupportsRelocation
LLVM_ABI uint64_t resolveRelocation(RelocationResolver Resolver, const RelocationRef &R, uint64_t S, uint64_t LocData)
LLVM_ABI std::pair< SupportsRelocation, RelocationResolver > getRelocationResolver(const ObjectFile &Obj)
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:477