libgloss/v850/crt0.S missing copy of .data from ROM to RAM?
Tue May 24 11:49:00 GMT 2016
I have built GCC 4.9.2 together with newlib-2.2.0-1, which I then used
for a v850 project. I experienced problems with the resulting binary I
tried to flash. After some digging around I could not find any code
copying the .data section from ROM to RAM, but I did find code in crt0.S
By manually doing the following before invoking the main()-function (as
suggested by the GNU ld manual) I got my C++ compiled code working:
char *src = rom_data_start;
char *dst = ram_data_start;
while (dst < ram_data_end)
*dst++ = *src++;
Of course the symbol names above had to be provided in the linker script.
Am I right in assuming that the code is missing in crt or should it not
even be there (where else?)?
NIRA Dynamics AB
Wallenbergs gata 4
Phone: +46 13 491 98 11
Mobile: +46 767 860 739
www.niradynamics.se - Together for smarter safety
More information about the Newlib