1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-15 06:06:04 +00:00

fix_bss.py: Restore z_locale special case (#2179)

This commit is contained in:
cadmic 2024-09-08 18:37:55 -07:00 committed by GitHub
parent 2232f67917
commit 6fcaa51832
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -797,8 +797,14 @@ def main():
for file, bss_section in bss_sections.items(): for file, bss_section in bss_sections.items():
if not bss_section.pointers: if not bss_section.pointers:
continue continue
# The following heuristic doesn't work for z_locale, since the first pointer into BSS is not
# at the start of the section. Fortunately z_locale either has one BSS variable (in GC versions)
# or none (in N64 versions), so we can just skip it.
if str(file) == "src/boot/z_locale.c":
continue
# For the baserom, assume that the lowest address is the start of the BSS section. This might # For the baserom, assume that the lowest address is the start of the BSS section. This might
# not be true if the first BSS variable is not referenced, but in practice this doesn't happen. # not be true if the first BSS variable is not referenced, but in practice this doesn't happen
# (except for z_locale above).
base_min_address = min(p.base_value for p in bss_section.pointers) base_min_address = min(p.base_value for p in bss_section.pointers)
build_min_address = bss_section.start_address build_min_address = bss_section.start_address
if not all( if not all(