| ... | @@ -3337,7 +3337,8 @@ fn sortPhdrs( | ... | @@ -3337,7 +3337,8 @@ fn sortPhdrs( |
| 3337 | entry.* = .{ .phndx = @intCast(phndx) }; | 3337 | entry.* = .{ .phndx = @intCast(phndx) }; |
| 3338 | } | 3338 | } |
| 3339 | | 3339 | |
| 3340 | mem.sort(Entry, entries, phdrs.items, Entry.lessThan); | 3340 | // The `@as` here works around a bug in the C backend. |
| | 3341 | mem.sort(Entry, entries, @as([]const elf.Elf64_Phdr, phdrs.items), Entry.lessThan); |
| 3341 | | 3342 | |
| 3342 | const backlinks = try gpa.alloc(u16, entries.len); | 3343 | const backlinks = try gpa.alloc(u16, entries.len); |
| 3343 | defer gpa.free(backlinks); | 3344 | defer gpa.free(backlinks); |