absolute_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.


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.

is_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.