I deleted some unused test code and it cause a problem with global variables getting corrupted after:
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, RamfuncsLoadEnd - RamfuncsLoadStart);
I tracked the problem to a static array of structs declared in one of the functions. If I decrease the size of the array to a particular point and the problem will appear. if .ebss is about 27% or less of the section of Memory, the problem occurs. below are the contents of the linker file. I can't see any reason for the interaction.
RAML0 : origin = 0x008000, length = 0x000800
L7DPSARAM : origin = 0x010000, length = 0x003000
.ebss : > L7DPSARAM, PAGE = 1
ramfuncs : LOAD = FLASH_ABCDEFGH,
RUN = RAML0,
LOAD_START(_RamfuncsLoadStart),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
PAGE = 0
