commit aeb3abc7e649386f518638727c4d8a79dc00fc60 (tree)
parent 43410cdfe91548408083327e428404b192ced524
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Sat, 22 Jun 2024 15:01:44 +0200
std.os.linux.start_pie: Handle riscv32 in getDynamicSymbol().
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/std/os/linux/start_pie.zig b/lib/std/os/linux/start_pie.zig
@@ -26,7 +26,7 @@ const R_RELATIVE = switch (builtin.cpu.arch) {
.hexagon => R_HEXAGON_RELATIVE,
.loongarch32, .loongarch64 => R_LARCH_RELATIVE,
.m68k => R_68K_RELATIVE,
- .riscv64 => R_RISCV_RELATIVE,
+ .riscv32, .riscv64 => R_RISCV_RELATIVE,
.s390x => R_390_RELATIVE,
else => @compileError("Missing R_RELATIVE definition for this target"),
};
@@ -111,7 +111,7 @@ fn getDynamicSymbol() [*]elf.Dyn {
\\ lea (%[ret], %%pc), %[ret]
: [ret] "=r" (-> [*]elf.Dyn),
),
- .riscv64 => asm volatile (
+ .riscv32, .riscv64 => asm volatile (
\\ .weak _DYNAMIC
\\ .hidden _DYNAMIC
\\ lla %[ret], _DYNAMIC