This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libgloss/v850/crt0.S missing copy of .data from ROM to RAM?


Hi,

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
clearing .bss.

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?)?

Sincerely,

Josef Larsson

Josef Larsson
Systems Engineer

NIRA Dynamics AB
Wallenbergs gata 4
58330 LinkÃping

Phone: +46 13 491 98 11
Mobile: +46 767 860 739

www.niradynamics.se - Together for smarter safety

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]