本文整理汇总了C++中SymbolRef::getRawDataRefImpl方法的典型用法代码示例。如果您正苦于以下问题:C++ SymbolRef::getRawDataRefImpl方法的具体用法?C++ SymbolRef::getRawDataRefImpl怎么用?C++ SymbolRef::getRawDataRefImpl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SymbolRef
的用法示例。
在下文中一共展示了SymbolRef::getRawDataRefImpl方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: success
error_or<int64_t> symbol_address(const ELFObjectFile<T> &obj, const SymbolRef &sym) {
auto sym_elf = obj.getSymbol(sym.getRawDataRefImpl());
if (is_rel(obj) && !is_abs_symbol(*sym_elf)) { // abs symbols does not affected by relocations
return success(int64_t(0));
} else {
auto addr = prim::symbol_address(sym);
if (!addr) return addr;
auto base = base_address(obj);
return success(prim::relative_address(base, *addr));
}
}
示例2: getSymbol
void DyldELFObject<target_endianness, is64Bits>::updateSymbolAddress(
const SymbolRef &SymRef,
uint64_t Addr) {
Elf_Sym *sym = const_cast<Elf_Sym*>(
ELFObjectFile<target_endianness, is64Bits>::
getSymbol(SymRef.getRawDataRefImpl()));
// This assumes the address passed in matches the target address bitness
// The template-based type cast handles everything else.
sym->st_value = static_cast<addr_type>(Addr);
}
示例3: symbol_entry
void symbol_entry(const ELFObjectFile<T> &obj, const SymbolRef &sym, ogre_doc &s) {
auto sym_elf = obj.getSymbol(sym.getRawDataRefImpl());
if (is_abs_symbol(*sym_elf)) {
return;
}
auto name = prim::symbol_name(sym);
auto addr = symbol_address(obj, sym);
auto off = symbol_file_offset(obj, sym);
if (name && addr && off) {
s.entry("symbol-entry") << *name << *addr << sym_elf->st_size << *off;
if (sym_elf->getType() == ELF::STT_FUNC)
s.entry("code-entry") << *name << *off << sym_elf->st_size ;
}
}
示例4: getSymbolSectionID
unsigned COFFObjectFile::getSymbolSectionID(SymbolRef Sym) const {
COFFSymbolRef Symb = getCOFFSymbol(Sym.getRawDataRefImpl());
return Symb.getSectionNumber();
}
示例5: getCOFFSymbol
COFFSymbolRef COFFObjectFile::getCOFFSymbol(const SymbolRef &Symbol) const {
return getCOFFSymbol(Symbol.getRawDataRefImpl());
}