Fix empty bss section name mapping (#167)
Some checks failed
validate / blaze/ubuntu-22.04 (arm64, Debug) (push) Has been cancelled
validate / blaze/ubuntu-22.04 (arm64, Release) (push) Has been cancelled
validate / macos-14 (arm64, Debug) (push) Has been cancelled
validate / macos-14 (arm64, Release) (push) Has been cancelled
validate / macos-15-intel (x64, Debug) (push) Has been cancelled
validate / macos-15-intel (x64, Release) (push) Has been cancelled
validate / ubuntu-latest (x64, Debug) (push) Has been cancelled
validate / ubuntu-latest (x64, Release) (push) Has been cancelled
validate / windows-latest (x64, Debug) (push) Has been cancelled
validate / windows-latest (x64, Release) (push) Has been cancelled

This commit is contained in:
dcvz 2025-12-11 16:53:10 +01:00 committed by GitHub
parent 07fcdac76d
commit 98bf104b1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -320,7 +320,9 @@ ELFIO::section* read_sections(N64Recomp::Context& context, ELFIO::section*& mdeb
if (type == ELFIO::SHT_NOBITS && section_name.ends_with(elf_config.bss_section_suffix)) { if (type == ELFIO::SHT_NOBITS && section_name.ends_with(elf_config.bss_section_suffix)) {
std::string bss_target_section = section_name.substr(0, section_name.size() - elf_config.bss_section_suffix.size()); std::string bss_target_section = section_name.substr(0, section_name.size() - elf_config.bss_section_suffix.size());
bss_sections_by_name[bss_target_section] = section.get(); if (!bss_target_section.empty()) {
bss_sections_by_name[bss_target_section] = section.get();
}
} }
// If this section was marked as being in the ROM in the previous pass, copy it into the ROM now. // If this section was marked as being in the ROM in the previous pass, copy it into the ROM now.