using namespace lld;
using namespace lld::wasm;
-StringRef lld::relocTypeToString(uint8_t RelocType) {
+StringRef lld::reloctTypeToString(uint8_t RelocType) {
switch (RelocType) {
#define WASM_RELOC(NAME, REL) \
case REL: \
if (Rel.Type != R_WASM_GLOBAL_INDEX_LEB) {
uint32_t ExpectedValue = File->calcExpectedValue(Rel);
if (ExpectedValue != ExistingValue)
- warn("unexpected existing value for " + relocTypeToString(Rel.Type) +
+ warn("unexpected existing value for " + reloctTypeToString(Rel.Type) +
": existing=" + Twine(ExistingValue) +
" expected=" + Twine(ExpectedValue));
}
for (const WasmRelocation &Rel : Relocations) {
uint8_t *Loc = Buf + Rel.Offset + Off;
uint32_t Value = File->calcNewValue(Rel);
- LLVM_DEBUG(dbgs() << "apply reloc: type=" << relocTypeToString(Rel.Type)
+ LLVM_DEBUG(dbgs() << "apply reloc: type=" << reloctTypeToString(Rel.Type)
<< " addend=" << Rel.Addend << " index=" << Rel.Index
<< " value=" << Value << " offset=" << Rel.Offset
<< "\n");
} // namespace wasm
std::string toString(const wasm::InputChunk *);
-StringRef relocTypeToString(uint8_t RelocType);
+StringRef reloctTypeToString(uint8_t RelocType);
} // namespace lld
auto *Sym = File->getSymbols()[Reloc.Index];
if (Sym->isUndefined() && !Sym->isWeak())
error(File->getName() + ": relocation " +
- relocTypeToString(Reloc.Type) +
+ reloctTypeToString(Reloc.Type) +
" cannot be used againt symbol " + Sym->getName() +
"; recompile with -fPIC");
}