Josef Angermeier <sijoange@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes: Questions about the linker are best sent to binutils@xxxxxxxxxxxxxxx See http://sourceware.org/binutils/ > in my ld linker script i got something like that: > > load_start_data = rom_start + (. - old_rom_start); > .data : AT (load_start_data) { /* Must be read-only! */ > *(.data) > } > > Unfortunately this causes problems if .data section has an alignment. > Then not "." (location counter) is used for its address, but the aligned > address. But if alignment is used the load_start_data (LMA address) is > abit wrong, because it should correspondingly also get aligned. This > isn't automatically done. How about putting something along the lines of . = ALIGN (32); before you set load_start_data? Choose the maximum alignment you expect to see in the .data input sections. Ian