crosstool bloat

David Karlton dkarlton@themediamall.com
Mon Sep 19 20:37:00 GMT 2005



Dave Korn wrote:
> ----Original Message----
> 
>>From: David Karlton
>>Sent: 19 September 2005 18:41
> 
> 
>>BINUTILS_DIR=binutils-2.16.1
>>
>>4) Ran 'sh ./demo-mipsel.sh'
>>
>>
>>It ran for about an hour, then I got:
> 
> 
> /home/dkarlton/crosstool-0.38/build/mipsel-unknown-linux-gnu/gcc-3.3.4-glibc
> -2.3.2/gcc-3.3.4/gcc/libgcc2.c
> 
>>-fexceptions -fnon-call-exceptions -o libgcc/./_divdi3.o
>>/tmp/ccsFB15B.s: Assembler messages:
>>/tmp/ccsFB15B.s:956: Error: operation combines symbols in different
>>segments make[2]: *** [libgcc/./_divdi3.o] Error 1
> 
> 
>   Known bug in 3.3 series vs MIPS.  You either need a more recent gcc or to
> backport the fix at
> 
> http://gcc.gnu.org/ml/gcc-patches/2004-06/msg01187.html
> 
> (Found from 
> 
> http://www.google.co.uk/search?q=%22operation+combines+symbols+in+different+
> segments%22+mipsel&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8
> &client=firefox-a&rls=org.mozilla:en-GB:official
> 
> then following the thread starting at 
> 
> http://sources.redhat.com/ml/binutils/2005-02/msg00644.html
> 
> and considering the possible gas-patch at 
> 
> http://sources.redhat.com/ml/binutils/2005-02/msg00648.html
> 
> but it seems better to fix gcc by following Richard Sandiford's advice at
> 
> http://sources.redhat.com/ml/binutils/2005-02/msg00702.html
> 
> which points to the thread at 
> 
> http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00970.html
> 
> which eventually ends up there.  Phew!)
> 
> 
> 
>     cheers,
>       DaveK


I was able to build, but alas, anything I compile is still 70k...

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

dkarlton@fox:~/test> ll hello.3.3.4
-rwxr-xr-x  1 dkarlton users 70871 2005-09-19 16:33 hello.3.3.4
dkarlton@fox:~/test> objdump -x hello.3.3.4

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

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    0x00000144 vaddr 0x00400144 paddr 0x00400144 align 2**2
          filesz 0x00000018 memsz 0x00000018 flags r--
     LOAD off    0x00000000 vaddr 0x00400000 paddr 0x00400000 align 2**16
          filesz 0x00000ac4 memsz 0x00000ac4 flags r-x
     LOAD off    0x00010000 vaddr 0x10000000 paddr 0x10000000 align 2**16
          filesz 0x000000a0 memsz 0x000000b0 flags rw-
  DYNAMIC off    0x0000015c vaddr 0x0040015c paddr 0x0040015c align 2**2
          filesz 0x000003a6 memsz 0x000003a6 flags rwx
     NOTE off    0x00000124 vaddr 0x00400124 paddr 0x00400124 align 2**2
          filesz 0x00000020 memsz 0x00000020 flags r--

Dynamic Section:
   NEEDED      libgcc_s.so.1
   NEEDED      libc.so.6
   INIT        0x400548
   FINI        0x400a40
   HASH        0x400254
   STRTAB      0x400408
   SYMTAB      0x4002e8
   STRSZ       0xfa
   SYMENT      0x10
   0x70000016  0x10000040
   DEBUG       0x0
   PLTGOT      0x10000050
   REL         0x0
   RELSZ       0x0
   RELENT      0x8
   0x70000001  0x1
   0x70000005  0x2
   0x70000006  0x400000
   0x7000000a  0x7
   0x70000011  0x12
   0x70000012  0x1f
   0x70000013  0x5
   VERNEED     0x400528
   VERNEEDNUM  0x1
   VERSYM      0x400502

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  00400124  00400124  00000124  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   2 .dynamic      000000f8  0040015c  0040015c  0000015c  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   3 .hash         00000094  00400254  00400254  00000254  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   4 .dynsym       00000120  004002e8  004002e8  000002e8  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   5 .dynstr       000000fa  00400408  00400408  00000408  2**0
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   6 .gnu.version  00000024  00400502  00400502  00000502  2**1
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   7 .gnu.version_r 00000020  00400528  00400528  00000528  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   8 .init         000000ac  00400548  00400548  00000548  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
   9 .text         00000410  00400600  00400600  00000600  2**4
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
  10 .MIPS.stubs   00000030  00400a10  00400a10  00000a10  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
  11 .fini         0000005c  00400a40  00400a40  00000a40  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, CODE
  12 .rodata       00000020  00400aa0  00400aa0  00000aa0  2**4
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
  13 .eh_frame     00000004  00400ac0  00400ac0  00000ac0  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
  14 .ctors        00000008  10000000  10000000  00010000  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  15 .dtors        00000008  10000008  10000008  00010008  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  16 .jcr          00000004  10000010  10000010  00010010  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  17 .data         00000020  10000020  10000020  00010020  2**4
                   CONTENTS, ALLOC, LOAD, DATA
  18 .rld_map      00000004  10000040  10000040  00010040  2**2
                   CONTENTS, ALLOC, LOAD, DATA
  19 .got          00000050  10000050  10000050  00010050  2**4
                   CONTENTS, ALLOC, LOAD, DATA
  20 .sbss         00000000  100000a0  100000a0  000100a0  2**0
                   ALLOC
  21 .bss          00000010  100000a0  100000a0  000100a0  2**4
                   ALLOC
  22 .comment      0000007e  00000000  00000000  000100a0  2**0
                   CONTENTS, READONLY
  23 .pdr          00000060  00000000  00000000  0001049c  2**2
                   CONTENTS, READONLY
  24 .mdebug.abi32 00000000  00000000  00000000  000104fc  2**0
                   CONTENTS, READONLY
