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.

STYP_DATA

C2000 Code Generation Tools v6.1.0 Defects History contains issue SDSCM00008721.  This says
    “Linker unexpectedly adds STYP_DATA flag into a text section”
    Affected Component : Linker

I cannot find STYP_DATA in the linker or any other documentation.

So, what is “STYP_DATA”?  What does it do to a text section? 

What is meant by unexpectedly?  Added every time, or at random?  Can I detect if it has been added?

The defects database gives no more information on what STYP_DATA might be.

Regards.

  • STYP_DATA is a section header flag in COFF files. Please see this doc for more information.
    Also, this forum post has a little bit more information on SDSCM00008721.

  • Thanks for this - SPRAAO8 was a document I had missed.

    However, for certification we need to show how we mitigate for any potential issues with the compiler / linker.  It’s not clear what adding STYP_DATA to a text section would do – could it cause a problem or unplanned behaviour in executing code?

    The defect just says it’s added “unexpectedly” – is it known under what conditions this happens?

  • From reading the internal details in the defect report, it appears that this flag appearing in the text section should not cause any problems or unexpected behavior.

    Further details found in the bug report:
    This issue was originally related to an old bug in the assembler that caused a zero-length .text section to be marked with an STYP_DATA flag and the fact that the linker allowed the output section header flags to be affected by a zero-length input section that is included in the output section.

    The old assembler bug has since been fixed.  This bug was then characterized as 'the linker should not allow zero-length input sections to affect the characteristics of the output section in which they are contained'.

    There are currently no plans to address this report so I do not expect the issue to have any negative impact.