59 Commits

Author SHA1 Message Date
John Paul Adrian Glaubitz 5c25da2843 Add initial support for HPPA (PA-RISC) (#793) 2025-07-24 20:21:45 +10:00
Fractal Fir(Michał Kostrubiec) 9a6b94c8ec Bare bones support for DEC Alpha (#790) 2025-07-20 11:43:20 +10:00
hev 8446af2292 Add LoongArch32 ELF basic support (#765) 2025-04-18 21:16:12 +10:00
sozud bc8ae3100d Basic SuperH support (#762) 2025-04-10 19:12:35 +10:00
Davide a87b65a2a9 Add Mips64 N32 ABI (#743) 2024-11-16 10:07:44 +10:00
knickish fb4446b56e Add Architecture::M68k (#742) 2024-11-08 15:37:05 +10:00
Denis Drakhnia 34f6dcef6a elf: add basic support for E2K arch (#727) 2024-09-10 15:01:33 +10:00
OndrikB 112417e182 write/coff: Set checksum for BSS section symbols (#718) 2024-08-12 09:43:44 +10:00
Philip Craig 3a396f3e2b write/elf: fix writing of strtab when symtab is empty (#710)
Previously, if the symtab was empty then we were writing a strtab
that had 0 bytes of data. This gives a linker error:
SHT_STRTAB string table section [index 4] is empty

Also, if there is a symtab then there must be a strtab,
otherwise the error is:
invalid sh_type for string table section [index 0]: expected SHT_STRTAB, but got SHT_NULL
2024-07-24 12:42:54 +10:00
bjorn3 2a297a5a57 write/macho: Reverse the order of emitting relocations (#702)
This prevents a crash of Apple's new linker.
2024-06-28 20:45:21 +10:00
John Paul Adrian Glaubitz d34d1bcfc9 Add Architecture::Sparc32Plus (#700)
This adds support for 32-bit SPARC using the V9 baseline (V8plus).
2024-06-27 16:30:10 +10:00
Philip Craig fd693f49d8 Add Architecture::Sparc (#699) 2024-06-26 12:23:57 +10:00
Philip Craig 284975d12e read: do not return null sections or symbols in unified API (#679)
This affects ELF and XCOFF, including some of the lower level APIs too.
2024-05-06 15:47:22 +10:00
Philip Craig b77473f0a7 write/macho: ensure Mach-O subsections are not zero size (#676)
For Mach-O, `add_symbol_data` now ensures that the symbol size
is at least 1 when subsections via symbols are enabled.
This change was made to support linking with ld-prime. It is also
unclear how this previously managed to work with ld64.

`write::Object::add_subsection` no longer enables subsections
via symbols for Mach-O. Use `set_subsections_via_symbols` instead.
This change was made because Mach-O subsections are all or nothing,
so this decision must be made before any symbols are added.

`write::Object::add_subsection` no longer adds data to the subsection.
This change was made because it was done with `append_section_data`,
but this is often not the correct way to add data to the subsection.
Usually `add_symbol_data` is a better choice.
2024-05-04 12:58:42 +10:00
Philip Craig fb0d876a0b Fix clippy warnings (#636) 2024-02-23 17:43:09 +10:00
Philip Craig eb58357f93 Delete format specific variants in RelocationKind
Replace uses of these variants with read::Relocation::flags
and write::Relocation::flags.

Additionally, for write::Relocation, move the kind/encoding/size
fields into RelocationFlags::Generic, since these are not
required when using format specific variants.
2023-12-24 13:24:44 +10:00
Philip Craig 0aa432b7e7 macho: add SubArchitecture::Arm64E (#614) 2023-12-23 13:34:33 +10:00
Daniel Paoliello f242fe7735 pe/coff: Add support for ARM64EC (#607) 2023-12-12 13:08:36 +10:00
Philip Craig ff50233a5c write/coff: add Writer (#595) 2023-11-24 14:41:58 +10:00
Philip Craig f3b3cd45d5 write/macho: write LC_DYSYMTAB
Probably not needed, but it is written by other tools.
2023-10-25 16:15:38 +10:00
Dirreck 57540508ab elf: add support for csky arch (#561) 2023-07-18 20:29:54 +10:00
Philip Craig 60c9721884 write/macho: ensure padding matches for section file offset and address (#553) 2023-06-05 16:46:30 +10:00
Philip Craig 60a75e5aee read/macho: support Aarch64_Ilp32 (#545) 2023-05-09 13:09:58 +10:00
Philip Craig 25e29302a0 Test that empty ELF sections have the correct file offset (#544) 2023-05-09 12:26:37 +10:00
Philip Craig 494fc106d3 write/elf: .note.gnu.properties should have SHF_ALLOC 2023-05-05 14:45:02 +10:00