Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defining an ELF attribute for RISC-V target profiles
This commit defines an ELF attribute which allows tools to set a RISC-V target profile. We already have a few ratified RISC-V profiles, but so far they are treated as "pretty names" (or non-canonical abbreviations) for an ISA base plus a set of extensions. Further, most of the extensions of a profile are irrelevant for toolchain components (e.g. supervisor mode extensions) and thus it is not clear how to decompose profiles into an tools-compatible arch string, that allows to reliably reconstruct the profile that a piece of software was written for (i.e., the profile that the execution environment is expected to implement). This commit attempts to resolve this situation by defining a new attribute that allows to store the target profile. The string representation is used to ensure a future-proof encoding. This should not be a performance issue, since profile names are typically very short (less than 10 characters). This commit also provides a few hints for linkers and run-times, but does not mandate anything. Signed-off-by: Christoph Müllner <[email protected]>
- Loading branch information