SYMBOL TABLE:
00400114 l    d  .interp        00000000
00400124 l    d  .note.ABI-tag  00000000
00400144 l    d  *ABS*  00000000
0040015c l    d  .dynamic       00000000
00400254 l    d  .hash  00000000
004002e8 l    d  .dynsym        00000000
00400408 l    d  .dynstr        00000000
00400502 l    d  .gnu.version   00000000
00400528 l    d  .gnu.version_r 00000000
00400548 l    d  .init  00000000
00400600 l    d  .text  00000000
00400a10 l    d  .MIPS.stubs    00000000
00400a40 l    d  .fini  00000000
00400aa0 l    d  .rodata        00000000
00400ac0 l    d  .eh_frame      00000000
10000000 l    d  .ctors 00000000
10000008 l    d  .dtors 00000000
10000010 l    d  .jcr   00000000
10000020 l    d  .data  00000000
10000040 l    d  .rld_map       00000000
10000050 l    d  .got   00000000
100000a0 l    d  .sbss  00000000
100000a0 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              abi-note.S
00000000 l    df *ABS*  00000000              ../sysdeps/mips/elf/start.S
00400658 l       .text  00000000              hlt
00000000 l    df *ABS*  00000000              init.c
00000000 l    df *ABS*  00000000              ../sysdeps/generic/initfini.c
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.38/build/mipsel-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/build-glibc/csu/crti.S
00400660 l     F .text  00000000              call_gmon_start
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.38/build/mipsel-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/gcc-3.3.4/gcc/crtstuff.c
10000000 l     O .ctors 00000000              __CTOR_LIST__
10000008 l     O .dtors 00000000              __DTOR_LIST__
10000010 l     O .jcr   00000000              __JCR_LIST__
10000034 l     O .data  00000000              p.0
100000a0 l     O .bss   00000001              completed.1
004006b0 l     F .text  00000000              __do_global_dtors_aux
00400770 l     F .text  00000000              frame_dummy
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.38/build/mipsel-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/gcc-3.3.4/gcc/crtstuff.c
10000004 l     O .ctors 00000000              __CTOR_END__
1000000c l     O .dtors 00000000              __DTOR_END__
00400ac0 l     O .eh_frame      00000000              __FRAME_END__
10000010 l     O .jcr   00000000              __JCR_END__
00400980 l     F .text  00000000              __do_global_ctors_aux
00000000 l    df *ABS*  00000000              ../sysdeps/generic/initfini.c
00000000 l    df *ABS*  00000000 
/home/dkarlton/crosstool-0.38/build/mipsel-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/build-glibc/csu/crtn.S
00000000 l    df *ABS*  00000000              hello.c
00000000 l    df *ABS*  00000000              elf-init.c
10000020 g       .data  00000000              _fdata
10008040 g    d  *ABS*  00000000              _gp_disp
00000001 g    d  *ABS*  00000000              _DYNAMIC_LINKING
0040015c g     O .dynamic       00000000              _DYNAMIC
10008040 g       *ABS*  00000000              _gp
10000000 g       *ABS*  00000000              __fini_array_end
10000030 g     O .data  00000000              .hidden __dso_handle
004008e0 g     F .text  000000a0              __libc_csu_fini
00400548 g     F .init  00000000              _init
00400600 g     F .text  00000000              __start
00400600 g       .text  00000000              _ftext
10000040 g     O .rld_map       00000000              __RLD_MAP
10000000 g       *ABS*  00000000              __fini_array_start
00400840 g     F .text  000000a0              __libc_csu_init
100000a0 g       *ABS*  00000000              __bss_start
004007e0 g     F .text  0000005c              main
00400a10       F *UND*  000001d4              __libc_start_main@@GLIBC_2.0
10000000 g       *ABS*  00000000              __init_array_end
10000020  w    O .data  00000000              data_start
00400a20       F *UND*  00000060              printf@@GLIBC_2.0
00400a40 g     F .fini  00000000              _fini
100000a0 g       *ABS*  00000000              _edata
10000050 g     O .got   00000000              _GLOBAL_OFFSET_TABLE_
100000b0 g       *ABS*  00000000              _end
10000000 g       *ABS*  00000000              __init_array_start
00400aa0 g     O .rodata        00000004              _IO_stdin_used
10000020 g     O .data  00000000              __data_start
00000000  w      *UND*  00000000              _Jv_RegisterClasses
100000a0 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