Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years ago.
What is the name of the data section expected by the linker?
Folks
Even if the (unuseful) source below compile successfully the data AREA is not included in the .bin file. A simple look at the .bin file do not show the string ABCD which is at the last line of the source. I guess that all the DATA AREA's are not linked together and that I need to use the same name as the C compiler.
Searching on the mbed site don't give me any clue, all assembler examples play with register but no one with the DATA area directly, so do not need to define it. On the oposite side, the Vector part is linked successfully even if there is no reference in the source.
So the question is which name i have to give to the DATA area?
Thank's for your help
Sample program source
AREA main, CODE ; Name of code main EXPORT main EXPORT __initial_sp __initial_sp EQU 0x80000 THUMB B . EXPORT dataprog AREA dataprog, DATA Carac DCB "ABCD" ALIGN END
2 Answers
11 years ago.
Hi,
The armlink (linker of online tool) attempt to remove unused sections to reduce image file.
http://infocenter.arm.com/help/topic/com.arm.doc.dui0474c/Cchhhghb.html
In you test case, I think the Carac symbol are not referred by any function, so it will be removed by linker which is default behavior.
Thanks,
11 years ago.
Thank you for taking time to answer. Unfortunatly even if you are right, I guess that something was change in the toolchain and now i get other errors.
Is there a way to have access to the output list files issued by the compiler and linker?
Anyway thank you again and happy new year.
P.S.
Even if the online compiler is a fantastic tool, i am going to turn into the gnu world for assembly if there is no access to the lists.