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

Linker --retain fails to retain named entity when full name of RTS library is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium

      The following commands show a simple C++ program, builds it twice with different ways of using --retain, then shows one way to compare the result.

      C:\working_directory>type a.cpp
      int main()
      {
          return 0;
      }
      
      C:\working_directory>cl6x a.cpp -mv6600 -O3 -z --map_file=fails.map -l=rts6600_elf.lib --unused_section_elimination=on --retain="rts6600_elf.lib<strcmp.c.obj>(.text)"
      <Linking>
      
      C:\working_directory>cl6x a.cpp -mv6600 -O3 -z --map_file=works.map -l=rts6600_elf.lib --unused_section_elimination=on --retain="*.lib<strcmp.c.obj>(.text)"
      <Linking>
      
      C:\working_directory>findstr strcmp fails.map works.map
      works.map:                  00008560    00000060                     : strcmp.c.obj (.text:strcmp)
      works.map:       strcmp.c.obj                 96     0         0
      works.map:00008560  strcmp
      works.map:00008560  strcmp
      

      The first build completely spells out the library name rts6600_elf.lib, and names the map file fails.map. The second build uses *.lib instead, and names the map file works.map. The last command shows that fails.map does not have strcmp, but works.map does.

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

              Created:
              Updated: