Since [1], this will come automatically from `rustc-std-workspace-core`
and the crates.io dependency should no longer be specified.
[1]: https://github.com/rust-lang/rust/pull/141993
Change the methods on DyldCacheSlidePointer5 to simply extract
the bitfields, and leave other interpretation to the parser.
Also move PtrauthKey to DyldRelocationAuth, since it is not
an externally defined format.
The symbol table data is stored in the linkedit segment,
but that segment may be in a different subcache from the
one containing the image headers. This occurs for the
arm dyld cache in macOS 13.
MachOFile::parse_dyld_cache_image already handled this
correctly, but readobj doesn't use that.
has_aux_function previously matched weak externals too, resulting in
a wrong interpretation of their auxiliary symbol in the readobj
example.
Removed use of `else` for checking auxiliary symbols in readobj
so that it is more apparent when these are wrong.
Also add objdump and readobj test output for weak externals.
* read/coff: add has_aux_weak_external()
Exposes `has_aux_weak_external()` method in the `pe::ImageSymbol` trait
for checking if a symbol has a weak external auxiliary symbol record.
MS COFF specifies that a weak external has "EXTERNAL storage class,
UNDEF section number, and a value of zero" but clang and mingw both use
WEAK_EXTERNAL storage class instead of EXTERNAL.
* read/coff: add aux_weak_external()
Includes `aux_weak_external()` method in the COFF SymbolTable to get
the weak external auxiliary symbol from a symbol table index
* Change 'pe::IMAGE_WEAK_EXTERN_*' constants type
Constants should be `u32`s instead of `u16`s to match the type of the
weak external auxiliary symbol characteristics