aboutsummaryrefslogtreecommitdiff
path: root/lib/std/elf.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-08-25 14:49:53 -0700
committerGitHub <noreply@github.com>2024-08-25 14:49:53 -0700
commit849c31a6cc3d1e554f97c2ccf7aaa886070cfadd (patch)
treec71047e77eac9215fcef554c9f583ad2a8bd2542 /lib/std/elf.zig
parent7d54c62c8a55240bbe144ab03c78573a344598ce (diff)
parentfb6f5a30b2d6334d0f1415446849d39fe00d3af0 (diff)
downloadzig-849c31a6cc3d1e554f97c2ccf7aaa886070cfadd.tar.gz
zig-849c31a6cc3d1e554f97c2ccf7aaa886070cfadd.zip
Merge pull request #21177 from alexrp/elf-coff-conv
`std.{coff,elf}`: Remove the `{MachineType,EM}.toTargetCpuArch()` functions.
Diffstat (limited to 'lib/std/elf.zig')
-rw-r--r--lib/std/elf.zig38
1 files changed, 0 insertions, 38 deletions
diff --git a/lib/std/elf.zig b/lib/std/elf.zig
index af3f1813e2..aefaca4bef 100644
--- a/lib/std/elf.zig
+++ b/lib/std/elf.zig
@@ -1646,44 +1646,6 @@ pub const EM = enum(u16) {
FRV = 0x5441,
_,
-
- pub fn toTargetCpuArch(em: EM) ?std.Target.Cpu.Arch {
- return switch (em) {
- .AVR => .avr,
- .MSP430 => .msp430,
- .ARC => .arc,
- .ARM => .arm,
- .HEXAGON => .hexagon,
- .@"68K" => .m68k,
- .MIPS => .mips,
- .MIPS_RS3_LE => .mipsel,
- .PPC => .powerpc,
- .SPARC => .sparc,
- .@"386" => .x86,
- .XCORE => .xcore,
- .CSR_KALIMBA => .kalimba,
- .LANAI => .lanai,
- .AARCH64 => .aarch64,
- .PPC64 => .powerpc64,
- .RISCV => .riscv64,
- .X86_64 => .x86_64,
- .BPF => .bpfel,
- .SPARCV9 => .sparc64,
- .S390 => .s390x,
- .SPU_2 => .spu_2,
- // FIXME:
- // No support for .loongarch32 yet so it is safe to assume we are on .loongarch64.
- //
- // However, when e_machine is .LOONGARCH, we should check
- // ei_class's value to decide the CPU architecture.
- // - ELFCLASS32 => .loongarch32
- // - ELFCLASS64 => .loongarch64
- .LOONGARCH => .loongarch64,
- // there's many cases we don't (yet) handle, or will never have a
- // zig target cpu arch equivalent (such as null).
- else => null,
- };
- }
};
pub const GRP_COMDAT = 1;