Linker warning
Hi,
Any body got any suggestions as to where I start looking to resolve the linker error below?
CrossWorks for ARM 2.1.0/gcc/arm-unknown-elf/bin/ld: warning: dot moved backwards before `.data_run'
This is an LPC2478 project that was compling and linking okay some time ago, but now fails on the link.
I have checked the flash_placement.xml file and the .data declaration appears okay as below:
<MemorySegment name="FLASH">
<ProgramSection alignment="4" load="Yes" runin=".data_run" inputsections="*(.data .data.* .gnu.linkonce.d.*)" name=".data"/>
<MemorySegment name="SRAM">
<ProgramSection alignment="4" load="No" name=".data_run"/>
Any help woyuld be much appreciated.
Thanks, Roger...
-
Hi Roger,
We encountered this when we upgraded to a later version of GCC. I think there may be some hints in the GCC documentation if you Google the error message. We fixed it by re-arranging the sections in our flash placement file. I can't remember the exact change we made, and I can't seem to find it in our Subversion, but I can tell you the .data_run section is FIRST in our SRAM memory segment.
If you;re still stuck say so and I'll do some more digging in our repository history.
Cheers and Good Luck,
Wolfgang
-
Hi Wolfgang,
Many thanks for the suggestions. I did have a look around with Google, but didnt find anything that made a lot of sense. I will look around a bit more and get back to you if I have no luck in finding a solution.
I have attached my flash_placement.xml file. Perhaps you could have a look at this and see if you can spot anything obviously wrong.
Many thanks, Roger...
-
Hi Roger,
I believe error is down to the latest version of the linker being stricter about the order sections are placed in memory - the order of the load sections should match the order of the run sections.
The placement file you attached looks OK and I can't reproduce the error using it. I suggest that you try doing a clean and rebuild of the project, if the problem is still there double check that this is actually the placement file you are using, you can do this by right clicking on the project in the project explorer and selecting "View Section Placement".
Regards,
Jon Elliott
-
Hi Jon and Wolfgang,
I am still struggling with this.
I checked that I was using file shown and I have imported it into the project to be sure, see attachment of the imported file.
I have cleaned and re-built the project many times but the problem still exists.
Any more thoughts?
Regards, Roger...
-
Hi Roger,
I also had a look at your file and couldn't see anything wrong. We do have a LPC2478 project, and I have attached our placement file for that - this builds fine with our code. Notable differences in our environment are that we aren't using External SDRAM, and we're still using CrossWorks for ARM 2.0.11 - which has an earlier version of GCC than 2.1.
I strongly suggest taking Jon up on his offer and provide a project if you can.
Cheers and Good Luck,
Wolfgang
Please sign in to leave a comment.
Comments
6 comments