This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
The linker mapfile options seem to be fairly limited (SPRU514C p. 66). I was looking for a way to produce the map file in XML form rather than a human-readable listing, so that I can easily write a script to parse the .map file.
If there is an undocumented option to do this now, could you let me know what it is?
If there is not an option to produce the .map file in XML form, please put this on your todo list.
Try the --xml_link_info linker option (-xml_link_info in older versions). You might also be able to make some use out of ofd2000 -x
cl2000 hello.c -z -llnk.cmd --xml_link_info=map.xml
ofd2000 -x a.out
The --xml_link_info=file option will generate a XML link information file which should contain all the information found in a map file. This option is mentioned on Page 67 of SPRU514C, and further description of the file information can be found in Chapter B of SPRU513C: http://www.ti.com/lit/spru513
In addition, http://processors.wiki.ti.com/index.php/Code_Generation_Tools_XML_Processing_Scripts contains scripts which operate on the linker XML map files and OFD XML files. You can use them as supplied, or as a starting point for your own scripts.
Thanks and regards,
-George
Aarti said:The --xml_link_info=file option will generate a XML link information file which should contain all the information found in a map file. This option is mentioned on Page 67 of SPRU514C, and further description of the file information can be found in Chapter B of SPRU513C: http://www.ti.com/lit/spru513
Aiggh! I can't believe I missed that. Works great -- thanks!
Just a note on the XML file -- technically there's a minor obscure bug in the XML generation. XML doesn't have the encoding attribute in the header (e.g. <?xml version="1.0" encoding="ISO-8859-1"?> or whatever) and the linker does allow non-ASCII characters to pass through to the output. (look at the .xml file in Firefox and it complains it's not well formed).
We have a bug in our build that produces a weird non-ASCII section name, which we're going to fix, but you should either encode the characters properly, or not let them through.
Jason R Sachs said:XML doesn't have the encoding attribute in the header [..] you should either encode the characters properly, or not let them through.
Quite true. I've filed SDSCM00037671 to track this issue.