elf: increase resolution of Atom.relocs_section_index to u32

This commit is contained in:
Jakub Konka 2023-10-18 17:25:28 +02:00
parent 52e0ca1312
commit 27d7ac88a3
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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;