Skip to content

Commit

Permalink
std.os.linux.start_pie: Handle riscv32 in getDynamicSymbol().
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Jun 22, 2024
1 parent bc4adea commit 7b413a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/std/os/linux/start_pie.zig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const R_RELATIVE = switch (builtin.cpu.arch) {
.x86_64 => R_AMD64_RELATIVE,
.arm => R_ARM_RELATIVE,
.aarch64 => R_AARCH64_RELATIVE,
.riscv64 => R_RISCV_RELATIVE,
.riscv32, .riscv64 => R_RISCV_RELATIVE,
else => @compileError("Missing R_RELATIVE definition for this target"),
};

Expand Down Expand Up @@ -57,7 +57,7 @@ fn getDynamicSymbol() [*]elf.Dyn {
\\ add %[ret], %[ret], #:lo12:_DYNAMIC
: [ret] "=r" (-> [*]elf.Dyn),
),
.riscv64 => asm volatile (
.riscv32, .riscv64 => asm volatile (
\\ .weak _DYNAMIC
\\ .hidden _DYNAMIC
\\ lla %[ret], _DYNAMIC
Expand Down

0 comments on commit 7b413a8

Please sign in to comment.