llvm-project/llvm/lib/ExecutionEngine/RuntimeDyld
Rafael Espindola 3dc0d05bf4 Improve error handling of getRelocationAddend.
This patch changes getRelocationAddend to use ErrorOr and considers it an error
to try to get the addend of a REL section.

If, for example, a x86_64 file has a REL section, that file is corrupted and
we should reject it.

Using ErrorOr is not ideal since we check the section type once per relocation
instead of once per section.

Checking once per section would involve getRelocationAddend just asserting and
callers checking the section before iterating over the relocations.

In any case, this is an improvement and includes a test.

llvm-svn: 240176
2015-06-19 20:58:43 +00:00
..
Targets Fixed/added namespace ending comments using clang-tidy. NFC 2015-06-19 15:57:42 +00:00
CMakeLists.txt modules: Add explicit dependency on intrinsics_gen 2015-06-16 00:44:12 +00:00
LLVMBuild.txt Fix build following r211956 2014-06-28 06:31:47 +00:00
Makefile
RTDyldMemoryManager.cpp Avoid warning about inability to cast from ptr-to-obj to ptr-to-fun. 2015-06-19 17:21:02 +00:00
RuntimeDyld.cpp Remove object_error::success and use std::error_code() instead 2015-06-09 15:20:42 +00:00
RuntimeDyldCOFF.cpp Fixed/added namespace ending comments using clang-tidy. NFC 2015-06-19 15:57:42 +00:00
RuntimeDyldCOFF.h [MCJIT][Orc] Refactor RTDyldMemoryManager, weave RuntimeDyld::SymbolInfo through 2015-03-30 03:37:06 +00:00
RuntimeDyldChecker.cpp Fixed/added namespace ending comments using clang-tidy. NFC 2015-06-19 15:57:42 +00:00
RuntimeDyldCheckerImpl.h Fixed/added namespace ending comments using clang-tidy. NFC 2015-06-19 15:57:42 +00:00
RuntimeDyldELF.cpp Improve error handling of getRelocationAddend. 2015-06-19 20:58:43 +00:00
RuntimeDyldELF.h Improve error handling of getRelocationAddend. 2015-06-19 20:58:43 +00:00
RuntimeDyldImpl.h [Mips64] Add support for MCJIT for MIPS64r2 and MIPS64r6 2015-05-28 13:48:41 +00:00
RuntimeDyldMachO.cpp Fixed/added namespace ending comments using clang-tidy. NFC 2015-06-19 15:57:42 +00:00
RuntimeDyldMachO.h [MCJIT][Orc] Refactor RTDyldMemoryManager, weave RuntimeDyld::SymbolInfo through 2015-03-30 03:37:06 +00:00