This is an archive of the discontinued LLVM Phabricator instance.

[lld][ELF][SPARC] Emit RELA entries
AbandonedPublic

Authored by LemonBoy on May 23 2021, 9:52 AM.

Details

Reviewers
jrtc27
MaskRay
Summary

Emit RELA entries as specified by the V9 ABI.

Diff Detail

Event Timeline

LemonBoy created this revision.May 23 2021, 9:52 AM
LemonBoy requested review of this revision.May 23 2021, 9:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2021, 9:52 AM

Can we not have a test that uses textrel; what's wrong with:

.data
x: .xword y

or

.data
x: .xword x

Can we not have a test that uses textrel; what's wrong with:

.data
x: .xword y

or

.data
x: .xword x

You're greeted with an error:
relocation R_SPARC_64 cannot be used against local symbol; recompile with -fPIC

I see, because getDynRel isn't implemented in order to return type rather than 0 when passed R_SPARC_64. Why does this backend even exist if it's so utterly broken...

Honestly, I just wouldn't bother adding a test for rela then, it'll be implicitly tested by all the tests you add in the following changes

MaskRay requested changes to this revision.Jun 16 2021, 1:38 PM

(If the idea is to do the test in a merged patch.)

This revision now requires changes to proceed.Jun 16 2021, 1:38 PM

Alright, folding this back into D102986 (with the getDynRel fix?)

LemonBoy abandoned this revision.Jun 17 2021, 11:04 PM