Skip to content

Commit

Permalink
fix_bss.py: Restore z_locale special case (#2179)
Browse files Browse the repository at this point in the history
  • Loading branch information
cadmic authored Sep 9, 2024
1 parent 2232f67 commit 6fcaa51
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/fix_bss.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,14 @@ def main():
for file, bss_section in bss_sections.items():
if not bss_section.pointers:
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
# 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)
build_min_address = bss_section.start_address
if not all(
Expand Down

0 comments on commit 6fcaa51

Please sign in to comment.