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

Linker map file needlessly larger because of trailing blank space

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Low Low

      The attached hello.c is a typical hello world program. Build it with version 7.4.23 and then 8.3.4 ...

      # set path to version 7.4.23
      $ cl6x hello.c -z -o hello.out -m hello_7423.map
      <Linking>
      # set path to version 8.3.4
      $ cl6x hello.c -z -o hello.out -m hello_834.map
      <Linking>
      

      Look for space after the last character on the line. Particularly in the symbol dump, 8.3.4 has many more trailing space characters. One way to see it ...

      $ cat -vT hello_7423.map
      ...
      GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name ^M
      ^M
      address    name^M
      --------   ----^M
      00000008   $bss^M
      00000008   .bss^M
      00000008   .data^M
      00000020   .text^M
      
      $ cat -vT hello_834.map
      ...
      GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name ^M
      ^M
      address   name                           ^M
      -------   ----                           ^M
      0000a160  C$$EXIT                        ^M
      00009f78  C$$IO$$                        ^M
      00009a80  HOSTclose                      ^M
      00008fe0  HOSTlseek                      ^M
      000090c0  HOSTopen                       ^M
      00009600  HOSTread                       ^M
      

      For more context, please see the related forum thread. In that specific case, the newer map file is about 3X as big.

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

              Created:
              Updated: