Skip to content

Commit aeb3abc

Browse files
committed
std.os.linux.start_pie: Handle riscv32 in getDynamicSymbol().
1 parent 43410cd commit aeb3abc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/os/linux/start_pie.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const R_RELATIVE = switch (builtin.cpu.arch) {
2626
.hexagon => R_HEXAGON_RELATIVE,
2727
.loongarch32, .loongarch64 => R_LARCH_RELATIVE,
2828
.m68k => R_68K_RELATIVE,
29-
.riscv64 => R_RISCV_RELATIVE,
29+
.riscv32, .riscv64 => R_RISCV_RELATIVE,
3030
.s390x => R_390_RELATIVE,
3131
else => @compileError("Missing R_RELATIVE definition for this target"),
3232
};
@@ -111,7 +111,7 @@ fn getDynamicSymbol() [*]elf.Dyn {
111111
\\ lea (%[ret], %%pc), %[ret]
112112
: [ret] "=r" (-> [*]elf.Dyn),
113113
),
114-
.riscv64 => asm volatile (
114+
.riscv32, .riscv64 => asm volatile (
115115
\\ .weak _DYNAMIC
116116
\\ .hidden _DYNAMIC
117117
\\ lla %[ret], _DYNAMIC

0 commit comments

Comments
 (0)