HomePhabricator

[ELF] Introduce Thunk reuse compatibility

Authored by peter.smith on Jul 5 2017, 2:36 AM.

Description

[ELF] Introduce Thunk reuse compatibility

On ARM the interworking thunks are only produced for branch instructions
that can't be changed into a blx instruction so only Thumb callers would
call Thumb thunks and only ARM callers would call ARM thunks. With range
extension thunks branch and link instructions may need a Thunk. These
instructions can be rewritten as a blx and can use either ARM or Thumb
thunks.

We introduce an isCompatibleWith() function so that a caller can check if
an existing Thunk is compatible before reusing it.

Differential Revision: https://reviews.llvm.org/D34035

llvm-svn: 307132

Details

Committed
peter.smithJul 5 2017, 2:36 AM
Differential Revision
D34035: [LLD][ELF] Introduce Thunk reuse compatibility
Parents
rG5aedebff3817: [ELF] Extract allocateHeaders() from assignAddresses()
Branches
Unknown
Tags
Unknown