authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-10-13 12:12:33+02:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2019-10-13 12:12:33+02:00
logba711f1115b76d85b13fc64636c4a4af8405cc1e
tree848dc40c3853cbb4742c3ef7d3211324669154ca
parent8b45921664c8f679c8154b45add84f84e3ec8128

Add ELF architecture constant for RISC-V


1 files changed, 2 insertions(+), 0 deletions(-)

lib/std/elf.zig+2
...@@ -338,6 +338,7 @@ pub const Arch = enum {...@@ -338,6 +338,7 @@ pub const Arch = enum {
338 IA_64,338 IA_64,
339 x86_64,339 x86_64,
340 AArch64,340 AArch64,
341 RiscV,
341};342};
342343
343pub const SectionHeader = struct {344pub const SectionHeader = struct {
...@@ -428,6 +429,7 @@ pub const Elf = struct {...@@ -428,6 +429,7 @@ pub const Elf = struct {
428 0x32 => Arch.IA_64,429 0x32 => Arch.IA_64,
429 0x3E => Arch.x86_64,430 0x3E => Arch.x86_64,
430 0xb7 => Arch.AArch64,431 0xb7 => Arch.AArch64,
432 0xf3 => Arch.RiscV,
431 else => return error.InvalidFormat,433 else => return error.InvalidFormat,
432 };434 };
433435