C Code Review Linker - crcld

The C Code Review Linker links and analyzes the files produced by the C Code Review Compiler (crccc) for code review static analysis. It produces a .crc code review file that can be displayed in Rational® Test RealTime.

Syntax

crcld <xob>[ <xob>] -CRC=<output> [<options>]

where:

  • <xob> is the name of the object file generated by the Code Review Compiler.

  • <output> is the generated .crc code review report file.

Descrition

The C Code Review Compiler fits into your compilation sequence with minimal changes.

Options

Command line options can be abbreviated to their shortest unambiguous number of characters and are not case-sensitive.

[-RULE=<file>]

Specifies the code review rule configuration file. By default, a default internal configuration rule set is used

[-TEST]

Disables the verification of undefined symbols when using the code review link checker in test mode from Rational® Test RealTime. So some of the MISRA rules are not verified. To verify these rules, they must be directly run from an application node in Rational® Test RealTime.

List of rules that are not verified when the code review is run in test mode with the link checker:

FOR MISRA -C:2004

    • Rule M8.7: Global object should not be declared if they are used only from within a single function.

    • Rule M8.9.2: The global object or function <name> should have exactly one external definition. No definition found.

    • Rule M8.10.1: The global object <name> that is used only within the same file should be declared using the static storage-class specifier.

    • Rule M8.10.2 : The global function <name> that is used only within the same file should be declared using the static storage-class specifier.

    • Rule E8.51: The object <name> is never referenced.

    • Rule E16.50: The function <name> is never referenced.

FOR MISRA C:2012

  • M8.9: An object should be defined at block scope if its identifier only appears in a single function

  • E8.10: The global object or function <name> should have exactly one external definition. No definition found.

  • M8.7.1 : Global object <name> that is only used within the same file should be declared using the static storage-class specifier.

  • M8.7.2: Global function <name> that is only used within the same file should be declared using the static storage-class specifier.

  • E8.12: The object <name> is never referenced.

  • M2.2.2: The function <name> is never referenced.

Example

crcld object.xob main.xob -crc=main.crc

Related Topics

Code review overview | Running a code review | C Code Review Compiler - crccc