crosstool bloat

David Karlton dkarlton@themediamall.com
Mon Sep 19 15:02:00 GMT 2005


Dave Korn wrote:
> ----Original Message----
> 
>>From: Dave Korn
>>Sent: 19 September 2005 15:26
> 
> 
>>----Original Message----
>>
>>>From: Peter Barada
>>>Sent: 19 September 2005 15:17
>>
>>>>That's exactly what I did, and the bloated one had an additional
>>>>section: 
>>>>
>>>>Idx Name          Size      VMA       LMA       File off  Algn
>>>>10 .MIPS.stubs   000000a0  00400e50  00400e50  00000e50  2**2
>>>>
>>>>but I don't know what this really means.
>>>
>>>That section size is only 160 bytes in size.  What section is the
>>>other 60k in?
>>
>>
>>  Yep, post the full output from "objdump -x".  
> 
>                                     ^^^^^^^^^^^^
> 
> 
>   ... from both before and after versions of your simplest 'hello world'
> testcase.  (should have been clearer about that first time round).
> 
> 
>     cheers,
>       DaveK


Sorry, here's the output as well from the older (non-bloated) version:

*******************************************************

dkarlton@fox:~/test> objdump -x hello.3.2.3

hello.3.2.3:     file format elf32-little
hello.3.2.3
architecture: UNKNOWN!, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00400500

Program Header:
     PHDR off    0x00000034 vaddr 0x00400034 paddr 0x00400034 align 2**2
          filesz 0x000000e0 memsz 0x000000e0 flags r-x
   INTERP off    0x00000114 vaddr 0x00400114 paddr 0x00400114 align 2**0
          filesz 0x0000000d memsz 0x0000000d flags r--
0x70000000 off    0x00000150 vaddr 0x00400150 paddr 0x00400150 align 2**2
          filesz 0x00000018 memsz 0x00000018 flags r--
     LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2**12
          filesz 0x00000950 memsz 0x00000950 flags r-x
     LOAD off    0x00001000 vaddr 0x10000000 paddr 0x10000000 align 2**12
          filesz 0x00000080 memsz 0x000000a0 flags rw-
  DYNAMIC off    0x00000168 vaddr 0x00400168 paddr 0x00400168 align 2**2
          filesz 0x000002c2 memsz 0x000002c2 flags rwx
     NOTE off    0x00000130 vaddr 0x00400130 paddr 0x00400130 align 2**4
          filesz 0x00000020 memsz 0x00000020 flags r--

Dynamic Section:
   NEEDED      libc.so.6
   INIT        0x400468
   FINI        0x4008e0
   HASH        0x400240
   STRTAB      0x40036c
   SYMTAB      0x40028c
   STRSZ       0xbe
   SYMENT      0x10
   0x70000016  0x10000020
   DEBUG       0x0
   PLTGOT      0x10000040
   0x70000001  0x1
   0x70000005  0x2
   0x70000006  0x400000
   0x7000000a  0x7
   0x70000011  0xe
   0x70000012  0x1e
   0x70000013  0x5
   VERNEED     0x400448
   VERNEEDNUM  0x1
   VERSYM      0x40042a

Version References:
   required from libc.so.6:
     0x0d696910 0x00 02 GLIBC_2.0

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
   0 .interp       0000000d  00400114  00400114  00000114  2**0
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   1 .note.ABI-tag 00000020  00400130  00400130  00000130  2**4
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   2 .dynamic      000000d8  00400168  00400168  00000168  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   3 .hash         0000004c  00400240  00400240  00000240  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   4 .dynsym       000000e0  0040028c  0040028c  0000028c  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   5 .dynstr       000000be  0040036c  0040036c  0000036c  2**0
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   6 .gnu.version  0000001c  0040042a  0040042a  0000042a  2**1
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   7 .gnu.version_r 00000020  00400448  00400448  00000448  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   8 .init         0000008c  00400468  00400468  00000468  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
   9 .text         000003e0  00400500  00400500  00000500  2**4
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
  10 .fini         0000004c  004008e0  004008e0  000008e0  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
  11 .rodata       00000020  00400930  00400930  00000930  2**4
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
  12 .data         00000020  10000000  10000000  00001000  2**4
                   CONTENTS, ALLOC, LOAD, DATA
  13 .rld_map      00000004  10000020  10000020  00001020  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  14 .eh_frame     00000004  10000024  10000024  00001024  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  15 .ctors        00000008  10000028  10000028  00001028  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  16 .dtors        00000008  10000030  10000030  00001030  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  17 .jcr          00000004  10000038  10000038  00001038  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  18 .got          00000040  10000040  10000040  00001040  2**4
                   CONTENTS, ALLOC, LOAD, DATA
  19 .sbss         00000000  10000080  10000080  00001080  2**0
                   ALLOC
  20 .bss          00000020  10000080  10000080  00001080  2**4
                   ALLOC
  21 .comment      0000006c  00000000  00000000  00001080  2**0
                   CONTENTS, READONLY
  22 .pdr          00000020  00000000  00000000  0000143c  2**2
                   CONTENTS, READONLY
  23 .mdebug.abi32 00000000  00000000  00000000  0000145c  2**0
                   CONTENTS, READONLY
