Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-11837

Linker option --scan_libraries mistakenly complains about duplicate symbols when a library is supplied multiple times

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium

      This test case puts a simple function in a library, and calls it. Then it links it with a command that uses the library two times, and --scan_libraries.

      C:\examples>type inlib.c
      void inlib() {}
      
      C:\examples>tiarmclang -c inlib.c
      
      C:\examples>tiarmar -r t.lib inlib.o
      tiarmar.exe: warning: creating t.lib
      
      C:\examples>type main.c
      void inlib();
      
      int main()
      {
          inlib();
          return 0;
      }
      
      C:\examples>tiarmclang -c main.c
      
      C:\examples>tiarmclang -o test.out main.o t.lib t.lib -Wl,-c,--scan_libraries
      warning: Symbol "TI_memcpy_small" (pulled from
         "C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libc.
         a<memcpy_t2.S.obj>") defined in 2 places:
         C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libc.a
         <memcpy_t2.S.obj>
         C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libsys
         bm.a<memcpy_t2.S.obj>
      
      warning: Symbol "TI_memset_small" (pulled from
         "C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libc.
         a<memset_t2.S.obj>") defined in 2 places:
         C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libc.a
         <memset_t2.S.obj>
         C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libsys
         bm.a<memset_t2.S.obj>
      
      <Many similar warnings deleted>
      
      warning: Symbol "inlib" (pulled from "t.lib<inlib.o>") defined in 2 places:
         t.lib<inlib.o>
         t.lib<inlib.o>
      

      Notice the diagnostic about the symbol inlib. It should not be emitted, because it comes from the same library.

      Notice the diagnostics about symbols from the compiler RTS libraries. They should not be emitted, because the user cannot control that symbol duplication.

          [EXT_EP-11837] Linker option --scan_libraries mistakenly complains about duplicate symbols when a library is supplied multiple times

          TI User made changes -
          Status Original: In Development [ 10103 ] New: Fixed [ 10102 ]
          TI User made changes -
          Reason for Unpublish
          Resolution New: Fixed [ 10104 ]
          TI User made changes -
          Status Original: Accepted [ 10100 ] New: In Development [ 10103 ]
          TI User made changes -
          Reason for Unpublish
          TI User made changes -
          Status Original: Accepted [ 10100 ] New: Accepted [ 10100 ]
          TI User made changes -
          Fix In Release Original: ARMCLANG_3.2.3.LTS*
          ARMCLANG_4.0.1.LTS
          New: ARMCLANG_3.2.3.LTS*
          ARMCLANG_4.0.2.LTS*
          Reason for Unpublish
          TI User made changes -
          Status Original: Accepted [ 10100 ] New: Accepted [ 10100 ]
          TI User made changes -
          Fix In Release Original: ARMCLANG_4.0.1.LTS*
          ARMCLANG_3.2.3.LTS*
          New: ARMCLANG_3.2.3.LTS*
          ARMCLANG_4.0.1.LTS
          Reason for Unpublish
          TI User made changes -
          Status Original: New [ 10104 ] New: Accepted [ 10100 ]
          TI User made changes -
          Reason for Unpublish
          Priority Original: Not Prioritized [ 10000 ] New: Medium [ 3 ]

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

              Created:
              Updated:
              Resolved: