NAME

Sys::Export::ELF - Unpack various data structures of an ELF binary

DESCRIPTION

This module is a minimalist approach to parsing ELF files. You read or memory-map the file, then call unpack on the bytes to get a data structure describing the most useful bits of the file, such as the libraries it depends on, or its dynamic-linking interpreter.

This module is careful to not make copies of that input scalar, so you can pass a memory-mapped file (via File::Map) and actually avoid mapping the whole file.

EXPORTS

unpack

my $elf_info= unpack($elf_file_bytes);
# {
#    segments            => [ ... ],
#    sections            => [ ... ],
#    string_table_offset => $ofs,
#    dynamic             => [ ... ],  # dynamic link table entries
#    needed_libraries    => [ ... ],
#    interpreter         => $path,
# }

VERSION

version 0.003

AUTHOR

Michael Conrad <mike@nrdvana.net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2025 by Michael Conrad.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.