Skip to content

Commit db8e595

Browse files
committed
riscv64: skip RELAX relocations
They does not modify data so it is safe to be skipped.
1 parent 1afc433 commit db8e595

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/link/Elf/Atom.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,6 +1902,8 @@ const riscv = struct {
19021902

19031903
.SUB_ULEB128,
19041904
.SET_ULEB128,
1905+
1906+
.RELAX,
19051907
=> {},
19061908

19071909
else => try atom.reportUnhandledRelocError(rel, elf_file),
@@ -1929,6 +1931,7 @@ const riscv = struct {
19291931

19301932
switch (r_type) {
19311933
.NONE => unreachable,
1934+
.RELAX => {},
19321935

19331936
.@"32" => try cwriter.writeInt(u32, @as(u32, @truncate(@as(u64, @intCast(S + A)))), .little),
19341937

@@ -2068,6 +2071,7 @@ const riscv = struct {
20682071

20692072
switch (r_type) {
20702073
.NONE => unreachable,
2074+
.RELAX => {},
20712075

20722076
.@"32" => try cwriter.writeInt(i32, @as(i32, @intCast(S + A)), .little),
20732077
.@"64" => if (atom.debugTombstoneValue(target.*, elf_file)) |value|

0 commit comments

Comments
 (0)