| 617 | } |
| 618 | |
| 619 | static void setup_context_for_elf(N64Recomp::Context& context, const ELFIO::elfio& elf_file) { |
| 620 | context.sections.resize(elf_file.sections.size()); |
| 621 | context.section_functions.resize(elf_file.sections.size()); |
| 622 | context.functions.reserve(1024); |
| 623 | context.functions_by_vram.reserve(context.functions.capacity()); |
| 624 | context.functions_by_name.reserve(context.functions.capacity()); |
| 625 | context.rom.reserve(8 * 1024 * 1024); |
| 626 | } |
| 627 | |
| 628 | bool N64Recomp::Context::from_elf_file(const std::filesystem::path& elf_file_path, Context& out, const ElfParsingConfig& elf_config, bool for_dumping_context, DataSymbolMap& data_syms_out, bool& found_entrypoint_out) { |
| 629 | ELFIO::elfio elf_file; |