[PATCH] D77672: Support a few more SPARCv9 relocations

l via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 03:12:47 PDT 2020


LemonBoy updated this revision to Diff 255941.
LemonBoy edited the summary of this revision.
LemonBoy added a comment.

I've added a few tests that cover the newly-added relocations plus a few more, `R_SPARC_LM22` is not yet tested because LLVM as doesn't recognize it but I already have a patch ready for that.

> My immediate reaction is "isn't Sparc an abandoned architecture?"

Well somebody asked if Zig <https://github.com/ziglang/zig> could target sparc64/linux so I guess there's at least a small group of users interested in it. Since we exclusively use lld I decided to fix this roadblock, this patch isn't meant to be exhaustive but focuses on the missing relocations I've found in the binaries produced by Zig.

> Does sparc64 use TLS variant 2?

AFAIR it's one of the few non-x86 arches to use it

> you mentioned IE TLS, but this only does *LE*

Typo, the relocations also have "LE" in the name :)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77672/new/

https://reviews.llvm.org/D77672

Files:
  lld/ELF/Arch/SPARCV9.cpp
  lld/test/ELF/sparcv9-reloc.s
  lld/test/ELF/sparcv9-tls-le.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77672.255941.patch
Type: text/x-patch
Size: 3610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200408/034e046c/attachment.bin>


More information about the llvm-commits mailing list