<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    If you can produce a small test case, then I can pass it along to
    the <br>
    binutils group to track .<br>
    <br>
    Does this happen on GNU/Linux? That would help get attention :)<br>
    <br>
    --joel<br>
    <br>
    On 02/16/2012 01:09 PM, Wendell Silva wrote:
    <blockquote
cite="mid:CAF69O74wfa6aug6m0GLt1T94m6apPcPNRDa0caONCAWS_Cz-Fw@mail.gmail.com"
      type="cite">On more thing: sparc-rtems4.10-nm does not exhibit
      incorrect behavior. So, chances are that the bug is limited to
      i386-rtems tool-chain.
      <div><br>
      </div>
      <div>--</div>
      <div>Wendell.</div>
      <div><br>
        <div class="gmail_quote">2012/2/16 Wendell Silva <span
            dir="ltr"><<a moz-do-not-send="true"
              href="mailto:silvawp@gmail.com">silvawp@gmail.com</a>></span><br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">Hello everybody,
            <div><br>
            </div>
            <div>When calling:</div>
            <div><br>
            </div>
            <div>i386-rtems-4.10-nm  --print-size --numeric-sort
              --line-numbers rtems-img.exe > rtems-img.num</div>
            <div><br>
            </div>
            <div>the list of symbols in the file rtems-img.num produces
              valid line numbers (location of the symbol in the source
              code) only for those at .text section.</div>
            <div>When the symbol is in .data (or .bss) it seems to be
              printed as it was in the location of the last symbol in
              the .text section, instead of the correct file/line
              number.</div>
            <div><br>
            </div>
            <div>Example of listing:</div>
            <div><br>
            </div>
            <div>(... suppressed lines ...)</div>
            <div>001283f4 00000109 T lseek<span style="white-space:
                pre-wrap;"> </span>/home/developer/rtems-testing/rtems/build-i386-pc386-rtems/i386-rtems4.10/c/pc386/cpukit/libcsupport/../../../../../../rtems/c/src/../../cpukit/libcsupport/src/lseek.c:28</div>
            <div>00128500 00000027 T _lseek_r<span style="white-space:
                pre-wrap;"> </span>/home/developer/rtems-testing/rtems/build-i386-pc386-rtems/i386-rtems4.10/c/pc386/cpukit/libcsupport/../../../../../../rtems/c/src/../../cpukit/libcsupport/src/lseek.c:98</div>
            <div>00128528 00000012 T _malloc_r<span style="white-space:
                pre-wrap;"> </span>/home/developer/rtems-testing/rtems/build-i386-pc386-rtems/i386-rtems4.10/c/pc386/cpukit/libcsupport/../../../../../../rtems/c/src/../../cpukit/libcsupport/src/_malloc_r.c:26</div>
            <div>0012853c 00000018 T _realloc_r<span style="white-space:
                pre-wrap;"> </span>/home/developer/rtems-testing/rtems/build-i386-pc386-rtems/i386-rtems4.10/c/pc386/cpukit/libcsupport/../../../../../../rtems/c/src/../../cpukit/libcsupport/src/_realloc_r.c:27</div>
            <div>00128554 0000001e T _write_r<span style="white-space:
                pre-wrap;"> </span>/home/developer/rtems-testing/rtems/build-i386-pc386-rtems/i386-rtems4.10/c/pc386/cpukit/libcsupport/../../../../../../rtems/c/src/../../cpukit/libcsupport/src/write_r.c:37</div>
            <div>00128574 0000000c T isatty<span style="white-space:
                pre-wrap;"> </span>/builddir/build/BUILD/rtems-4.10-i386-rtems4.10-gcc-4.4.5/build/i386-rtems4.10/newlib/libc/posix/../../../../../gcc-4.4.5/newlib/libc/posix/isatty.c:8</div>
            <div>00128580 0000004f T _isatty<span style="white-space:
                pre-wrap;"> </span>/builddir/build/BUILD/rtems-4.10-i386-rtems4.10-gcc-4.4.5/build/i386-rtems4.10/newlib/libc/posix/../../../../../gcc-4.4.5/newlib/libc/posix/_isatty.c:10</div>
            <div>001285d0 t __do_global_ctors_aux<span
                style="white-space: pre-wrap;"> </span>/builddir/build/BUILD/rtems-4.10-i386-rtems4.10-gcc-4.4.5/build/i386-rtems4.10/newlib/libc/posix/../../../../../gcc-4.4.5/newlib/libc/posix/_isatty.c:21</div>
            <div>00128600 T __start_set_sysctl_set<span
                style="white-space: pre-wrap;"> </span>/builddir/build/BUILD/rtems-4.10-i386-rtems4.10-gcc-4.4.5/build/i386-rtems4.10/newlib/libc/posix/../../../../../gcc-4.4.5/newlib/libc/posix/_isatty.c:21</div>
            <div>00128600 A __stop_set_sysctl_set</div>
            <div>00128600 T _init<span style="white-space: pre-wrap;"> </span>/builddir/build/BUILD/rtems-4.10-i386-rtems4.10-gcc-4.4.5/build/i386-rtems4.10/newlib/libc/posix/../../../../../gcc-4.4.5/newlib/libc/posix/_isatty.c:21</div>
            <div>0012860d T _fini<span style="white-space: pre-wrap;"> </span>/builddir/build/BUILD/rtems-4.10-i386-rtems4.10-gcc-4.4.5/build/i386-rtems4.10/newlib/libc/posix/../../../../../gcc-4.4.5/newlib/libc/posix/_isatty.c:21</div>
            <div>(... suppressed lines ...)</div>
            <div>00128a04 00000018 R rtems_filesystem_table<span
                style="white-space: pre-wrap;"> </span>/builddir/build/BUILD/rtems-4.10-i386-rtems4.10-gcc-4.4.5/build/i386-rtems4.10/newlib/libc/posix/../../../../../gcc-4.4.5/newlib/libc/posix/_isatty.c:21</div>
            <div>00128a1c 00000010 R configuration_mount_table<span
                style="white-space: pre-wrap;"> </span>/builddir/build/BUILD/rtems-4.10-i386-rtems4.10-gcc-4.4.5/build/i386-rtems4.10/newlib/libc/posix/../../../../../gcc-4.4.5/newlib/libc/posix/_isatty.c:21</div>
            <div>00128a2c 00000004 R rtems_filesystem_mount_table_size<span
                style="white-space: pre-wrap;"> </span>/builddir/build/BUILD/rtems-4.10-i386-rtems4.10-gcc-4.4.5/build/i386-rtems4.10/newlib/libc/posix/../../../../../gcc-4.4.5/newlib/libc/posix/_isatty.c:21</div>
            <div> </div>
            <div>
              <div><br>
              </div>
              <div>The last three lines are incorrect. </div>
              <div>Look at "rtems_filesystem_table", for instance. It is
                expected to be allocated in the source that defines
                CONFIGURE_INIT, since it is in confdefs.h, however 'nm'
                thinks it is in _isatty.c, line 21 (!!!!).</div>
              <div><br>
              </div>
              <div>Can anyone confirm this strange behavior?</div>
              <div><br>
              </div>
              <div>Versions of nm and gcc I'm using:</div>
              <div>i386-rtems4.10-nm --version</div>
              <div>
                <div>GNU nm (GNU Binutils) 2.20.1</div>
                <div>Copyright 2009 Free Software Foundation, Inc.</div>
                <div>This program is free software; you may redistribute
                  it under the terms of</div>
                <div>the GNU General Public License version 3 or (at
                  your option) any later version.</div>
                <div>This program has absolutely no warranty.</div>
                <div><br>
                </div>
                <div>i386-rtems4.10-gcc --version</div>
                <div>i386-rtems4.10-gcc (GCC) 4.4.5 20101001 (RTEMS
                  gcc-4.4.5-4.fc14/newlib-1.18.0-19.fc14)</div>
                <div>Copyright (C) 2010 Free Software Foundation, Inc.</div>
                <div>This is free software; see the source for copying
                  conditions.  There is NO</div>
                <div>warranty; not even for MERCHANTABILITY or FITNESS
                  FOR A PARTICULAR PURPOSE.</div>
              </div>
              <div><br>
              </div>
              <div><br>
              </div>
              <div>Thanks in advance,</div>
              <span class="HOEnZb"><font color="#888888">
                  <div><br>
                  </div>
                  -- <br>
                  Att.<br>
                  Wendell Silva<br>
                  <br>
                </font></span></div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        Att.<br>
        Wendell P. Silva<br>
        +55 12 8114-8018<br>
        <br>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Joel Sherrill, Ph.D.             Director of Research&  Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a>        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985

</pre>
  </body>
</html>