I was looking at my code when I noticed something very odd. The code is in two files and assembled using msp430-elf-as and each has .text sections. What I noticed is that there was a gap between the last code in one file and the first code in the second with the second starting at 0x4c00.
Things got even stranger when I looked at the data segment. The linker had placed it at 0x4400 (the start of FRAM) and while it is short, it occupies a full 1K with code starting at 0x4800.
The problem appears to be caused by a .align 10 pseudo op at the end of the second code file. I use this because I am using the MPU and the code needs to know where the start of memory that it can write to is at.
But why is an align directive at the end of one file changing the alignment for everything?
I cut it down to a very simplified test case to show that it was in fact this .align 10 directive.