SYMBOL TABLE:
00400114 l    d  .interp        00000000
00400130 l    d  .note.ABI-tag  00000000
00400150 l    d  *ABS*  00000000
00400168 l    d  .dynamic       00000000
00400240 l    d  .hash  00000000
0040028c l    d  .dynsym        00000000
0040036c l    d  .dynstr        00000000
0040042a l    d  .gnu.version   00000000
00400448 l    d  .gnu.version_r 00000000
00400468 l    d  .init  00000000
00400500 l    d  .text  00000000
004008e0 l    d  .fini  00000000
00400930 l    d  .rodata        00000000
10000000 l    d  .data  00000000
10000020 l    d  .rld_map       00000000
10000024 l    d  .eh_frame      00000000
10000028 l    d  .ctors 00000000
10000030 l    d  .dtors 00000000
10000038 l    d  .jcr   00000000
10000040 l    d  .got   00000000
10000080 l    d  .sbss  00000000
10000080 l    d  .bss   00000000
00000000 l    d  .comment       00000000
00000000 l    d  *ABS*  00000000
00000000 l    d  *ABS*  00000000
00000000 l    d  *ABS*  00000000
00000000 l    d  *ABS*  00000000
00000000 l    d  .pdr   00000000
00000000 l    d  .mdebug.abi32  00000000
00000000 l    d  *ABS*  00000000
00000000 l    d  *ABS*  00000000
00000000 l    d  *ABS*  00000000
00000000 l    df *ABS*  00000000              <command line>
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/config.h
00000000 l    df *ABS*  00000000              <command line>
00000000 l    df *ABS*  00000000              <built-in>
0040055c l       .text  00000000              hlt
00000000 l    df *ABS*  00000000              abi-note.S
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/csu/abi-tag.h
00000000 l    df *ABS*  00000000              abi-note.S
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/config.h
00000000 l    df *ABS*  00000000              abi-note.S
00000000 l    df *ABS*  00000000              <command line>
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/config.h
00000000 l    df *ABS*  00000000              <command line>
00000000 l    df *ABS*  00000000              <built-in>
00000000 l    df *ABS*  00000000              abi-note.S
00000000 l    df *ABS*  00000000              init.c
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/csu/crti.S
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/csu/defs.h
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/csu/crti.S
00000000 l    df *ABS*  00000000              <command line>
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/config.h
00000000 l    df *ABS*  00000000              <command line>
00000000 l    df *ABS*  00000000              <built-in>
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/csu/crti.S
00400580 l     F .text  00000000              call_gmon_start
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/gcc-3.2.3/gcc/crtstuff.c
10000028 l     O .ctors 00000000              __CTOR_LIST__
10000030 l     O .dtors 00000000              __DTOR_LIST__
10000024 l     O .eh_frame      00000000              __EH_FRAME_BEGIN__
10000038 l     O .jcr   00000000              __JCR_LIST__
10000014 l     O .data  00000000              p.0
10000080 l     O .bss   00000001              completed.1
004005d0 l     F .text  00000000              __do_global_dtors_aux
004006bc l     F .text  00000000              call___do_global_dtors_aux
10000084 l     O .bss   00000018              object.2
004006e8 l     F .text  00000000              frame_dummy
00400788 l     F .text  00000000              call_frame_dummy
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/gcc-3.2.3/gcc/crtstuff.c
1000002c l     O .ctors 00000000              __CTOR_END__
10000034 l     O .dtors 00000000              __DTOR_END__
10000024 l     O .eh_frame      00000000              __FRAME_END__
10000038 l     O .jcr   00000000              __JCR_END__
00400820 l     F .text  00000000              __do_global_ctors_aux
004008ac l     F .text  00000000              call___do_global_ctors_aux
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/csu/crtn.S
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/csu/defs.h
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/csu/crtn.S
00000000 l    df *ABS*  00000000              <command line>
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/config.h
00000000 l    df *ABS*  00000000              <command line>
00000000 l    df *ABS*  00000000              <built-in>
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.28-rc36/build/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/build-glibc/csu/crtn.S
00000000 l    df *ABS*  00000000              hello.c
10000010 l     O .data  00000000              .hidden __dso_handle
10000000 g       .data  00000000              _fdata
10008030 g    d  *ABS*  00000000              _gp_disp
00000001 g    d  *ABS*  00000000              _DYNAMIC_LINKING
00400168 g     O .dynamic       00000000              _DYNAMIC
00000000  w    F *UND*  00000000 
__register_frame_info@@GLIBC_2.0
10008030 g       *ABS*  00000000              _gp
00400468 g     F .init  00000000              _init
00000000  w    F *UND*  00000000 
__deregister_frame_info@@GLIBC_2.0
00400500 g     O .text  00000000              __start
00400500 g       .text  00000000              _ftext
10000020 g     O .rld_map       00000000              __RLD_MAP
10000080 g       *ABS*  00000000              __bss_start
004007c0 g     F .text  00000000              main
00000000       F *UND*  00000000              __libc_start_main@@GLIBC_2.0
10000000  w    O .data  00000000              data_start
00000000       F *UND*  00000000              printf@@GLIBC_2.0
004008e0 g     F .fini  00000000              _fini
10000080 g       *ABS*  00000000              _edata
10000040 g     O .got   00000000              _GLOBAL_OFFSET_TABLE_
100000a0 g       *ABS*  00000000              _end
00400930 g     O .rodata        00000004              _IO_stdin_used
10000000 g     O .data  00000000              __data_start
00000000  w      *UND*  00000000              _Jv_RegisterClasses
10000080 g       *ABS*  00000000              _fbss
00000000  w      *UND*  00000000              __gmon_start__


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list