Commit graph

70 commits

Author SHA1 Message Date
38187b17a5
Fix bug where on some platforms (inc. Windows), duplicate IAT entries would be written 2025-07-02 00:24:18 +01:00
bbafc3d7ac
Re-add comments to some files 2025-06-30 18:07:26 +01:00
8bc36751c9
Bump version, update README 2025-06-30 16:11:26 +01:00
4d67f29fa3
Get imports *finally* working (remove special handling for functions and treat them as variables) 2025-06-30 15:16:20 +01:00
34b49c9a1d
Add module indexes to PE IAT entries 2025-06-30 03:21:23 +01:00
b8be6481e0
No, iatAddr doesn't contain a flag 2025-06-30 00:08:26 +01:00
9d36dd8ec9
Do more work on imports 2025-06-30 00:03:06 +01:00
3527e2e76d Remove tabs from Guile indentation 2025-06-26 01:12:45 +01:00
a518314dee Add Guix support 2025-06-25 23:51:54 +01:00
9992242f5b Correct version regex in CMakeLists.txt 2025-06-24 18:27:44 +01:00
f505302e71 Change the way versioning works, fix memory leaks 2025-06-24 18:20:43 +01:00
3c46c6cf74 Restore comments which were accidentally deleted during reformatting 2025-06-21 21:46:43 +01:00
f6610667ae Remove prints from everywhere but main, fix bug where only part of an import library version was set 2025-06-16 22:06:31 +01:00
b646f28812 Tweak formatting, add CONTRIBUTING.md 2025-06-16 21:31:17 +01:00
dba2f4c54c Change how getXXFromYY functions handle errors (utilise errno) 2025-06-16 17:12:27 +01:00
1ff1e8f93f Reformat all code to modified Allman/BSD style 2025-06-16 15:31:35 +01:00
Vali0004
4e053b09ca Refactor code style, and add hardening
Signed-off-by: Aiden Isik <aidenisik+srht@member.fsf.org>
2025-06-16 14:27:12 +01:00
Vali0004
1938c71369 Add Nix support
Signed-off-by: Aiden Isik <aidenisik+srht@member.fsf.org>
2025-06-16 14:19:02 +01:00
434ed63db9 Use UBSan as well 2025-06-15 22:29:47 +01:00
3d57c01b92 Do not use base address to determine DLL type, revert to old method 2025-06-15 12:36:09 +01:00
7b1d147cf0 Fix bug where if there are no import tables, the location of the first optional header overwrites the basefile 2025-06-10 16:52:07 +01:00
75e2a58ade Use PE DLL flag to decide whether to use DLL or Title flag (more accurate?) 2025-06-09 21:58:32 +01:00
1dab6189be Remove some debugging stuff 2025-06-09 20:17:57 +01:00
d82fd383f0 Rework executable type logic, add command line option to override it 2025-06-09 19:10:55 +01:00
32bdb84887 Fix unaligned pointer accesses and buffer overflow bug in freeImportLibrariesStruct 2025-06-09 14:57:06 +01:00
81b649ca32 Finish import table generation 2025-06-09 13:47:58 +01:00
1b62027120 Fix name table stuff 2025-06-08 19:01:22 +01:00
080df81ef6 Add code to populate XEX import libraries header (breaks things, need to fix) 2025-06-08 16:42:13 +01:00
aee6624e02 Rename getdata to gethdrdata 2025-06-03 18:43:37 +01:00
c0607ecc49 Improve error handling in main, other misc bug fixes 2025-06-03 18:24:07 +01:00
24c68d7ff1 Put better memory management routines in place (TODO: use them everywhere) 2025-06-03 01:27:05 +01:00
0005775f85 Add code for locating branch stubs for imported functions 2025-06-02 20:26:36 +01:00
4041036c65 Fix what currently exists of PE import reading 2025-06-01 23:23:46 +01:00
f3e972a99f Bump version 2025-06-01 19:29:49 +01:00
8ff9bb7582 Start working on import data parsing from PE (untested) 2025-06-01 19:14:14 +01:00
6c5274ea54 Set up data structures/helper functions for PE import parsing, make byte-swapping read functions more efficient 2025-06-01 15:49:47 +01:00
868e78d81b Remove redundant (and POSIX/MinGW-only) file size check 2025-05-30 18:35:13 +01:00
5939f22d52 Modify build system to support Windows, fix bug where a size value used to determine whether to access memory was not zero by default 2025-05-30 02:05:09 +01:00
27f8afec9a Strip down & integrate Nettle into source tree 2025-05-29 23:03:39 +01:00
4978378d31 Check endianness more thoroughly, for completeness' sake 2025-05-29 21:17:41 +01:00
ecde90741c Remove redundant header include 2025-05-29 21:03:45 +01:00
58c7757044 Make endian conversions more portable 2025-05-29 20:48:06 +01:00
3108eb3d4a Add support for DLLs 2025-05-29 19:13:01 +01:00
cdb37b5099 Roll back ELF permission handling, it is no longer needed 2025-05-29 15:42:36 +01:00
bf3ee87a96 Add functionality to determine page types within the ELF section 2025-03-24 02:53:18 +00:00
3d61b9b24f Roll back zero-elimination support (it only seems to work between PE sections, not within them, making it effectively useless for the structure of XEX generated by FreeChainXenon) 2025-02-23 22:28:50 +00:00
65e10e8782 Fix bug in placer, where optional headers may end up overwriting each other 2025-02-23 18:05:54 +00:00
184dee1d5e Start work on making the final XEX smaller 2025-02-19 22:07:17 +00:00
3d4fe95a27 Fix get16BitFromPE return type 2025-02-07 00:16:02 +00:00
f6d2615700 Handle TLS properly (it is unsupported) 2025-01-14 20:52:31 +00:00