authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-06-22 15:01:44+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-29 09:50:41+02:00
logaeb3abc7e649386f518638727c4d8a79dc00fc60
tree288e11c086f09caf30fa9658003ec17c9abcb26b
parent43410cdfe91548408083327e428404b192ced524
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.os.linux.start_pie: Handle riscv32 in getDynamicSymbol().


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

lib/std/os/linux/start_pie.zig+2-2
...@@ -26,7 +26,7 @@ const R_RELATIVE = switch (builtin.cpu.arch) {...@@ -26,7 +26,7 @@ const R_RELATIVE = switch (builtin.cpu.arch) {
26 .hexagon => R_HEXAGON_RELATIVE,26 .hexagon => R_HEXAGON_RELATIVE,
27 .loongarch32, .loongarch64 => R_LARCH_RELATIVE,27 .loongarch32, .loongarch64 => R_LARCH_RELATIVE,
28 .m68k => R_68K_RELATIVE,28 .m68k => R_68K_RELATIVE,
29 .riscv64 => R_RISCV_RELATIVE,29 .riscv32, .riscv64 => R_RISCV_RELATIVE,
30 .s390x => R_390_RELATIVE,30 .s390x => R_390_RELATIVE,
31 else => @compileError("Missing R_RELATIVE definition for this target"),31 else => @compileError("Missing R_RELATIVE definition for this target"),
32};32};
...@@ -111,7 +111,7 @@ fn getDynamicSymbol() [*]elf.Dyn {...@@ -111,7 +111,7 @@ fn getDynamicSymbol() [*]elf.Dyn {
111 \\ lea (%[ret], %%pc), %[ret]111 \\ lea (%[ret], %%pc), %[ret]
112 : [ret] "=r" (-> [*]elf.Dyn),112 : [ret] "=r" (-> [*]elf.Dyn),
113 ),113 ),
114 .riscv64 => asm volatile (114 .riscv32, .riscv64 => asm volatile (
115 \\ .weak _DYNAMIC115 \\ .weak _DYNAMIC
116 \\ .hidden _DYNAMIC116 \\ .hidden _DYNAMIC
117 \\ lla %[ret], _DYNAMIC117 \\ lla %[ret], _DYNAMIC