-
Notifications
You must be signed in to change notification settings - Fork 153
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
ADI SHARC Architecture support #593
Conversation
Is there any documentation for the SHARC ELF PSABI? |
Not as such. There is some public documentation for the official toolchain and processor, which contains some of the information:
There is also some documentation which is only available within the toolchain package itself, in header files, example code, and embedded HTML documentation. I can't share this, but anybody can go see it by obtaining a trial license. There are some parts, such as the relocation specifics, which are undocumented. I obtained these values through reverse engineering the toolchain output.
I'm using this branch from a private crate which serves as the SHARC backend to our in-house compiler. I'm focusing on writing DOJ (the intermediate object format) right now, so that is the well exercised part. |
Encoded as normal ELF attributes, with proprietary tags. I have an implementation of the full encode/decode in a private repo, which I can share for porting into `object` if needed, but it seems a bit out of scope.
E.g. a 6-bit PC-relative relocation into a 48-bit instruction has `size == 6`, not `size == 48`.
As suggested by @philipc. Combined with the previous commit's change to the meaning of `size` for these relocations, there is no longer any ambiguity when converting between the 3-tuple and Rel::r_type constants.
As discussed in PR gimli-rs#593 The `_` pattern will take these matches now, so the result is still an Error, just with a (probably) more truthful message.
* Add Architecture::Sharc * elf: Add support for SHARC+ relocations * elf: sharc: add SHT_SHARC_ADI_ATTRIBUTES
This PR adds a few architecture-specific constants for the ADI SHARC+ architecture. It uses ELF as the base format for its intermediate and executable objects.