This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Inform user that we do not support relocations against text segment.
ClosedPublic

Authored by grimar on Jun 8 2016, 6:54 AM.

Details

Summary

It was reported in PR28020, that lld does not link code which
gold do. But in fact that is expected behavior as we do not
support DT_TEXTREL.

This patch changes error message as it can report about relocations against
text segments exclusively, other dynamic relocations errors can
be handled separately.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 60026.Jun 8 2016, 6:54 AM
grimar retitled this revision from to [ELF] - Inform user that we do not support relocations against text segment..
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.
ruiu edited edge metadata.Jun 8 2016, 7:41 AM

I don't think the error message is easy to understand as it now contains two types of errors. Can you separate them out?

grimar updated this revision to Diff 60179.Jun 9 2016, 8:17 AM
grimar edited edge metadata.
  • Updated error text.
grimar added a comment.Jun 9 2016, 8:17 AM
In D21133#452235, @ruiu wrote:

I don't think the error message is easy to understand as it now contains two types of errors. Can you separate them out?

It looks that place can report about relocations against text segments exclusively,
other dynamic relocations errors can be handled separately (please see D21184)

rafael accepted this revision.Jun 9 2016, 1:51 PM
rafael edited edge metadata.

I think this is a nice improvement as some of the relocations (R_X86_64_64) *can* be used, just not on a read only segment.

This revision is now accepted and ready to land.Jun 9 2016, 1:51 PM
grimar updated this object.Jun 10 2016, 1:05 AM
grimar edited edge metadata.
This revision was automatically updated to reflect the committed changes.