-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[SPARC] Add llvm-readobj support, update ELF reloc types and dynamic tags. #137916
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-objectyaml @llvm/pr-subscribers-llvm-binary-utilities Author: Alex Rønne Petersen (alexrp) ChangesSourced from binutils. Full diff: https://github.com/llvm/llvm-project/pull/137916.diff 1 Files Affected:
diff --git a/llvm/include/llvm/BinaryFormat/ELFRelocs/Sparc.def b/llvm/include/llvm/BinaryFormat/ELFRelocs/Sparc.def
index 7e01a4a8a0a06..9f10310442fa4 100644
--- a/llvm/include/llvm/BinaryFormat/ELFRelocs/Sparc.def
+++ b/llvm/include/llvm/BinaryFormat/ELFRelocs/Sparc.def
@@ -87,3 +87,12 @@ ELF_RELOC(R_SPARC_GOTDATA_LOX10, 81)
ELF_RELOC(R_SPARC_GOTDATA_OP_HIX22, 82)
ELF_RELOC(R_SPARC_GOTDATA_OP_LOX10, 83)
ELF_RELOC(R_SPARC_GOTDATA_OP, 84)
+ELF_RELOC(R_SPARC_H34, 85)
+ELF_RELOC(R_SPARC_SIZE32, 86)
+ELF_RELOC(R_SPARC_SIZE64, 87)
+ELF_RELOC(R_SPARC_WDISP10, 88)
+ELF_RELOC(R_SPARC_JMP_IREL, 248)
+ELF_RELOC(R_SPARC_IRELATIVE, 249)
+ELF_RELOC(R_SPARC_GNU_VTINHERIT, 250)
+ELF_RELOC(R_SPARC_GNU_VTENTRY, 251)
+ELF_RELOC(R_SPARC_REV32, 252)
|
22e4506
to
60eb632
Compare
(Still on a trip with limited computer access) We need a llvm-readobj test. You can git log how I update the ELF relocation types with accompanying test/tools/llvm-readobj tests. |
It seems like such a test was never added for SPARC. Would e.g. |
60eb632
to
3126e21
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Note: the majority of commits do not use a full stop at the end of the subject.
The simm13 format OR instruction should use one single fixup kind, while it currently uses a lot more, including %m44/%l44. This change refactors R_SPARC_H44/R_SPARC_M44/R_SPARC_M44 handling to remove fixup kinds and specifiers. We utilize the [0, FirstLiteralRelocationKind) MCFixupKind range to encode raw relocation types that may be resolved (see the MCAssembler.cpp change). The `evaluateAsRelocatableImpl` implementation resembles PPCMCExpr::evaluateAsRelocatableImpl.
…tags. (llvm#137916) Values sourced from binutils.
…tags. (llvm#137916) Values sourced from binutils.
…tags. (llvm#137916) Values sourced from binutils.
…tags. (llvm#137916) Values sourced from binutils.
Values sourced from binutils.