[LLD][ELF][Hexagon] Support GDPLT transforms
authorSid Manning <sidneym@quicinc.com>
Mon, 10 Feb 2020 23:27:53 +0000 (17:27 -0600)
committerSid Manning <sidneym@quicinc.com>
Fri, 13 Mar 2020 16:02:11 +0000 (11:02 -0500)
commit5a5a075c5b19b9024f53ecd03460c6e379798893
treecc8874a2ce5c00bd4964c2cc40c5cebe0e18cbc1
parentbf990530ae0f8d7bae77a9c94f4e57fc7fa42b2e
[LLD][ELF][Hexagon] Support GDPLT transforms

Hexagon ABI specifies that call x@gdplt is transformed to call __tls_get_addr.

Example:
     call x@gdplt
is changed to
     call __tls_get_addr

When x is an external tls variable.

Differential Revision: https://reviews.llvm.org/D74443
lld/ELF/Arch/Hexagon.cpp
lld/ELF/Relocations.cpp
lld/ELF/Relocations.h
lld/ELF/Writer.cpp
lld/test/ELF/hexagon-tls-gd-xform.s [new file with mode: 0644]