Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
Show First 20 Lines • Show All 944 Lines • ▼ Show 20 Lines | void RuntimeDyldELF::resolveBPFRelocation(const SectionEntry &Section, | ||||
uint64_t Offset, uint64_t Value, | uint64_t Offset, uint64_t Value, | ||||
uint32_t Type, int64_t Addend) { | uint32_t Type, int64_t Addend) { | ||||
bool isBE = Arch == Triple::bpfeb; | bool isBE = Arch == Triple::bpfeb; | ||||
switch (Type) { | switch (Type) { | ||||
default: | default: | ||||
report_fatal_error("Relocation type not implemented yet!"); | report_fatal_error("Relocation type not implemented yet!"); | ||||
break; | break; | ||||
case ELF::R_BPF_64_NODYLD32: | |||||
case ELF::R_BPF_NONE: | case ELF::R_BPF_NONE: | ||||
break; | break; | ||||
MaskRay: This needs an ExecutionEngine test. Otherwise, don't touch the file in this patch. | |||||
I will add a test for this. yonghong-song: I will add a test for this. | |||||
case ELF::R_BPF_64_64: { | case ELF::R_BPF_64_64: { | ||||
write(isBE, Section.getAddressWithOffset(Offset), Value + Addend); | write(isBE, Section.getAddressWithOffset(Offset), Value + Addend); | ||||
LLVM_DEBUG(dbgs() << "Writing " << format("%p", (Value + Addend)) << " at " | LLVM_DEBUG(dbgs() << "Writing " << format("%p", (Value + Addend)) << " at " | ||||
<< format("%p\n", Section.getAddressWithOffset(Offset))); | << format("%p\n", Section.getAddressWithOffset(Offset))); | ||||
break; | break; | ||||
} | } | ||||
case ELF::R_BPF_64_32: { | case ELF::R_BPF_64_32: { | ||||
Value += Addend; | Value += Addend; | ||||
▲ Show 20 Lines • Show All 1,069 Lines • Show Last 20 Lines |
This needs an ExecutionEngine test. Otherwise, don't touch the file in this patch.