diff options
author | Shihua <shihua@iscas.ac.cn> | 2022-09-20 17:45:04 +0800 |
---|---|---|
committer | Nelson Chu <nelson@rivosinc.com> | 2022-09-21 11:43:35 +0800 |
commit | 96462b012988d35ebb1137a2ad9fd0a96547d79a (patch) | |
tree | 8e820046375df2c8c492e665dcbed2576728894d /include | |
parent | 70f35d72ef04cd23771875c1661c9975044a749c (diff) | |
download | binutils-96462b012988d35ebb1137a2ad9fd0a96547d79a.zip binutils-96462b012988d35ebb1137a2ad9fd0a96547d79a.tar.gz binutils-96462b012988d35ebb1137a2ad9fd0a96547d79a.tar.bz2 |
RISC-V: Implement Ztso extension
This patch support ZTSO extension. It will turn on the tso flag for elf_flags
once we have enabled Ztso extension. This is intended to implement v0.1 of
the proposed specification which can be found in Chapter 25 of,
https://github.com/riscv/riscv-isa-manual/releases/download/draft-20220723-10eea63/riscv-spec.pdf.
bfd\ChangeLog:
* elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Set TSO flag.
* elfxx-riscv.c: Add Ztso's arch.
binutils\ChangeLog:
* readelf.c (get_machine_flags): Set TSO flag.
gas\ChangeLog:
* config/tc-riscv.c (riscv_set_tso): Ditto.
(riscv_set_arch): Ditto.
* testsuite/gas/riscv/ztso.d: New test.
include\ChangeLog:
* elf/riscv.h (EF_RISCV_TSO): Ditto.
Diffstat (limited to 'include')
-rw-r--r-- | include/elf/riscv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/elf/riscv.h b/include/elf/riscv.h index 9b3ea37..d7b5c09 100644 --- a/include/elf/riscv.h +++ b/include/elf/riscv.h @@ -121,6 +121,9 @@ END_RELOC_NUMBERS (R_RISCV_max) /* RISC-V specific values for st_other. */ #define STO_RISCV_VARIANT_CC 0x80 +/* File uses the TSO model. */ +#define EF_RISCV_TSO 0x0010 + /* Additional section types. */ #define SHT_RISCV_ATTRIBUTES 0x70000003 /* Section holds attributes. */ |