Skip to documentation
SLOP

tiny.tldr.formats.elf.section_state

Reference tiny.tldr formats elf section_state

Defined in formats.elf.

API (6)

Actions

Public operations.

Types and contracts

Public types and contracts.

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

Source

Called byCallsNo direct callsprivate sourcelib.tldr.src.formats.elf.group.discarddiscardMembersformats.elf.liveness.statediscardUnmarkedformats.elf.section_stateensureDiscardedSections
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callsformats.elf.icffoldformats.elf.section_stateensureFoldedSections
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callsprivate sourcelib.tldr.src.formats.elf.address.cachesyntheticBoundaryAddressformats.elf.addressing.contribution_modulesymbolprivate sourcelib.tldr.src.formats.elf.address.symbolsectionAddressprivate sourcelib.tldr.src.formats.elf.ehframe.sectionrelocationTargetDiscardedformats.elf.got_tablecollectEntries+11 moreformats.elf.section_statefoldedSection
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callsprivate sourcelib.tldr.src.formats.elf.address.cachesyntheticBoundaryAddressprivate sourcelib.tldr.src.formats.elf.ehframe.sectionrelocationTargetDiscardedformats.elf.got_tablecollectEntriesformats.elf.got_tablecollectEntriesWithIfuncprivate sourcelib.tldr.src.formats.elf.icf.foldsectionEligible+11 moreformats.elf.section_statesectionDiscarded
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsformats.elf.addressing.sizesymbolformats.elf.addressing.symboladdressformats.elf.addressing.symbolrelocationformats.elf.addressing.tlsoffsetformats.elf.got_tablecanonicalSymbolRef+2 moreformats.elf.section_statesectionDiscardedformats.elf.section_statesymbolSectionDiscarded
Static calls · unresolved targets: 0 · external targets: 3.

Source: lib/tldr/src/formats/elf/root.zig:24

zig
pub const section_state = @import("sections.zig");

Source: lib/tldr/src/formats/elf/sections.zig

zig
const std = @import("std");const record = @import("record.zig");const Allocator = std.mem.Allocator;const Symbol = record.Symbol;pub const SectionRef = struct {    object_index: usize,    section_index: usize,};pub fn ensureDiscardedSections(allocator: Allocator, object: anytype) Allocator.Error![]bool {    if (object.discarded_sections.len != 0) return object.discarded_sections;    object.discarded_sections = try allocator.alloc(bool, object.sections.len);    @memset(object.discarded_sections, false);    return object.discarded_sections;}pub fn ensureFoldedSections(allocator: Allocator, object: anytype) Allocator.Error![]?SectionRef {    if (object.folded_sections.len != 0) return object.folded_sections;    object.folded_sections = try allocator.alloc(?SectionRef, object.sections.len);    @memset(object.folded_sections, null);    return object.folded_sections;}pub inline fn sectionDiscarded(object: anytype, section_index: usize) bool {    if (section_index >= object.discarded_sections.len) return false;    return object.discarded_sections[section_index];}pub inline fn foldedSection(object: anytype, section_index: usize) ?SectionRef {    if (section_index >= object.folded_sections.len) return null;    return object.folded_sections[section_index];}pub fn symbolSectionDiscarded(object: anytype, symbol: Symbol) bool {    if (symbol.isUndefined() or symbol.isCommon() or symbol.isAbsolute()) return false;    return sectionDiscarded(object, symbol.section_index);}

Complete caller list for formats.elf.section_state.foldedSection

16 direct callers.

Complete caller list for formats.elf.section_state.sectionDiscarded

16 direct callers.

Complete caller list for formats.elf.section_state.symbolSectionDiscarded

7 direct callers.

Audit

Definitions7
Public names8
Members2
Version26.7.0
Revisiondaab053ee433