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.

warning: duplicate section name 1.out(.text) (ignored)

Hi,

    I have encountered a very strange issue: When I convert my .out file to .hex file with the commandline:

hex6x --issue_remarks -i -memwidth=8 -romwidth=8 -o 1.hex 1.out -map 1.map

I got the warning message below:

warning: duplicate section name 1.out(.args) (ignored)
warning: duplicate section name 1.out(.bss) (ignored)
warning: duplicate section name 1.out(.neardata) (ignored)
warning: duplicate section name 1.out(.rodata) (ignored)
warning: duplicate section name 1.out(.sysmem) (ignored)
warning: duplicate section name 1.out(.stack) (ignored)
warning: duplicate section name 1.out(.cio) (ignored)
warning: duplicate section name 1.out(.text) (ignored)
warning: duplicate section name 1.out(.far) (ignored)
Translating to Intel format...
   "1.out"   ==> .args
   "1.out"   ==> .const
   "1.out"   ==> .vecs
   "1.out"   ==> .switch
   "1.out"   ==> .cinit

The  .text section has been ignored when doing converting, So the hex file

does not work.

I am sure that there's no same sections defined in my .cmd file, and also,

the 1.out has been test ok under CCS.

The attached file is my .out file and .map file.

8507.1.tar.gz

So what shall I do with this issue? Thanks a lot!

B.R.

Sunzhao

  • Sunzhao,

    I ran the ofd (object file display) utility on your .out file and the output showed a few sections being duplicated, once with the correct size and once with zero size at placed at address 0x0. The hex converter seems to process them in the order that they appear, and ignores the second one in the case of these duplicate sections. For the .text section, the first one is the one of zero size and the second one is being ignored. But I'm not sure why these sections are appearing twice to begin with. Is there anything special about your linker command file/section allocation that might cause this?

    I have attached the output from the command: ofd6x -g 1.out > 1_ofd.txt

     

     

  • Hi AartiG,

         Thank you very much for your information.I find that the reason caused

    the zero size section is the .cmd file which generated by the xdc "configuro" tools.

    It generates a .cmd file but can be overwritten. When I use my .cmd file to overwrite

    it, the zero size section occurs... If I remove the line below in the auto-generated

    cmd file mannually, I can get rid of the zero size section. But do you know how to

    get rid of it automatically?

    .text: load >> MSMCSRAM

    Thank you!
    B.R.
    Sunzhao

  • zhao sun said:

    I find that the reason caused

    the zero size section is the .cmd file which generated by the xdc "configuro" tools.

    It generates a .cmd file but can be overwritten. When I use my .cmd file to overwrite

    it, the zero size section occurs...

    Thank you for the update. I notice the same thing as well. In a RTSC project if there is a custom linker command file which has the same sections specified as the RTSC generated linker command file, then there is a zero size section in addition to the regular section. Normally this should not pose a problem, but it seems that the hex converter doesn't quite handle the sections correctly in this case.

    My recommendation to address this issue would be to create a custom RTSC platform (which places .text in  different location than the default RTSC) instead of adding a custom linker command file to the project. A custom linker command file is fine for specifying custom sections that are not already a part of the RTSC specification. For the generic sections such as .text, .const etc, it is best to perform this customization by creating a custom RTSC platform package.

    Please take a look at the video clip "Using the RTSC Platform Wizard", which shows how to create a custom platform:
    http://processors.wiki.ti.com/index.php/Quick_Tips#DSP.2FBIOS

    Please give this a try and it should help resolve the issue.