Skip to main content

current_executable_build_id

Function current_executable_build_id 

Source
pub fn current_executable_build_id() -> Option<Vec<u8>>
Expand description

Return the GNU build ID of the running executable without reading the executable from disk.

The dynamic loader has already mapped the main image’s PT_NOTE segment, so callers that only need an image-generation identity do not need to hash a potentially large unoptimized binary. None preserves a clean fallback for binaries linked without a GNU build ID.