<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: size and objdmp command output in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/size-and-objdmp-command-output/m-p/4495945#M653469</link>
    <description>You should not be using foreign devil linker tools.  Stick with the ones in /usr/ccs/bin.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I want to know what constitutes data &lt;BR /&gt;&lt;BR /&gt;Anything that is R/W and initialized.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;But if I sum the size I do not get to 633574.&lt;BR /&gt;&lt;BR /&gt;Why would expect this?  There is padding and alignment.  And static variables with no names.&lt;BR /&gt;&lt;BR /&gt;You may be able to get an estimate by:&lt;BR /&gt;nm -xv  # -v to sort by value&lt;BR /&gt;&lt;BR /&gt;elfdump has options to dump sections:&lt;BR /&gt;elfdump -S -h&lt;BR /&gt;&lt;BR /&gt;&amp;gt;How do I map data section with program variables? &lt;BR /&gt;&lt;BR /&gt;Just look at the symbols in the various data areas: .data, .sdata, etc.&lt;BR /&gt;&lt;BR /&gt;.data 00000000 .data&lt;BR /&gt;.data 00000008 typeinfo X&lt;BR /&gt;.data 00000070 vtable for X&lt;BR /&gt;.data 0000000c typeinfo for Y&lt;BR /&gt;&lt;BR /&gt;C++ class metadata.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 11 Sep 2009 11:48:17 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2009-09-11T11:48:17Z</dc:date>
    <item>
      <title>size and objdmp command output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/size-and-objdmp-command-output/m-p/4495944#M653468</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;I am trying to analyse and reduce the memory taken by application &lt;BR /&gt;If i do size on object file a.o &lt;BR /&gt;it shows me &lt;BR /&gt;  text    data     bss     dec     hex filename&lt;BR /&gt; 675579  633574       0 1309153  13f9e1 a.o&lt;BR /&gt;&lt;BR /&gt;I want to know what constitutes data &lt;BR /&gt;So i am using nm/objdump command &lt;BR /&gt;But if i sum the size i do not get to  633574.&lt;BR /&gt;How do i map data section with program variables . Even with objdmp i am not getting much info.&lt;BR /&gt;&lt;BR /&gt;[charaka][FC102B2BT1]/users3/e51569&amp;gt; grep "OBJ.*GLOB" | grep data     &amp;lt;&lt;BR /&gt;[82]     |            0|       8|OBJT |GLOB |0|   .data|_ZTI13ISerializable&lt;BR /&gt;[91]     |            0|       8|OBJT |GLOB |0|   .data|_ZTI15IHashListErrors&lt;BR /&gt;[93]     |            0|      12|OBJT |GLOB |0|   .data|_ZTI15IListCollection&lt;BR /&gt;[88]     |            0|      32|OBJT |GLOB |0|   .data|_ZTI20IPowerHashVectorList&lt;BR /&gt;[85]     |            0|      12|OBJT |GLOB |0|   .data|_ZTI9IHashable&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Sep 2009 10:46:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/size-and-objdmp-command-output/m-p/4495944#M653468</guid>
      <dc:creator>tanmay patil</dc:creator>
      <dc:date>2009-09-11T10:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: size and objdmp command output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/size-and-objdmp-command-output/m-p/4495945#M653469</link>
      <description>You should not be using foreign devil linker tools.  Stick with the ones in /usr/ccs/bin.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I want to know what constitutes data &lt;BR /&gt;&lt;BR /&gt;Anything that is R/W and initialized.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;But if I sum the size I do not get to 633574.&lt;BR /&gt;&lt;BR /&gt;Why would expect this?  There is padding and alignment.  And static variables with no names.&lt;BR /&gt;&lt;BR /&gt;You may be able to get an estimate by:&lt;BR /&gt;nm -xv  # -v to sort by value&lt;BR /&gt;&lt;BR /&gt;elfdump has options to dump sections:&lt;BR /&gt;elfdump -S -h&lt;BR /&gt;&lt;BR /&gt;&amp;gt;How do I map data section with program variables? &lt;BR /&gt;&lt;BR /&gt;Just look at the symbols in the various data areas: .data, .sdata, etc.&lt;BR /&gt;&lt;BR /&gt;.data 00000000 .data&lt;BR /&gt;.data 00000008 typeinfo X&lt;BR /&gt;.data 00000070 vtable for X&lt;BR /&gt;.data 0000000c typeinfo for Y&lt;BR /&gt;&lt;BR /&gt;C++ class metadata.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Sep 2009 11:48:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/size-and-objdmp-command-output/m-p/4495945#M653469</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-09-11T11:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: size and objdmp command output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/size-and-objdmp-command-output/m-p/4495946#M653470</link>
      <description>On IBM platform same .o is occupying less size &lt;BR /&gt;size -f  a.o&lt;BR /&gt;bauu9535.o: 20112(.text) + 45984(.data) + 0(.bss) = 66096&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 13 Sep 2009 06:06:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/size-and-objdmp-command-output/m-p/4495946#M653470</guid>
      <dc:creator>tanmay patil</dc:creator>
      <dc:date>2009-09-13T06:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: size and objdmp command output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/size-and-objdmp-command-output/m-p/4495947#M653471</link>
      <description>&amp;gt;On IBM platform same .o is occupying less size&lt;BR /&gt;&lt;BR /&gt;You can't compare object files, you must compare shlibs.  (HP-UX has a lot of duplicate template info that is removed at link time.)</description>
      <pubDate>Sun, 13 Sep 2009 06:55:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/size-and-objdmp-command-output/m-p/4495947#M653471</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-09-13T06:55:51Z</dc:date>
    </item>
  </channel>
</rss>

