This is an archive of the discontinued LLVM Phabricator instance.

[LLD] Emit dynamic relocations for references to script symbols in -pie links
ClosedPublic

Authored by bd1976llvm on Apr 30 2019, 2:42 AM.

Details

Summary

https://reviews.llvm.org/D55423 caused LLD to stop emitting dynamic relocations for references to script symbols in -pie links.

This patch fixes that regression.

Diff Detail

Event Timeline

bd1976llvm created this revision.Apr 30 2019, 2:42 AM

That looks ok to me, IIRC the main problem in D55423 was hitting the cannot refer to absolute symbol error, and this will still avoid that.

grimar accepted this revision.Apr 30 2019, 3:02 AM

LGTM too (with 2 nits).

lld/test/ELF/linkerscript/symbol-pie.s
3

We normally put # REQUIRES: line first in the test cases. Please put the comment before the CHECK.

11

I would perhaps check the relocation too.

This revision is now accepted and ready to land.Apr 30 2019, 3:02 AM

Errr. The commit description should be rewritten as:

-    https://reviews.llvm.org/D61298
+    Differential Revision:  https://reviews.llvm.org/D61298

to close the revision automatically. BTW, the test had trailing \r (which I have fixed)

grimar closed this revision.May 6 2019, 1:56 AM

Was committed as r359683