22 if (
A->SectionID !=
B->SectionID)
23 return A->SectionID <
B->SectionID ? -1 : 1;
24 if (
A->Address !=
B->Address)
25 return A->Address <
B->Address ? -1 : 1;
31 return M->getSectionID(Sec);
41 return M->getSymbolSectionID(Sym);
43 return M->getSymbolSectionId(Sym);
45 return M->getSymbolSectionID(Sym);
49std::vector<std::pair<SymbolRef, uint64_t>>
51 std::vector<std::pair<SymbolRef, uint64_t>> Ret;
54 auto Syms = E->symbols();
56 Syms = E->getDynamicSymbolIterators();
58 Ret.push_back({Sym, Sym.getSize()});
64 Ret.push_back({Sym, Sym.getSize()});
70 Ret.push_back({Sym, E->getSymbolSize(Sym)});
77 std::vector<SymEntry> Addresses;
95 if (Addresses.empty())
104 for (
unsigned I = 0, NextI = 0,
N = Addresses.size() - 1;
I <
N; ++
I) {
105 auto &
P = Addresses[
I];
106 if (
P.I == O.symbol_end())
112 while (NextI <
N && Addresses[NextI].
Address ==
P.Address)
123 if (
P.I == O.symbol_end())
125 Ret[
P.Number] = {*
P.I,
P.Address};
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static unsigned getSymbolSectionID(const ObjectFile &O, SymbolRef Sym)
static unsigned getSectionID(const ObjectFile &O, SectionRef Sec)
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
This class is the base class for all object file types.
This is a value type class that represents a single section in the list of sections in the object fil...
uint64_t getIndex() const
This is a value type class that represents a single symbol in the list of symbols in the object file.
Expected< uint64_t > getValue() const
Return the value of the symbol depending on the object this can be an offset or a virtual address.
LLVM_ABI int compareAddress(const SymEntry *A, const SymEntry *B)
LLVM_ABI std::vector< std::pair< SymbolRef, uint64_t > > computeSymbolSizes(const ObjectFile &O)
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
void array_pod_sort(IteratorTy Start, IteratorTy End)
array_pod_sort - This sorts an array with the specified start and end extent.