Open AngheloAlf opened 4 months ago
The alignment directive is emitted, but then the segment still uses the end vram of the follows_vram segment instead of using the aligned vram.
follows_vram
For example with the given input
- name: more_funcs dir: more_funcs type: code start: 0x5BF20 vram: 0x800BF080 bss_size: 0x1F6F0 follows_vram: app_render ld_align_segment_start: 0x40
The generated linker script says
} __romPos += SIZEOF(.app_render); __romPos = ALIGN(__romPos, 16); . = ALIGN(., 16); app_render_ROM_END = __romPos; app_render_VRAM_END = .; __romPos = ALIGN(__romPos, 0x40); _ = ALIGN(., 0x40); more_funcs_ROM_START = __romPos; more_funcs_VRAM = ADDR(.more_funcs); .more_funcs app_render_VRAM_END : AT(more_funcs_ROM_START) {
Ideally the .more_funcs app_render_VRAM_END : AT(more_funcs_ROM_START) line wouldn't use the app_render_VRAM_END, but instead it would use the ALIGNed address.
.more_funcs app_render_VRAM_END : AT(more_funcs_ROM_START)
app_render_VRAM_END
ALIGN
Also I just noted the wrong _ = ALIGN(., 0x40);. It should be . = ALIGN(., 0x40);
_ = ALIGN(., 0x40);
. = ALIGN(., 0x40);
The alignment directive is emitted, but then the segment still uses the end vram of the
follows_vram
segment instead of using the aligned vram.For example with the given input
The generated linker script says
Ideally the
.more_funcs app_render_VRAM_END : AT(more_funcs_ROM_START)
line wouldn't use theapp_render_VRAM_END
, but instead it would use theALIGN
ed address.Also I just noted the wrong
_ = ALIGN(., 0x40);
. It should be. = ALIGN(., 0x40);