This should be done in the following case
sample.s:
.long symbol@gotpcrel
sample.t:
PROVIDE_HIDDEN(symbol = ADDR(.section));
Both ld and gold will produce *_RELATIVE relocation for 'symbol' if we compile sample.s and link shared object using script shared.t.
This patch implements the same behavior for lld.