Fix unsupported relocation type R_HEX_6_X' for symbol .rodata
authorRon Lieberman <ronl@codeaurora.org>
Sat, 13 Aug 2016 23:41:11 +0000 (23:41 +0000)
committerRon Lieberman <ronl@codeaurora.org>
Sat, 13 Aug 2016 23:41:11 +0000 (23:41 +0000)
commit822ee88ab88d8ce07c806c7311f79bcbde7fe6d0
tree0861607322cc84fb2294f058965b2de649d9a506
parent466a64e2987cdab261f0c9bf25f0ddddc37f716f
Fix unsupported relocation type R_HEX_6_X' for symbol .rodata

LowerTargetConstantPool is not properly setting the TargetFlag to indicate
desired relocation. Coding error, the offset parameter was omitted, so the
TargetFlag was used as the offset, and the TargetFlag defaulted to zero.

This only affects -fpic compilation, and only those items created in a
Constant Pool, for example a vector of constants. Halide ran into this issue.

llvm-svn: 278614
llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
llvm/test/CodeGen/Hexagon/const-pool-tf.ll [new file with mode: 0644]