[ELF] Add support for multiple passes to createThunks()
authorPeter Smith <peter.smith@linaro.org>
Fri, 27 Oct 2017 09:07:10 +0000 (09:07 +0000)
committerPeter Smith <peter.smith@linaro.org>
Fri, 27 Oct 2017 09:07:10 +0000 (09:07 +0000)
commit6c9df3fce584217a69152c383ae6365c4a69748a
tree39f3ad783c8027d9578da4b33129b49a5295444e
parent878827d93aefdfb861a6624809eaa1ac63a31fba
[ELF] Add support for multiple passes to createThunks()

This change allows Thunks to be added on multiple passes. To do this we must
merge only the thunks added in each pass, and deal with thunks that have
drifted out of range of their callers.

A thunk may end out of range of its caller if enough thunks are added in
between the caller and the thunk. To handle this we create another thunk.

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

llvm-svn: 316754
lld/ELF/LinkerScript.h
lld/ELF/Relocations.cpp
lld/ELF/Relocations.h
lld/ELF/Thunks.cpp
lld/ELF/Thunks.h
lld/ELF/Writer.cpp
lld/test/ELF/arm-thumb-condbranch-thunk.s [new file with mode: 0644]
lld/test/ELF/arm-thumb-thunk-empty-pass.s [new file with mode: 0644]
lld/test/ELF/arm-thunk-multipass.s [new file with mode: 0644]
lld/test/ELF/arm-thunk-re-add.s [new file with mode: 0644]