From 8c99b5df10b644de003b6e26e270272504200df9 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Wed, 13 Nov 2024 21:53:08 +0100 Subject: Update comments, aligning --- bxgen.c | 20 +++++++++++--------- compile_flags.txt | 10 ---------- 2 files changed, 11 insertions(+), 19 deletions(-) delete mode 100644 compile_flags.txt diff --git a/bxgen.c b/bxgen.c index 48a7172..e024e5e 100755 --- a/bxgen.c +++ b/bxgen.c @@ -194,15 +194,15 @@ enum { STRING_TABLE_ALIGNMENT = 16, // TODO // TEMP - MAX_NUM_OBJECT_FILES = 10 * 1024, - MAX_NUM_SECTIONS = 2 * 1024 * 1024, - MAX_NUM_SYMBOLS = 2 * 1024 * 1024, - MAX_NUM_RELS = 100 * 1024, - MAX_NUM_LINK_RELS = 2 * 1024 * 1024, - MAX_OBJECT_FILE_SIZE = 10 * 1024 * 1024, // 10 MB - MAX_DEPENDENCIES_SIZE = 50 * 1024 * 1024, // 50 MB - MAX_CODE_SIZE = 100 * 1024, // 100 KB - MAX_OUTPUT_SIZE = 20 * 1024 * 1024, // 20 MB + MAX_NUM_OBJECT_FILES = 10 * 1024, + MAX_NUM_SECTIONS = 2 * 1024 * 1024, + MAX_NUM_SYMBOLS = 2 * 1024 * 1024, + MAX_NUM_RELS = 100 * 1024, + MAX_NUM_LINK_RELS = 2 * 1024 * 1024, + MAX_OBJECT_FILE_SIZE = 10 * 1024 * 1024, // 10 MB + MAX_DEPENDENCIES_SIZE = 50 * 1024 * 1024, // 50 MB + MAX_CODE_SIZE = 100 * 1024, // 100 KB + MAX_OUTPUT_SIZE = 20 * 1024 * 1024, // 20 MB MAX_PATH_SIZE = 10 * 1024, MAX_LITERAL_SIZE = 400, @@ -1489,6 +1489,8 @@ void write_f64(u32 ordering, f64 x, void *v, void *v_end) { // AR https://man.freebsd.org/cgi/man.cgi?query=ar&sektion=5 // ELF https://man7.org/linux/man-pages/man5/elf.5.html // +// https://fasterthanli.me/series/making-our-own-executable-packer +// // Relocation types // https://intezer.com/blog/malware-analysis/executable-and-linkable-format-101-part-3-relocations/ // https://docs.oracle.com/cd/E19120-01/open.solaris/819-0690/chapter7-2/index.html diff --git a/compile_flags.txt b/compile_flags.txt deleted file mode 100644 index 0bf6fd9..0000000 --- a/compile_flags.txt +++ /dev/null @@ -1,10 +0,0 @@ --Wall --Wextra --Werror --pedantic --Wno-empty-translation-unit --Wno-old-style-declaration --Wno-missing-braces --Wno-unused-variable --Wno-unused-but-set-variable --Wno-unused-parameter -- cgit v1.2.3