tiny.tldr.formats.elf.icf
Defined in formats.elf.
API (1)
Actions
Public operations.
Source
Source: lib/tldr/src/formats/elf/icf/fold.zig:17
zig
pub fn fold( allocator: Allocator, objects: []ObjectFile,) model.Error!void { var classes: ClassMap = .{}; defer { var values = classes.valueIterator(); while (values.next()) |sections| sections.deinit(allocator); classes.deinit(allocator); } for (objects, 0..) |*object, object_index| { const folded_sections = try ensureFoldedSections(allocator, object); for (object.sections, 0..) |_, section_index| { if (!sectionEligible(object.*, section_index)) continue; const section_hash = try hash.section(object.*, section_index); const gop = try classes.getOrPut(allocator, section_hash); if (!gop.found_existing) gop.value_ptr.* = .empty; var folded = false; for (gop.value_ptr.items) |candidate_ref| { const candidate = objects[candidate_ref.object_index]; if (try match.sections(object.*, section_index, candidate, candidate_ref.section_index)) { folded_sections[section_index] = candidate_ref; folded = true; break; } } if (!folded) { try gop.value_ptr.append(allocator, .{ .object_index = object_index, .section_index = section_index, }); } } }}Source: lib/tldr/src/formats/elf/icf/root.zig
zig
const folder = @import("fold.zig");pub const fold = folder.fold;Source: lib/tldr/src/formats/elf/root.zig:11
zig
pub const icf = @import("icf/root.zig");Audit
| Definitions | 2 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |