437 Commits

Author SHA1 Message Date
Mikael Pettersson
b6b2f8b1df elf2boot: handle non page-aligned ELF PT_LOAD segments 2025-10-05 17:42:08 +02:00
Mikael Pettersson
0cc02e669e elf2boot: correct p_offset/p_vaddr alignment check 2025-10-05 16:43:05 +02:00
Mikael Pettersson
83cbbb5ab1 elf2boot: do not copy unwanted ELF metadata in ELF-64 files 2025-08-15 15:46:14 +02:00
Mikael Pettersson
82c1e19ac4 elf2boot: allow input from ELF-64 files 2025-08-15 14:21:00 +02:00
Mikael Pettersson
fc81f546bf readelf: move uint36_from_s64 conversion to extint 2025-08-14 16:38:47 +02:00
Mikael Pettersson
0667130fc4 elf2boot: move uint36_to_c36 conversion to extint 2025-08-14 16:04:45 +02:00
Mikael Pettersson
15434fdd34 elf2boot: clarify significance of output format option 2025-08-13 19:21:44 +02:00
Mikael Pettersson
6fe75207e3 readelf: handle disassembling code from ELF-64 files 2025-08-13 18:00:43 +02:00
Mikael Pettersson
1e92b66d9c Revert "pdp10_opcodes: use BASIC format with separate flag for A_UNUSED insns"
This reverts commit 3f80870025.
2025-08-13 14:34:19 +02:00
Mikael Pettersson
6fd5956c8c Revert "pdp10_opcodes: mark more insns as A_UNUSED and/or E_UNUSED"
This reverts commit b5e2857116.
2025-08-13 14:34:19 +02:00
Mikael Pettersson
e4e66c08c2 libelf: enable opening files with autodetect of ELF class, readelf: use it 2025-08-13 14:34:19 +02:00
Mikael Pettersson
9dca28c776 libelf: handle ELFCLASS64, adjust integer widths and field orders 2025-08-13 14:34:19 +02:00
Mikael Pettersson
fff8acaec7 libelf: handle ELFCLASS32, adjust integer widths, use stdio8 2025-08-13 14:34:19 +02:00
Mikael Pettersson
20feac56d9 libelf: add ELF class param to I/O entry points, propagate to scalar accessors and I/O dispatch 2025-08-13 14:34:19 +02:00
Mikael Pettersson
3d89447f26 libelf: rename inner read loops to distinguish them from API entry points 2025-08-13 14:34:19 +02:00
Mikael Pettersson
7998bf4ce2 libelf: rename integer read/write routines to indicate how many _bytes_ are transferred not bits 2025-08-13 14:34:19 +02:00
Mikael Pettersson
51c58652b3 libelf: centralise dispatch to I/O implementation module 2025-08-13 14:34:19 +02:00
Mikael Pettersson
75feec1d16 readelf: implement read_uint36/1 ourselves, do not abuse libelf for that 2025-08-13 14:34:19 +02:00
Mikael Pettersson
c396f4f0cf libelf: replace fgetc loop with fread 2025-08-13 14:34:19 +02:00
Mikael Pettersson
5ac34d7cea libelf:read_sint36/1: simplify 2025-08-13 14:34:19 +02:00
Mikael Pettersson
fc3bd12e7c factor out duplicated sign-extension code to new sext module 2025-08-13 14:34:19 +02:00
Mikael Pettersson
1f230f9e61 extint.erl: add support for converting between octets and 16/32/64-bit types 2025-08-13 14:34:19 +02:00
Mikael Pettersson
d9055597f9 rename pdp10_extint.erl to extint.erl 2025-08-13 14:34:19 +02:00
Mikael Pettersson
4206dc5415 stdint.hrl: also support 8/16/32/64-bit integers 2025-08-13 14:34:19 +02:00
Mikael Pettersson
dcc1e86f5d stdint.hrl: move size-dependent min/max computations to helper macros 2025-08-13 14:34:19 +02:00
Mikael Pettersson
7348b7776b rename pdp10_stdint.hrl to stdint.hrl, drop PDP10_ prefixes from macros 2025-08-13 14:34:19 +02:00
Mikael Pettersson
a52866cd52 rename pdp10_elf36.elf to libelf.erl 2025-08-13 14:34:19 +02:00
Mikael Pettersson
c6091d8803 libelf.hrl: move PDP-10 reloc declarations to new pdp10_relocs.hrl 2025-08-13 14:34:19 +02:00
Mikael Pettersson
77d7658247 rename pdp10_elf36.hrl to libelf.hrl 2025-08-13 14:29:21 +02:00
Mikael Pettersson
78a2a4f827 pdp10_elf36: make types and macros generic ELF and not ELF-36 specific 2025-08-11 20:22:37 +02:00
Mikael Pettersson
659ba1eb52 elf2boot: use stdio8 not file 2025-08-11 18:32:42 +02:00
Mikael Pettersson
f02023c9b0 stdio8: new, stdio API for octet-based files 2025-08-11 18:32:42 +02:00
Mikael Pettersson
6b60f3c6a9 elf2boot: use stdio9 not pdp10_stdio 2025-08-11 18:32:42 +02:00
Mikael Pettersson
f3e9c62191 pdp10_stdio: new, provide compatibility wrapper around stdio9 2025-08-11 18:32:42 +02:00
Mikael Pettersson
c150b7bd35 stdio9: simplify fread/3 to /2 2025-08-11 18:32:38 +02:00
Mikael Pettersson
a23ea12844 rename pdp10_stdio to stdio9 2025-08-09 12:51:33 +02:00
Mikael Pettersson
c21cf1422a pdp10_elf36.hrl: sync with binutils-2.45 ELF definitions 2025-08-09 12:08:59 +02:00
Mikael Pettersson
7a5ff6e992 elf2boot: allow selecting C36 or H36 as output format, make C36 default 2025-08-08 20:14:11 +02:00
Mikael Pettersson
18ee8e6453 elf2boot: generate output one full word at a time 2025-08-08 18:09:03 +02:00
Mikael Pettersson
b5e2857116 pdp10_opcodes: mark more insns as A_UNUSED and/or E_UNUSED 2025-07-21 16:14:46 +02:00
Mikael Pettersson
3f80870025 pdp10_opcodes: use BASIC format with separate flag for A_UNUSED insns
This matches reality better: A is may-be-zero (preferred) not must-be-zero.
2025-07-21 15:56:23 +02:00
Mikael Pettersson
1e8dc3468f pdp10_opcodes: fix typos in comments 2025-07-21 14:11:19 +02:00
Mikael Pettersson
52ad811aa0 pdp10_opcodes: fix dialyzer error with OTP-28.0-rc3 2025-04-20 12:19:50 +02:00
Mikael Pettersson
63746bbc93 pdp10_elf36.hrl: sync with binutils-2.44 ELF definitions 2025-04-19 23:43:00 +02:00
Mikael Pettersson
4edce6a058 pdp10_elf36.hrl: sync with binutils-2.43 ELF definitions 2025-04-19 19:56:32 +02:00
Mikael Pettersson
80e12bf0c8 pdp10_elf36.hrl: add missing AT_HWCAP2 macro 2025-04-19 15:59:20 +02:00
Mikael Pettersson
829dddbe69 pdp10_elf36.hrl: sync with binutils-2.42 ELF definitions 2025-04-19 15:57:07 +02:00
Mikael Pettersson
3ff0f8f203 as: handle .type <sym>,@object 2023-10-13 20:27:30 +02:00
Mikael Pettersson
1455bfc2e2 opcodes: mark SKIPA as E_UNUSED 2023-10-11 19:03:28 +02:00
Mikael Pettersson
6bd82dd571 as: treat . as a symbol in expressions 2023-10-11 18:36:50 +02:00