Add support for the most common SPARC relocations.
Make DT_PLTGOT point to the PLT on SPARC.
Mark the PLT as executable on SPARC.
This adds a basic test that creates a SPARV9 executable that invokes the exit system call on OpenBSD.
Differential D34618
[LLD] Add basic 64-bit SPARC support kettenis on Jun 26 2017, 7:22 AM. Authored by
Details Add support for the most common SPARC relocations. This adds a basic test that creates a SPARV9 executable that invokes the exit system call on OpenBSD.
Diff Detail Event TimelineComment Actions Overall looking good. Thank you for doing this! Can you give me a pointer to the ABI documentation?
Comment Actions For 64-bit SPARC (SPARCV9) the relevant document is https://sparc.org/wp-content/uploads/2014/01/SCD.2.4.1.pdf.gz. Older versions and related documents are available at https://sparc.org/technical-documents/specifications/.
Comment Actions Was thinking about the older SPARCV7 CPUs used in the sun4 and sun4c machines when I made that remark. But it seems that even the SPARCV8 reference MMU uses a 4K page size. Nevertheless one would probably still use 8K as the "minimum" page size for 32-bit code to allow code to run on SPARCV9 hardware. That is what the GNU toolchain does.
Comment Actions
I wonder how did you determine "the most common"? Comment Actions Can you rebase this patch and fix these comments?
Comment Actions I just added the ones I encountered while linking some (simple) programs on OpenBSD/sparc64. Certainly plan to add more as I encounter them in the future. Supporting additional relocations is easy, but not completely trivial and having an actual example makes it easier to verify you got it right ;).
|
Is SPARC always 8k page?