| ... | ... | @@ -1481,6 +1481,36 @@ pub const EM = enum(u16) { |
| 1481 | 1481 | _BPF = 247, |
| 1482 | 1482 | |
| 1483 | 1483 | _, |
| 1484 | |
| 1485 | pub fn toTargetCpuArch(em: EM) ?std.Target.Cpu.Arch { |
| 1486 | return switch (em) { |
| 1487 | ._AVR => .avr, |
| 1488 | ._MSP430 => .msp430, |
| 1489 | ._ARC => .arc, |
| 1490 | ._ARM => .arm, |
| 1491 | ._HEXAGON => .hexagon, |
| 1492 | ._68K => .m68k, |
| 1493 | ._MIPS => .mips, |
| 1494 | ._MIPS_RS3_LE => .mipsel, |
| 1495 | ._PPC => .powerpc, |
| 1496 | ._SPARC => .sparc, |
| 1497 | ._386 => .i386, |
| 1498 | ._XCORE => .xcore, |
| 1499 | ._CSR_KALIMBA => .kalimba, |
| 1500 | ._LANAI => .lanai, |
| 1501 | ._AARCH64 => .aarch64, |
| 1502 | ._PPC64 => .powerpc64, |
| 1503 | ._RISCV => .riscv64, |
| 1504 | ._X86_64 => .x86_64, |
| 1505 | ._BPF => .bpfel, |
| 1506 | ._SPARCV9 => .sparcv9, |
| 1507 | ._S390 => .s390x, |
| 1508 | ._SPU_2 => .spu_2, |
| 1509 | // there's many cases we don't (yet) handle, or will never have a |
| 1510 | // zig target cpu arch equivalent (such as null). |
| 1511 | else => null, |
| 1512 | }; |
| 1513 | } |
| 1484 | 1514 | }; |
| 1485 | 1515 | |
| 1486 | 1516 | /// Section data should be writable during execution. |
| ... | ... | @@ -1681,7 +1711,7 @@ pub const R_X86_64_TLSDESC = 36; |
| 1681 | 1711 | pub const R_X86_64_IRELATIVE = 37; |
| 1682 | 1712 | /// 64-bit adjust by program base |
| 1683 | 1713 | pub const R_X86_64_RELATIVE64 = 38; |
| 1684 | | /// 39 Reserved was R_X86_64_PC32_BND |
| 1714 | /// 39 Reserved was R_X86_64_PC32_BND |
| 1685 | 1715 | /// 40 Reserved was R_X86_64_PLT32_BND |
| 1686 | 1716 | /// Load from 32 bit signed pc relative offset to GOT entry without REX prefix, relaxable |
| 1687 | 1717 | pub const R_X86_64_GOTPCRELX = 41; |