Keil Logo

ARMCLANG: L6743E: Internal Consistency Check Failed


Information in this knowledgebase article applies to:

  • Arm Compiler Version 6.11

SYMPTOM

The Arm linker might report the following error when the Arm compiler version 6.11 was used to build a project and when the project contains a variable which is defined as weak but is not used because of an alternate definition.

linking...
.\Objects\Project.axf: Error: L6743E: Relocation ... in AnyFile.o(.debug_info) with respect to ... that has an alternate def. Internal consistency check failed
Not enough information to list load addresses in the image map.
Finished: 1 information, 0 warning and 1 error messages.

Here is one general example and one Keil RTX specific example which may cause this error:

  1. Test1.c

    int var1;
    extern int var2;
    
    int main(void) {
    
      return var1 + var2;
    }
    

    Test2.c
    __attribute__((weak)) int var1;
    int var2 = 5;
    
    The variable var1 is defined in module Test2.c with the attribute weak. This variable definition is not used because an alternate definition of the same variable var1 exists in module Test1.c (without weak).
  2. This error may occur in projects based on CMSIS RTOS Keil RTX or RTX5 when user defined software interrupts have been added using a SVC User Table. In this case, the CMSIS user code template svc_user.c is added to a project. This module contains the definition of the array osRtxUserSVC[] which is also defined with the attribute weak in the module rtx_lib.c of the RTX/RTX5 library. In this case you see the error message:

    linking...
    .\Debug\Project.axf: Error: L6743E: Relocation #REL:130 in rtx_lib.o(.debug_info) with respect to osRtxUserSVC that has an alternate def. Internal consistency check failed
    Not enough information to list load addresses in the image map.
    Finished: 1 information, 0 warning and 1 error messages.
    

CAUSE

This is an internal issue of Arm compiler version 6.11 only.

RESOLUTION

There are two ways to avoid this error:

  1. Use the previous Arm compiler version 6.10.1 or versions newer than Arm compiler version 6.11 
  2. Add the following segment definition into the assembler startup file:
    ; Workaround for linker error L6743E: Internal consistency check failed
                    AREA |.gnu.linkonce.common|, READONLY
    
    This will remove the error, but will cause the following Warning:
    .\Debug\Project.axf: Warning: L6092W: Section startup_xxx.o(.gnu.linkonce.common) has deprecated prefix '.gnu.linkonce'. Support for legacy common sections shall be removed in a future version of the linker. Please use COMDAT groups as a replacement.
    
    This warning can be disabled by entering the number 6092 in the µVision dialog Options for Target - Linker - disable Warning.

STATUS

This is a confirmed issue for Arm compiler version 6.11. It is fixed in the next version.

MORE INFORMATION

Last Reviewed: Friday, January 15, 2021


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.