This is an archive of the discontinued LLVM Phabricator instance.

[ELF][Hexagon] Improve error message for unknown relocations
ClosedPublic

Authored by MaskRay on Aug 14 2019, 9:42 PM.

Details

Summary

Like rLLD354040

Previously, for unrecognized relocation types, in -no-pie/-pie mode, we got something like:

foo.o: unrecognized relocation ...

In -shared mode:

error: can't create dynamic relocation ... against symbol: yyy in readonly segment

Delete the default case from Hexagon::getRelExpr and add the error there. We will get consistent error message like error: unknown relocation (1024) against symbol foo

Event Timeline

MaskRay created this revision.Aug 14 2019, 9:42 PM
ruiu added a comment.Aug 19 2019, 2:51 AM

LGTM but please wait for Sid.

MaskRay edited the summary of this revision. (Show Details)Aug 19 2019, 3:00 AM
MaskRay edited the summary of this revision. (Show Details)
sidneym accepted this revision.Aug 19 2019, 6:50 AM
This revision is now accepted and ready to land.Aug 19 2019, 6:50 AM
This revision was automatically updated to reflect the committed changes.