1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-10 19:20:13 +00:00

Use a temp symbol for RomStart/RomEnd symbols, makes the map show the right value for actual RomStart/RomEnd symbols (#880)

This commit is contained in:
Dragorn421 2021-08-01 21:53:46 +02:00 committed by GitHub
parent d816ac6122
commit 8ecd77a8f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -328,8 +328,9 @@ static void write_ld_script(void)
//if (seg->fields & (1 << STMT_increment))
//fprintf(fout, " . += 0x%08X;\n", seg->increment);
fprintf(fout, " _%sSegmentRomStart = _RomSize;\n"
" ..%s ", seg->name, seg->name);
fprintf(fout, " _%sSegmentRomStartTemp = _RomSize;\n"
" _%sSegmentRomStart = _%sSegmentRomStartTemp;\n"
" ..%s ", seg->name, seg->name, seg->name, seg->name);
if (seg->fields & (1 << STMT_after))
fprintf(fout, "_%sSegmentEnd ", seg->after);
@ -410,7 +411,9 @@ static void write_ld_script(void)
//fprintf(fout, " _RomSize += ( _%sSegmentDataEnd - _%sSegmentTextStart );\n", seg->name, seg->name);
fprintf(fout, " _RomSize += ( _%sSegmentOvlEnd - _%sSegmentTextStart );\n", seg->name, seg->name);
fprintf(fout, " _%sSegmentRomEnd = _RomSize;\n\n", seg->name);
fprintf(fout, " _%sSegmentRomEndTemp = _RomSize;\n"
"_%sSegmentRomEnd = _%sSegmentRomEndTemp;\n\n",
seg->name, seg->name, seg->name);
// algn end of ROM segment
if (seg->fields & (1 << STMT_romalign))