Commit Graph

23 Commits

Author SHA1 Message Date
Mintsuki
b0152c9a67 lib/elf: Validate section header bounds in elf_section_hdr_info functions 2026-04-02 22:21:54 +02:00
Mintsuki
91e5e5668f lib/elf: Add file_size parameter to elf_bits for bounds checking 2026-04-02 22:21:54 +02:00
Mintsuki
0f4f7b5bc3 Revert "protos/limine: Drop support for base revisions 0-3, require 4 on x86"
This reverts commit f0e8264e1a.
2026-03-24 15:11:35 +01:00
Mintsuki
f0e8264e1a protos/limine: Drop support for base revisions 0-3, require 4 on x86 2026-03-23 08:34:14 +01:00
Mintsuki
22400c3f28 lib/elf: Widen section_offset to uint64_t for ELF64 shoff 2026-02-09 13:02:39 +01:00
Mintsuki
7c6fb81ae1 lib/elf: Validate section header offsets against file size in elf64_load_section 2026-02-09 13:02:38 +01:00
Mintsuki
095cf5ef79 lib/elf: Validate p_offset + p_filesz against file size in all ELF loaders 2026-02-09 13:02:38 +01:00
czapek
8b01ea3430 lib: Add support for loading PE images (#442)
* lib: Add support for loading PE images

* lib/pe: Use standard integer types

* lib/pe: Fix section alignment

* lib/pe: Properly iterate base relocation blocks

* lib/pe: Add missing machine types

* protos/limine: Add kernel format detection logic

* lib/pe: Fix integer to pointer conversion errors

* lib/elf: Add previously removed check

* lib/pe: Fix base relocation block iteration code

* lib/pe: Add missing machine types to pe_bits
2025-01-08 00:35:15 +01:00
cospplredman
ba5c0004e6 fixed header guard names
made them more standard compliant
2024-03-20 03:06:55 +01:00
mintsuki
38af3f9843 multiboot2: Initial support for relocatable header tag 2023-12-07 00:31:45 +01:00
mintsuki
9333f1ca8b limine/elf: Optimise not to scan .bss for requests 2023-07-08 23:44:50 +02:00
Bryce Lanham
fdcb9a9243 multiboot2: fix 32 bit elf section loading
Existing code was using 64 bit elf section header unconditionally. This
commit fixes that :)
2023-05-02 20:15:43 -05:00
mintsuki
3452e492bb elf: General refactor 2022-09-11 10:05:45 +02:00
mintsuki
215bf87993 misc: Bring mb2 up to par to mb1 wrt everywhere ranges and bug fixes 2022-06-29 10:27:04 +02:00
mintsuki
19287d5ca1 misc: Add elsewhere TU and rework mb1 to use it 2022-06-29 09:34:14 +02:00
mintsuki
e436b763c2 elf: Add elf*_load_elsewhere() functions 2022-06-29 08:16:22 +02:00
mintsuki
4e0ec6d544 elf: Undo all the mess caused by multiboot in preparation for separate functions 2022-06-29 07:48:10 +02:00
mintsuki
fba565b34e elf: Add support for sliding and ELF ranges to ELF32 as well 2022-06-28 10:26:14 +02:00
mintsuki
ab84448be2 multiboot2: Fix broken section list size calculation (2) 2022-06-19 00:30:01 +02:00
mintsuki
7f6ac2d135 multiboot2: Add mb2_alloc() for quirky allocation locations 2022-06-18 23:40:34 +02:00
mintsuki
41ea16e2ff elf: Return is_reloc 2022-03-28 05:13:47 +02:00
mintsuki
8aa1372ce9 elf: Return image size 2022-03-26 05:03:02 +01:00
mintsuki
400202d926 misc: stage23 -> common 2022-02-03 10:38:43 +01:00