| ... | ... | @@ -13,6 +13,7 @@ const R_HEXAGON_RELATIVE = 35; |
| 13 | 13 | const R_LARCH_RELATIVE = 3; |
| 14 | 14 | const R_68K_RELATIVE = 22; |
| 15 | 15 | const R_MIPS_RELATIVE = 128; |
| 16 | const R_OR1K_RELATIVE = 21; |
| 16 | 17 | const R_PPC_RELATIVE = 22; |
| 17 | 18 | const R_RISCV_RELATIVE = 3; |
| 18 | 19 | const R_390_RELATIVE = 12; |
| ... | ... | @@ -29,6 +30,7 @@ const R_RELATIVE = switch (builtin.cpu.arch) { |
| 29 | 30 | .loongarch32, .loongarch64 => R_LARCH_RELATIVE, |
| 30 | 31 | .m68k => R_68K_RELATIVE, |
| 31 | 32 | .mips, .mipsel, .mips64, .mips64el => R_MIPS_RELATIVE, |
| 33 | .or1k => R_OR1K_RELATIVE, |
| 32 | 34 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => R_PPC_RELATIVE, |
| 33 | 35 | .riscv32, .riscv32be, .riscv64, .riscv64be => R_RISCV_RELATIVE, |
| 34 | 36 | .s390x => R_390_RELATIVE, |
| ... | ... | @@ -153,6 +155,17 @@ inline fn getDynamicSymbol() [*]const elf.Dyn { |
| 153 | 155 | : |
| 154 | 156 | : .{ .lr = true }), |
| 155 | 157 | }, |
| 158 | .or1k => asm volatile ( |
| 159 | \\ .weak _DYNAMIC |
| 160 | \\ .hidden _DYNAMIC |
| 161 | \\ l.jal 1f |
| 162 | \\ .word _DYNAMIC - . |
| 163 | \\1: |
| 164 | \\ l.lwz %[ret], 0(r9) |
| 165 | \\ l.add %[ret], %[ret], r9 |
| 166 | : [ret] "=r" (-> [*]const elf.Dyn), |
| 167 | : |
| 168 | : .{ .r9 = true }), |
| 156 | 169 | .powerpc, .powerpcle => asm volatile ( |
| 157 | 170 | \\ .weak _DYNAMIC |
| 158 | 171 | \\ .hidden _DYNAMIC |