- The delta offset and flags combined may be larger than u64,
so handle the first byte separately.
- Use wrapping arithmetic.
- Change `Crel::r_sym` and `Crel::r_type` to u32.
- Add `Crel::symbol()`.
- Fuse `CrelIterator` on error.
- Replace `ElfRelaIterator` with `ElfRelocationIterator` which returns
`Crel`. This avoid the need to byteswap the `Crel`, and thus avoids
the use of `Endian::default` (which may not match the file).
- Add test outputs.
The format was suggested here:
https://groups.google.com/g/generic-abi/c/ppkaxtLb0P0/m/awgqZ_1CBAAJ
and become part of the LLVM toolchain since release 19, and it's
used by default in the Chromium build system. Recently, the Mold
linker added support for the format as well.
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.