MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / section_name

Function section_name

crates/wasmtime/src/runtime/code_memory.rs:654–663  ·  view source on GitHub ↗
(
    endian: Endianness,
    strings: object::StringTable<'a>,
    section_header: &SectionHeader64<Endianness>,
)

Source from the content-addressed store, hash-verified

652}
653
654fn section_name<'a>(
655 endian: Endianness,
656 strings: object::StringTable<'a>,
657 section_header: &SectionHeader64<Endianness>,
658) -> Result<&'a str> {
659 let name = section_header
660 .name(endian, strings)
661 .map_err(obj::ObjectCrateErrorWrapper)?;
662 Ok(str::from_utf8(name).context("invalid section name in Wasm compilation artifact")?)
663}
664
665fn is_reloc_section(section_header: &SectionHeader64<Endianness>, endian: Endianness) -> bool {
666 let sh_type = section_header.sh_type(endian);

Callers 1

newMethod · 0.85

Calls 3

OkFunction · 0.85
nameMethod · 0.45
contextMethod · 0.45

Tested by

no test coverage detected