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]

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


Hi Josef,

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

> Am I right in assuming that the code is missing in crt 

Yes.

> or should it not even be there (where else?)?

No, crt0 is the right place for this code.

Obviously this problem has arisen because no-one thought about the 
possibility that the data sections might be loaded at a different
address from the their runtime locations.  It should be fairly 
straightforward to extend the assembler in crt0.S to support this
requirement however.  Would you like to submit a patch ?

Presumably there may also be a need to copy the .zdata, .tdata and
.sdata sections.  I also see that there is a .data1 section, although 
I do not know if it is ever used.

Cheers
  Nick


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