mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-13 04:39:36 +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:
parent
d816ac6122
commit
8ecd77a8f1
1 changed files with 6 additions and 3 deletions
|
@ -328,8 +328,9 @@ static void write_ld_script(void)
|
||||||
//if (seg->fields & (1 << STMT_increment))
|
//if (seg->fields & (1 << STMT_increment))
|
||||||
//fprintf(fout, " . += 0x%08X;\n", seg->increment);
|
//fprintf(fout, " . += 0x%08X;\n", seg->increment);
|
||||||
|
|
||||||
fprintf(fout, " _%sSegmentRomStart = _RomSize;\n"
|
fprintf(fout, " _%sSegmentRomStartTemp = _RomSize;\n"
|
||||||
" ..%s ", seg->name, seg->name);
|
" _%sSegmentRomStart = _%sSegmentRomStartTemp;\n"
|
||||||
|
" ..%s ", seg->name, seg->name, seg->name, seg->name);
|
||||||
|
|
||||||
if (seg->fields & (1 << STMT_after))
|
if (seg->fields & (1 << STMT_after))
|
||||||
fprintf(fout, "_%sSegmentEnd ", seg->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 += ( _%sSegmentDataEnd - _%sSegmentTextStart );\n", seg->name, seg->name);
|
||||||
fprintf(fout, " _RomSize += ( _%sSegmentOvlEnd - _%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
|
// algn end of ROM segment
|
||||||
if (seg->fields & (1 << STMT_romalign))
|
if (seg->fields & (1 << STMT_romalign))
|
||||||
|
|
Loading…
Reference in a new issue