BinaryBuilderAuditor.absolute_to_relative_symlinks!
— Methodabsolute_to_relative_symlinks!(scan::ScanResult, prefix_alias::String)
Finds symlinks within the given ScanResult
, converting any absolute links to relative links, as long as the link target lies within the given prefix
. Because we are generally operating on files outside of the sandbox environment, we allow passing in prefix_alias
to serve as the in-sandbox path prefix, as that is the prefix that symlinks would have been pointing to.
BinaryBuilderAuditor.capture_output
— Methodcapture_output(cmd::Cmd)
Run cmd
, capturing the output into an IOBuffer
, return the process object and the output IOBuffer
.
BinaryBuilderAuditor.ensure_sonames!
— Methodensure_sonames!(scan::ScanResult)
We want all libraries to have consistent SONAMEs. This makes it much easier to ensure that dependencies are matched up properly when loading, since we rely upon the dynamic linker's SONAME short-circuit when loading transitive library dependencies. To enforce this, we ensure that every non-Windows target has a reasonable SONAME in all of its libraries.
BinaryBuilderAuditor.is_for_platform
— Methodis_for_platform(h::ObjectHandle, platform::AbstractPlatform)
Returns true
if the given ObjectHandle
refers to an object of the given platform
; E.g. if the given platform
is for AArch64 Linux, then h
must be an ELFHandle
with h.header.e_machine
set to ELF.EM_AARCH64
.
In particular, this method and platform_for_object()
both exist because the latter is not smart enough to deal with :glibc
and :musl
yet.