Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tools/esp-image/src/elf2image.zig
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ pub fn main(init: std.process.Init) !void {
if (cli_args.segments) {
var it = elf_header.iterateProgramHeaders(&elf_file_reader);
while (try it.next()) |hdr| {
if (hdr.p_type == std.elf.PT_LOAD and hdr.p_memsz > 0 and hdr.p_filesz > 0) {
if (hdr.type == std.elf.PT.LOAD and hdr.memsz > 0 and hdr.filesz > 0) {
try info_list.append(gpa, .{
.addr = @as(u32, @intCast(hdr.p_paddr)),
.file_offset = @as(u32, @intCast(hdr.p_offset)),
.size = @as(u32, @intCast(hdr.p_filesz)),
.addr = @as(u32, @intCast(hdr.paddr)),
.file_offset = @as(u32, @intCast(hdr.offset)),
.size = @as(u32, @intCast(hdr.filesz)),
});
}
}
Expand Down
Loading