This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Emit relocation for GOT entry even if it is an absolute symbol
AbandonedPublic

Authored by evgeny777 on Oct 13 2016, 7:47 AM.

Details

Reviewers
ruiu
rafael
Summary

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.

Diff Detail

Event Timeline

evgeny777 updated this revision to Diff 74513.Oct 13 2016, 7:47 AM
evgeny777 retitled this revision from to [ELF] Emit relocation for GOT entry even if it is an absolute symbol.
evgeny777 updated this object.
evgeny777 added reviewers: ruiu, rafael.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.
evgeny777 added subscribers: grimar, ikudrin, llvm-commits.
ruiu edited edge metadata.Oct 17 2016, 10:59 AM

I think this is fine, but I'd like to hear what Rafael would say.

Rafael, do you have any objections against this?

evgeny777 abandoned this revision.Jan 18 2017, 8:55 AM