1045 Commits

Author SHA1 Message Date
Josh Stone 3d89e59fcc Update dependencies (#806) 2025-09-19 16:27:26 +10:00
Philip Craig 916c47b90e Release 0.37.3 (#804) 2025-08-13 20:32:22 +10:00
Philip Craig c411fe4084 write/coff: use IMAGE_WEAK_EXTERN_SEARCH_ALIAS for weak externs (#803)
This matches LLVM, and works with the MSVC link.exe.
2025-08-13 17:03:29 +10:00
Philip Craig 3e9d3a47f6 readobj/elf: handle relocation sections with link 0 (#800)
This is valid when none of the relocations use symbols.
2025-08-07 11:50:51 +10:00
bjorn3 d7b5774cde Add helper methods for mutating section and symbol flags (#801)
Doing it the naive way with first getting a mutable reference to the
section/symbol, then writing the result of section_flags/symbol_flags to
replace SectionFlags::None and SymbolFlags::None and then mutating the
flags as needed isn't allowed by the borrow checker. Instead you have to
do a dance with getting the section/symbol as immutable, then calling
section_flags/symbol_flags and then getting it as mutable and writing
the flags you got. Adding helper methods to object saves users the time
to figure this all out for themselves.
2025-08-06 23:31:50 +10:00
Mateusz Mikuła 31a232f3c7 elf: Add constants for GNU SFrame (#799) 2025-08-06 14:15:12 +10:00
Philip Craig 8500ba613b Release 0.37.2 2025-08-01 17:21:28 +10:00
Philip Craig 17b94ac511 Fix clippy warnings
Allow clippy::uninlined_format_args for now since fixing it is a lot of noise.
2025-08-01 17:21:28 +10:00
Philip Craig 436bc870f8 Update Cargo.lock 2025-08-01 17:21:28 +10:00
Philip Craig ceba523007 Update wasmparser dependency 2025-08-01 17:21:28 +10:00
rjkiv 93f67c6048 write/coff: add PPC support (#795)
Also, if a symbol kind is unknown and its section is undefined, mark it as external.
2025-07-27 17:49:55 +10:00
John Paul Adrian Glaubitz 5c25da2843 Add initial support for HPPA (PA-RISC) (#793) 2025-07-24 20:21:45 +10:00
Matt Ehrnschwender f9d64bd3e7 Add support for writing COFF auxiliary weak external symbols (#791)
Includes writing the associated default symbol for the auxiliary weak
external tag index in `write::Object`, and support for writing out COFF
auxiliary weak external symbols in `write::coff::Writer`.
2025-07-22 13:13:25 +10:00
Fractal Fir(Michał Kostrubiec) 9a6b94c8ec Bare bones support for DEC Alpha (#790) 2025-07-20 11:43:20 +10:00
Philip Craig cc6c428352 write: add Object::default_section_flags and Object::section_flags
These allow users to query the flags in order to modify them.
2025-07-16 13:12:54 +10:00
Philip Craig fd45fde119 write: add Object::default_symbol_flags and Object::symbol_flags
These allow users to query the flags in order to modify them.
2025-07-16 13:12:54 +10:00
Philip Craig 88e6e49319 read/elf: add CrelIterator::is_empty (#788)
Fixes clippy warning.
2025-07-16 13:09:17 +10:00
Martin Liška 3bebfb640e read: export Crel::from_rel,from_rela functions (#785)
Also add `CrelIterator::len,size_hint` functions, and make it clonable.
2025-07-12 14:01:42 +10:00
Philip Craig 5fc89663a1 read/elf: various CREL fixes (#784)
- 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.
2025-07-02 11:01:25 +10:00
Martin Liška d65992b858 Add support for experimental CREL relocation format (#782)
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.
2025-06-30 17:30:34 +10:00
Luke Street 16ff70aa6f Support big-endian PowerPC COFF (#783)
Also adds PPC COFF magic to File::parse
2025-06-30 16:23:06 +10:00
Martin Liška e32d8830c5 Add EF_RISCV_RV64ILP32 constant (#779) 2025-06-19 12:13:33 +10:00
Philip Craig 4b833202b2 Release 0.37.1 2025-06-11 21:45:45 +10:00
Philip Craig 80510455f9 Update Cargo.lock 2025-06-11 21:45:45 +10:00
Philip Craig c222a099f4 Update wasmparser dependency 2025-06-11 21:45:45 +10:00