diff options
author | Shoaib Meenai <smeenai@fb.com> | 2017-09-21 21:04:42 +0000 |
---|---|---|
committer | Shoaib Meenai <smeenai@fb.com> | 2017-09-21 21:04:42 +0000 |
commit | 75d616b13ff39ec92e588fa2fb497f1ef9bb8051 (patch) | |
tree | 789c84f33ca39a7aac9360f4bc555d1f6806a4da /lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py | |
parent | 1a28f2a0027296dfe8eb99d143bd6b5b04318f7c (diff) | |
download | bcm5719-llvm-75d616b13ff39ec92e588fa2fb497f1ef9bb8051.tar.gz bcm5719-llvm-75d616b13ff39ec92e588fa2fb497f1ef9bb8051.zip |
[ELF] Fix edge condition in thunk offset calculation
For ARM thunks, the `movt` half of the relocation was using an incorrect
offset (it was off by 4 bytes). The original intent seems to have been
for the offset to have been relative to the current instruction, in
which case the difference of 4 makes sense. As the code stands, however,
the offset is always calculated relative to the start of the thunk
(`P`), and so the `movw` and `movt` halves should use the same offset.
This requires a very particular offset between the thunk and its target
to be triggered, and it results in the `movt` half of the relocation
being off-by-one.
The tests here use ARM-Thumb interworking thunks, since those are the
only ARM thunks currently implemented. I actually encountered this with
a range extension thunk (having Peter's patches cherry-picked locally),
but the underlying issue is identical.
Differential Revision: https://reviews.llvm.org/D38112
llvm-svn: 313915
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py')
0 files changed, 0 insertions, 0 deletions