mirror of
https://github.com/ziglang/zig.git
synced 2026-01-09 08:55:36 +00:00
elf: increase resolution of Atom.relocs_section_index to u32
This commit is contained in:
parent
52e0ca1312
commit
27d7ac88a3
@ -20,7 +20,7 @@ input_section_index: u16 = 0,
|
||||
output_section_index: u16 = 0,
|
||||
|
||||
/// Index of the input section containing this atom's relocs.
|
||||
relocs_section_index: u16 = 0,
|
||||
relocs_section_index: u32 = 0,
|
||||
|
||||
/// Index of this atom in the linker's atoms table.
|
||||
atom_index: Index = 0,
|
||||
|
||||
@ -73,7 +73,7 @@ pub fn addAtom(self: *ZigModule, elf_file: *Elf) !Symbol.Index {
|
||||
esym.st_shndx = shndx;
|
||||
symbol_ptr.esym_index = esym_index;
|
||||
|
||||
const relocs_index = @as(u16, @intCast(self.relocs.items.len));
|
||||
const relocs_index = @as(u32, @intCast(self.relocs.items.len));
|
||||
const relocs = try self.relocs.addOne(gpa);
|
||||
relocs.* = .{};
|
||||
atom_ptr.relocs_section_index = relocs_index;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user