diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2024-08-15 10:21:20 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2024-08-15 10:21:20 +0200 |
| commit | 0fd0b11bc43a6053c68f649e1e1a1e23b995a266 (patch) | |
| tree | 2826a6066d838f456b3cc537aa199e9f11e9a8fe /src/link/Elf/relocation.zig | |
| parent | 8a0cb7002e6b8f7b50fdf7ee40311ce93fbef009 (diff) | |
| download | zig-0fd0b11bc43a6053c68f649e1e1a1e23b995a266.tar.gz zig-0fd0b11bc43a6053c68f649e1e1a1e23b995a266.zip | |
riscv: do not emit GOT relocations for special linker symbols
Diffstat (limited to 'src/link/Elf/relocation.zig')
| -rw-r--r-- | src/link/Elf/relocation.zig | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/link/Elf/relocation.zig b/src/link/Elf/relocation.zig index 887aece8bc..e1a317f67d 100644 --- a/src/link/Elf/relocation.zig +++ b/src/link/Elf/relocation.zig @@ -112,15 +112,11 @@ fn formatRelocType( _ = unused_fmt_string; _ = options; const r_type = ctx.r_type; - switch (r_type) { - Elf.R_GOT_HI20_STATIC => try writer.writeAll("R_GOT_HI20_STATIC"), - Elf.R_GOT_LO12_I_STATIC => try writer.writeAll("R_GOT_LO12_I_STATIC"), - else => switch (ctx.cpu_arch) { - .x86_64 => try writer.print("R_X86_64_{s}", .{@tagName(@as(elf.R_X86_64, @enumFromInt(r_type)))}), - .aarch64 => try writer.print("R_AARCH64_{s}", .{@tagName(@as(elf.R_AARCH64, @enumFromInt(r_type)))}), - .riscv64 => try writer.print("R_RISCV_{s}", .{@tagName(@as(elf.R_RISCV, @enumFromInt(r_type)))}), - else => unreachable, - }, + switch (ctx.cpu_arch) { + .x86_64 => try writer.print("R_X86_64_{s}", .{@tagName(@as(elf.R_X86_64, @enumFromInt(r_type)))}), + .aarch64 => try writer.print("R_AARCH64_{s}", .{@tagName(@as(elf.R_AARCH64, @enumFromInt(r_type)))}), + .riscv64 => try writer.print("R_RISCV_{s}", .{@tagName(@as(elf.R_RISCV, @enumFromInt(r_type)))}), + else => unreachable, } } |
