1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02: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 [llvm-dlltool] Respect NONAME keyword 2019-05-22 09:49:54 +00:00
COFFModuleDefinition.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
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 Recommit [Object] Change object::SectionRef::getContents() to return Expected<StringRef> 2019-05-16 13:24:04 +00:00
IRSymtab.cpp [ELF] Implement Dependent Libraries Feature 2019-05-17 03:44:15 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
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 Minidump: Add support for the MemoryList stream 2019-05-16 15:17:30 +00:00
ModuleSymbolTable.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
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 [AsmPrinter] Remove hidden flag -print-schedule. 2019-02-04 12:51:26 +00:00
RecordStreamer.h [AsmPrinter] Remove hidden flag -print-schedule. 2019-02-04 12:51:26 +00:00
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 Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
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