Expand description
Binary-level symbol editing for staticlib post-processing.
- Hide: sets STV_HIDDEN (ELF) or N_PEXT (Mach-O) on non-exported symbols.
- Rename: appends a vendor-specific suffix to non-exported symbol names by rebuilding the string table.
Re-exportsยง
use std::borrow::Cow;๐use std::mem;๐use object::read::coff::CoffHeader;๐use object::read::coff::ImageSymbol as _;๐use object::read::elf::SectionHeader as _;๐use object::read::elf::Sym as _;๐use object::read::macho::Nlist;๐use object::Endianness;๐use object::elf;๐use object::macho;๐use object::pe;๐use rustc_data_structures::fx::FxHashMap;๐use rustc_data_structures::fx::FxHashSet;๐use rustc_middle::middle::exported_symbols::SymbolExportKind;๐use super::symbol_export::undecorate_coff_symbol;๐
Structsยง
- Patch ๐
- Rename
Entry ๐
Functionsยง
- apply_
edits ๐ - build_
renamed_ ๐strtab - coff_
collect_ ๐impl - coff_
edit_ ๐impl - coff_
symbol_ ๐kind - The
SymbolExportKindof a COFF symbol, so#-prefixedArm64ECtext symbols are told apart from data symbols during undecoration. - collect_
internal_ ๐names - elf_
collect_ ๐impl - elf_
edit_ ๐impl - elf_
rebuild_ ๐strtab - macho_
collect_ ๐impl - macho_
edit_ ๐impl - macho_
rebuild_ ๐strtab - write_
u32_ ๐at - write_
u64_ ๐at