llvm-capstone/lld
Shoaib Meenai 75d616b13f [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
2017-09-21 21:04:42 +00:00
..
cmake/modules
COFF [COFF] Adjust secrel limit check 2017-09-20 00:21:58 +00:00
docs Update the monorepo URL in a lld's document. 2017-09-15 21:04:43 +00:00
ELF [ELF] Fix edge condition in thunk offset calculation 2017-09-21 21:04:42 +00:00
include/lld LLD: Introduce a GNU LD style driver for COFF 2017-09-11 17:02:59 +00:00
lib [MACH-O] Fix the ASM code generated for __stub_helpers section 2017-08-24 23:51:40 +00:00
MinGW Accept not only --foo but also -foo. 2017-09-14 18:33:21 +00:00
test [ELF] Fix edge condition in thunk offset calculation 2017-09-21 21:04:42 +00:00
tools/lld LLD: Introduce a GNU LD style driver for COFF 2017-09-11 17:02:59 +00:00
unittests
.arcconfig
.clang-format
.gitignore
CMakeLists.txt LLD: Introduce a GNU LD style driver for COFF 2017-09-11 17:02:59 +00:00
CODE_OWNERS.TXT
LICENSE.TXT
README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.