summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-04-13 20:47:55 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-04-13 20:47:55 +0000
commit42ad510d31802b853fd59cf85a45b72619d2b7f9 (patch)
treeaa5c0a65ecc1a76dd0167d6ebb5e0eb8f15a16b1 /tools
parentea0ea637737b70162e0dddeabdc7ebdb2f631760 (diff)
downloadllvm-42ad510d31802b853fd59cf85a45b72619d2b7f9.tar.gz
llvm-42ad510d31802b853fd59cf85a45b72619d2b7f9.tar.bz2
llvm-42ad510d31802b853fd59cf85a45b72619d2b7f9.tar.xz
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
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions