1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib/Object
Yonghong Song 1e7c1b5239 [BPF] Fix bpf llvm-objdump issues.
Commit https://reviews.llvm.org/D57939 ("[DWARF] Refactor
RelocVisitor and fix computation of SHT_RELA-typed relocation entries)
made a change for relocation resolution when operating
on an object file.

The change unfortunately broke BPF as given SymbolValue (S) and
Addent (A), previously relocation is resolved to
    S + A
and after the change, it is resolved to
    S

This patch fixed the issue by resolving relocation correctly.

It looks not all relocation resolution reaches here and I did not
trace down exactly when. But I do find if the object file includes
codes in two different ELF sections than default ".text",
the above bug will be triggered.

This patch included a trivial two function source code to
demonstrate this issue. The relocation for .debug_loc is resolved
incorrectly due to this and llvm-objdump cannot display source
annotated assembly.

Differential Revision: https://reviews.llvm.org/D66372

llvm-svn: 369199
2019-08-17 22:12:00 +00:00
..
Archive.cpp [llvm-ar] Fix support for archives with members larger than 4GB 2019-07-23 14:44:21 +00:00
ArchiveWriter.cpp [llvm-ar] Fix support for archives with members larger than 4GB 2019-07-23 14:44:21 +00:00
Binary.cpp [Object][XCOFF] Add support for 64-bit file header and section header dumping. 2019-07-09 18:09:11 +00:00
CMakeLists.txt Share /machine: handling code with llvm-cvtres too 2019-06-12 11:32:43 +00:00
COFFImportFile.cpp
COFFModuleDefinition.cpp
COFFObjectFile.cpp Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>" 2019-08-14 11:10:11 +00:00
Decompressor.cpp Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>" 2019-08-14 11:10:11 +00:00
ELF.cpp [Object/ELF.h] - Improve error reporting. 2019-07-05 11:28:49 +00:00
ELFObjectFile.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
Error.cpp [Object] isNotObjectErrorInvalidFileType: simplify 2019-07-13 09:28:33 +00:00
IRObjectFile.cpp
IRSymtab.cpp
LLVMBuild.txt
MachOObjectFile.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
MachOUniversal.cpp [Object] Add public MaxSectionAlignment to MachOUniversal 2019-07-25 00:29:13 +00:00
Minidump.cpp
ModuleSymbolTable.cpp
Object.cpp Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return Expected<>" 2019-08-14 11:10:11 +00:00
ObjectFile.cpp [Object][XCOFF] Add support for 64-bit file header and section header dumping. 2019-07-09 18:09:11 +00:00
RecordStreamer.cpp
RecordStreamer.h
RelocationResolver.cpp [BPF] Fix bpf llvm-objdump issues. 2019-08-17 22:12:00 +00:00
SymbolicFile.cpp [Object][XCOFF] Add support for 64-bit file header and section header dumping. 2019-07-09 18:09:11 +00:00
SymbolSize.cpp
WasmObjectFile.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
WindowsMachineFlag.cpp Share /machine: handling code with llvm-cvtres too 2019-06-12 11:32:43 +00:00
WindowsResource.cpp lld-link: Reject more than one resource .obj file 2019-06-11 15:22:28 +00:00
XCOFFObjectFile.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00