linker error 10478 may be incorrectly emitted for same-name-static variables

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • Code Generation Tools
    • CODEGEN-15762
    • Show
      https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1528295/tms320f280039-new-project-compiler-error-for-lfu-application/6347185?tisearch=e2e-sitesearch&keymatch=10478#
    • Hide
      C29_1.0.0.LTS
      C2000_22.6.0.LTS
      C2000_25.11.0.LTS
      C6000_8.5.0.LTS
      ARMCLANG_4.0.0.LTS
      C7000_5.0.0.LTS
      ARMCLANG_5.1.0.LTS
      C7000_6.1.0.STS
      C7000_4.1.0.LTS
      C29_2.2.0.LTS
      Show
      C29_1.0.0.LTS C2000_22.6.0.LTS C2000_25.11.0.LTS C6000_8.5.0.LTS ARMCLANG_4.0.0.LTS C7000_5.0.0.LTS ARMCLANG_5.1.0.LTS C7000_6.1.0.STS C7000_4.1.0.LTS C29_2.2.0.LTS
    • Hide
      ARMCLANG_5.1.2.LTS*
      C6000_8.5.1.LTS*
      C29_2.2.2.LTS*
      C2000_22.6.4.LTS
      C7000_4.1.3.LTS*
      C2000_25.11.2.LTS*
      ARMCLANG_4.0.6.LTS*
      C7000_5.0.2.LTS*
      C29_1.0.3.LTS*
      Show
      ARMCLANG_5.1.2.LTS* C6000_8.5.1.LTS* C29_2.2.2.LTS* C2000_22.6.4.LTS C7000_4.1.3.LTS* C2000_25.11.2.LTS* ARMCLANG_4.0.6.LTS* C7000_5.0.2.LTS* C29_1.0.3.LTS*
    • default
    • Hide
      - rename one of the two variables to something unique (eliminate the collision)

      - if this error occurs for an lfu build (--lfu_reference_elf) for two
        same-name static variables that are being lfu-preserved, then either
        use above work around or:
        - mark one of the two static variables as __attribute__((update)), however
          this then requires manually updating the variable during lfu warm
          switchover after the call to __TI_auto_init_warm() if the runtime value
          is required instead of the initial value set in source code
      Show
      - rename one of the two variables to something unique (eliminate the collision) - if this error occurs for an lfu build (--lfu_reference_elf) for two   same-name static variables that are being lfu-preserved, then either   use above work around or:   - mark one of the two static variables as __attribute__((update)), however     this then requires manually updating the variable during lfu warm     switchover after the call to __TI_auto_init_warm() if the runtime value     is required instead of the initial value set in source code

      If the linker encounters two instances of same-name static variable that are in the same input section such that the linker collection generated for first instance has same name as second, then the linker may emit below error: 

      ../../master/ELFLNK/collect.c:772:internal fatal error #10478: expected found collection '.TI.bound:array' to be empty  

      NOTE: below can also happen on lfu builds for the C28 compiler. 

      Details on how to reproduce:

      //    main.c
      extern void foo1();
      extern void foo2();
      int main(){
         foo1();
         foo2();
         return 0;
      }
      //    test1.c
      __attribute__((location(0x0160))) static int array[16];
       void foo1()
      {
         volatile int x = array[10];
      }
      //   test2.c 
      __attribute__((location(0x0120))) static int array[16]; 
      void foo2()
      {
         volatile int y = array[2];
      }

       

      Compile and link to get the linker error:

      cl2000 test2.c test1.c main.c --abi=eabi --cla_support=cla2 -pden -z -llnk.cmd 

        Above link will generate below error:

      ../../master/ELFLNK/collect.c:772:internal fatal error #10478: expected found collection '.TI.bound:array' to be empty

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Connection: Intermediate to External PROD System
                EXTSYNC-6812 - linker error 10478 may be incorrect...
                SYNCHRONIZED
                • Last Sync Date: