LLVM  16.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 
18 #include <cstdint>
19 #include <utility>
20 
21 namespace llvm {
22 namespace object {
23 
24 class ObjectFile;
25 class RelocationRef;
26 
27 using SupportsRelocation = bool (*)(uint64_t);
29  uint64_t S, uint64_t LocData,
30  int64_t Addend);
31 
32 std::pair<SupportsRelocation, RelocationResolver>
34 
36  uint64_t S, uint64_t LocData);
37 
38 } // end namespace object
39 } // end namespace llvm
40 
41 #endif // LLVM_OBJECT_RELOCATIONRESOLVER_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::object::RelocationResolver
uint64_t(*)(uint64_t Type, uint64_t Offset, uint64_t S, uint64_t LocData, int64_t Addend) RelocationResolver
Definition: RelocationResolver.h:30
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:79
llvm::RISCVFenceField::R
@ R
Definition: RISCVBaseInfo.h:265
llvm::Resolver
Interface for looking up the initializer for a variable name, used by Init::resolveReferences.
Definition: Record.h:2133
llvm::object::SupportsRelocation
bool(*)(uint64_t) SupportsRelocation
Definition: RelocationResolver.h:27
object
bar al al movzbl eax ret Missed when stored in a memory object
Definition: README.txt:1411
uint64_t
TemplateParamKind::Type
@ Type
llvm::codeview::CodeViewContainer::ObjectFile
@ ObjectFile
llvm::object::getRelocationResolver
std::pair< SupportsRelocation, RelocationResolver > getRelocationResolver(const ObjectFile &Obj)
Definition: RelocationResolver.cpp:749
llvm::object::ObjectFile
This class is the base class for all object file types.
Definition: ObjectFile.h:228
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::object::RelocationRef
This is a value type class that represents a single relocation in the list of relocations in the obje...
Definition: ObjectFile.h:51
llvm::object::resolveRelocation
uint64_t resolveRelocation(RelocationResolver Resolver, const RelocationRef &R, uint64_t S, uint64_t LocData)
Definition: RelocationResolver.cpp:846