i think the problem lies in your "AT" statements. you're telling ld to place .data at (phys+data-code) but data's address is based on .data's place. same applies for the following sections. you don't...