llvm-6502/lib
Saleem Abdulrasool 42ad510d31 MC: check machine magic when applying offset adjustments
The values for the relocation type can (and do) overlap across various
architectures.  When performing an adjustment of the emitted relocation in the
final object file, check that the file magic matches the target for which the
relocation type is valid (e.g. a I386 relocation is only applied to an X86
object file, and an AMD64 relocation is only applied to an X86_64 object file).
This was noticed while adding support for ARM WinCOFF object file emission.

A test case for this is not really possible as the values for REL32 do not
overlap on I386 and AMD64, which is why this was never noticed in practice.  The
ARM WinCOFF emission is not yet ready to merge into the tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206138 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-13 20:47:55 +00:00
..
Analysis blockfreq: Rename BlockFrequencyImpl to BlockFrequencyInfoImpl 2014-04-11 23:20:58 +00:00
AsmParser AsmParser: add a warning for compatibility parsing 2014-04-05 22:42:53 +00:00
Bitcode All new elements except the last one initialized to NULL. Ideally, once parsing is complete, all elements should be non-NULL. 2014-03-27 12:08:23 +00:00
CodeGen Retire llvm::array_endof in favor of non-member std::end. 2014-04-12 16:15:53 +00:00
DebugInfo Simplify compression API by decompressing into a SmallVector rather than a MemoryBuffer 2014-04-05 21:26:44 +00:00
ExecutionEngine LLVMBuild.txt: Add missing dependencies. 2014-04-10 11:16:47 +00:00
IR Retire llvm::array_endof in favor of non-member std::end. 2014-04-12 16:15:53 +00:00
IRReader Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker [Layering] Sink Linker.h into a Linker subdirectory to make it 2014-03-06 03:42:23 +00:00
LTO Move the segmented stack switch to a function attribute 2014-04-10 22:58:43 +00:00
MC MC: check machine magic when applying offset adjustments 2014-04-13 20:47:55 +00:00
Object [yaml2obj][ELF] ELF Relocations Support. 2014-04-11 04:13:39 +00:00
Option
ProfileData InstrProf: Silence spurious warnings in GCC 4.8 2014-03-24 00:47:18 +00:00
Support Retire llvm::array_endof in favor of non-member std::end. 2014-04-12 16:15:53 +00:00
TableGen [C++11] Make use of 'nullptr' in TableGen library. 2014-04-09 04:50:04 +00:00
Target [PowerPC] Fix rlwimi isel when mask is not constant 2014-04-13 17:10:58 +00:00
Transforms Recognize test for overflow in integer multiplication. 2014-04-13 18:23:41 +00:00
CMakeLists.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
LLVMBuild.txt ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00
Makefile ProfileData: Introduce the InstrProfReader interface and a text reader 2014-03-21 17:24:48 +00:00