From c9e082d57462baab4a391e974efef97ce823447e Mon Sep 17 00:00:00 2001 From: Mr-Wiseguy Date: Sun, 5 Jan 2025 02:05:23 -0500 Subject: [PATCH] Add function sizes to section function tables --- src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index e7db2ed..f20ced4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -912,9 +912,11 @@ int main(int argc, char** argv) { for (size_t func_index : section_funcs) { const auto& func = context.functions[func_index]; + size_t func_size = func.reimplemented ? 0 : func.words.size() * sizeof(func.words[0]); if (func.reimplemented || (!func.name.empty() && !func.ignored && func.words.size() != 0)) { - fmt::print(overlay_file, " {{ .func = {}, .offset = 0x{:08x} }},\n", func.name, func.rom - section.rom_addr); + fmt::print(overlay_file, " {{ .func = {}, .offset = 0x{:08X}, .rom_size = 0x{:08X} }},\n", + func.name, func.rom - section.rom_addr, func_size); } }