Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178290003
D20767.1796440579.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D20767.1796440579.diff
View Options
Index: contrib/elftoolchain/common/elfdefinitions.h
===================================================================
--- contrib/elftoolchain/common/elfdefinitions.h
+++ contrib/elftoolchain/common/elfdefinitions.h
@@ -33,7 +33,7 @@
* See: http://www.sco.com/developers/gabi/latest/ch4.intro.html
* - The May 1998 (version 1.5) draft of "The ELF-64 object format".
* - Processor-specific ELF ABI definitions for sparc, i386, amd64, mips,
- * ia64, and powerpc processors.
+ * ia64, powerpc, and RISC-V processors.
* - The "Linkers and Libraries Guide", from Sun Microsystems.
*/
@@ -426,6 +426,18 @@
"-mrelocatable flag") \
_ELF_DEFINE_EF(EF_PPC_RELOCATABLE_LIB, 0x00008000UL, \
"-mrelocatable-lib flag") \
+_ELF_DEFINE_EF(EF_RISCV_RVC, 0x00000001UL, \
+ "Compressed instruction extension") \
+_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_SINGLE, 0x00000002UL, \
+ "Single precision floating point") \
+_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_DOUBLE, 0x00000004UL, \
+ "Double precision floating point") \
+_ELF_DEFINE_EF(EF_RISCV_FLOAT_ABI_QUAD, 0x00000006UL, \
+ "Quad precision floating point") \
+_ELF_DEFINE_EF(EF_RISCV_RVE, 0x00000008UL, \
+ "Compressed instruction ABI") \
+_ELF_DEFINE_EF(EF_RISCV_TSO, 0x00000010UL, \
+ "RVTSO memory consistency model") \
_ELF_DEFINE_EF(EF_SPARC_EXT_MASK, 0x00ffff00UL, \
"Vendor Extension mask") \
_ELF_DEFINE_EF(EF_SPARC_32PLUS, 0x00000100UL, \
Index: contrib/elftoolchain/readelf/readelf.c
===================================================================
--- contrib/elftoolchain/readelf/readelf.c
+++ contrib/elftoolchain/readelf/readelf.c
@@ -431,6 +431,13 @@
{0, NULL}
};
+static struct eflags_desc riscv_eflags_desc[] = {
+ {EF_RISCV_RVC, "compressed"},
+ {EF_RISCV_RVE, "embedded"},
+ {EF_RISCV_TSO, "tso"},
+ {0, NULL}
+};
+
static struct eflags_desc sparc_eflags_desc[] = {
{EF_SPARC_32PLUS, "v8+"},
{EF_SPARC_SUN_US1, "ultrasparcI"},
@@ -2294,6 +2301,14 @@
case EM_PPC64:
edesc = powerpc_eflags_desc;
break;
+ case EM_RISCV:
+ switch ((e_flags & EF_RISCV_FLOAT_ABI_QUAD)) {
+ case EF_RISCV_FLOAT_ABI_SINGLE: printf(", float"); break;
+ case EF_RISCV_FLOAT_ABI_DOUBLE: printf(", double"); break;
+ case EF_RISCV_FLOAT_ABI_QUAD: printf(", quad"); break;
+ }
+ edesc = riscv_eflags_desc;
+ break;
case EM_SPARC:
case EM_SPARC32PLUS:
case EM_SPARCV9:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 5, 3:16 AM (18 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42218074
Default Alt Text
D20767.1796440579.diff (2 KB)
Attached To
Mode
D20767: readelf: Add support for RISC-V specific e_flags
Attached
Detach File
Event Timeline