Skip to documentation
SLOP

tiny.tldr.formats.elf.icf

Reference tiny.tldr formats elf icf

Defined in formats.elf.

API (1)

Actions

Public operations.

No direct callersNo direct callsformats.elficf
Static calls · unresolved targets: unknown · external targets: unknown.

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,                });            }        }    }}
Called byCallsNo direct callersprivate sourcelib.tldr.src.formats.elf.icf.foldsectionEligibleprivate sourcelib.tldr.src.formats.elf.icf.hashsectionprivate sourcelib.tldr.src.formats.elf.icf.matchsectionsformats.elf.section_stateensureFoldedSectionsformats.elf.icffold
Static calls · unresolved targets: 4 · external targets: 2.

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

Definitions2
Public names2
Members0
Version26.7.0
Revisiondaab053ee433