| author | |
| committer | |
| log | c1c3212500377a8128f37a873a7845c6bf5993e6 |
| tree | c6e4d8d4cc5b779f5af9fe444f092e8175ae2506 |
| parent | 5e39ab460073b0068d30a74488abf83333761c8d |
The code accidentally used the phdr offset instead of the shdr one while
iterating over the section headers.
Fixes #63381 files changed, 1 insertions(+), 1 deletions(-)
lib/std/elf.zig+1-1| ... | ... | @@ -471,7 +471,7 @@ pub const SectionHeaderIterator = struct { |
| 471 | 471 | |
| 472 | 472 | if (self.elf_header.is_64) { |
| 473 | 473 | var shdr: Elf64_Shdr = undefined; |
| 474 | const offset = self.elf_header.phoff + @sizeOf(@TypeOf(shdr)) * self.index; | |
| 474 | const offset = self.elf_header.shoff + @sizeOf(@TypeOf(shdr)) * self.index; | |
| 475 | 475 | try preadNoEof(self.file, mem.asBytes(&shdr), offset); |
| 476 | 476 | |
| 477 | 477 | // ELF endianness matches native endianness. |