summaryrefslogtreecommitdiffstats
path: root/llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp
diff options
context:
space:
mode:
authorPeter Smith <peter.smith@linaro.org>2020-01-23 19:03:25 +0000
committerHans Wennborg <hans@chromium.org>2020-01-29 21:25:28 +0100
commit81d73c6de33b2282f7174bd378699feac69bc5aa (patch)
treeeac8c8b1331de0c4f9aa8c184b3a606e6f3c8204 /llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp
parent5777899f146aaa53f598e6978702a7a2725200d7 (diff)
downloadbcm5719-llvm-81d73c6de33b2282f7174bd378699feac69bc5aa.tar.gz
bcm5719-llvm-81d73c6de33b2282f7174bd378699feac69bc5aa.zip
[LLD][ELF][ARM] Do not insert interworking thunks for non STT_FUNC symbols
ELF for the ARM architecture requires linkers to provide interworking for symbols that are of type STT_FUNC. Interworking for other symbols must be encoded directly in the object file. LLD was always providing interworking, regardless of the symbol type, this breaks some programs that have branches from Thumb state targeting STT_NOTYPE symbols that have bit 0 clear, but they are in fact internal labels in a Thumb function. LLD treats these symbols as ARM and inserts a transition to Arm. This fixes the problem for in range branches, R_ARM_JUMP24, R_ARM_THM_JUMP24 and R_ARM_THM_JUMP19. This is expected to be the vast majority of problem cases as branching to an internal label close to the function. There is at least one follow up patch required. - R_ARM_CALL and R_ARM_THM_CALL may do interworking via BL/BLX substitution. In theory range-extension thunks can be altered to not change state when the symbol type is not STT_FUNC. I will need to check with ld.bfd to see if this is the case in practice. Fixes (part of) https://github.com/ClangBuiltLinux/linux/issues/773 Differential Revision: https://reviews.llvm.org/D73474 (cherry picked from commit 4f38ab250ff4680375c4c01db0a88c157093c665)
Diffstat (limited to 'llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud