Subject: Re: Crosscompile linking questions
To: None <Richard.Earnshaw@arm.com>
From: Anders =?iso-8859-1?Q?Nyg=E5rd?= <anders.nygard@netinsight.net>
List: port-arm32
Date: 07/04/2001 13:34:41
This is a multi-part message in MIME format.
--------------7C7584BF057223B5FE01B810
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
The following code:
int m(){
static char c[100000];
}
int main(int argc, char **argv){
m();
}
generates an executable size of 76104.
nm generates a list of 285 lines (enclosed).
Richard Earnshaw wrote:
>
> > When I compile and link a program for arm32 on i386 it seems to link in
> > all of libc into the executable. Is there a fix/workaround? Is this
> > known behaviour?
>
> Do you really mean the *whole* of libc, or just large chunks of it? How
> big are your executables? Are you linking with something like
> '--whole-archive' (or whatever)?
I have not verified if it is infact all of libc but a lot more than what
is called for.
--
&ers
Anders Nygård Net Insight AB
Box 42093, SE-126 14 STOCKHOLM, SWEDEN
Phone: +46-8-6850690 Visiting address: Västberga Allé 9
Fax: +46-8-6850420 http://www.netinsight.net
--------------7C7584BF057223B5FE01B810
Content-Type: text/plain; charset=us-ascii;
name="nm.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nm.txt"
00001c00 t /tmp/ccgyme4q.o
00001020 t /usr/local/arm-netbsd/lib/crt0.o
00001cf4 t L10
00001cdc t L12
00001cc4 t L15
00001ce4 t L21
00001d00 t L25
00001d34 t L29
00001c64 t L4
00001c8c t L6
0000f76c T __C_ctype_
000111a8 D __CurrentMonetaryLocale
000111a4 D __CurrentNumericLocale
00000000 A __DYNAMIC
000104a0 T __DefaultMonetaryLocale
00010480 T __DefaultNumericLocale
0002a188 B ___CTOR_LIST__
0002a180 B ___DTOR_LIST__
0000d788 T ___adddf3
0000bef8 T ___addsf3
0002a190 B ___atexit
00003ac0 T ___bswap32
0002a1a0 B ___cleanup
00001bcc T ___crt0_swap
0000dd94 T ___divdf3
0000c120 T ___divsf3
00003590 T ___divsi3
00001c90 T ___do_global_ctors
00001c40 T ___do_global_dtors
000083fc T ___dtoa
00009920 T ___eqdf2
00009910 T ___eqsf2
00003ae0 T ___errno
0000b57c T ___extendsfdf2
00003b68 T ___findenv
0000b804 T ___fixdfsi
0000b4b0 T ___fixsfsi
0000f574 T ___fixunsdfsi
0000f65c T ___fixunssfsi
0000b2a4 T ___floatsidf
0000b264 T ___floatsisf
0000f710 T ___flt_rounds
00003ca0 T ___fstat13
00009988 T ___gedf2
00009970 T ___gesf2
00001c40 t ___gnu_compiled_c
00001d40 t ___gnu_compiled_c
00001c00 t ___gnu_compiled_c
00009960 T ___gtdf2
00009950 T ___gtsf2
0000f880 T ___infinity
000099d8 T ___ledf2
000099c8 T ___lesf2
000099b4 T ___ltdf2
000099a0 T ___ltsf2
00001d08 T ___main
00011050 D ___mlocale_changed
00003530 T ___modsi3
0000d7f0 T ___muldf3
0000bf48 T ___mulsf3
00009940 T ___nedf2
000099e8 T ___negdf2
000099e8 T ___negsf2
00009930 T ___nesf2
00011054 D ___nlocale_changed
00011000 D ___progname
00011004 D ___ps_strings
0000fcbc T ___qdivrem
00011020 D ___realloc_srchlen
0001108c D ___sF
0001076c T ___sclose
0002a1c0 B ___sdidinit
0000a44c T ___sflush
0000fb10 T ___sfp
00009bc0 T ___sfvwrite
00011194 D ___sglue
00006160 T ___sigaction14
0002a1b0 B ___sigintr
00003990 T ___sigprocmask14
0000fc44 T ___sinit
0000f8d0 T ___smakebuf
0001063c T ___sread
00010704 T ___sseek
00001080 T ___start
00001f6c T ___strerror
0000d7bc T ___subdf3
0000bf20 T ___subsf3
0000f9b0 T ___swhatbuf
00010694 T ___swrite
00009a98 T ___swsetup
00011030 D ___sys_errlist14
00002ec8 T ___sys_nerr14
00006200 T ___syscall
0000a500 T ___sysctl
0000b940 T ___truncdfsf2
0000a25c T ___udivdi3
00003550 T ___udivsi3
0000a06c T ___umoddi3
00003520 T ___umodsi3
000111b0 B __bss_start
00003420 T __catclose
00002f60 T __catgets
00003104 T __catopen
0000fc28 T __cleanup
00011070 D __ctype_
000111b0 D __edata
0002a1c4 B __end
00002510 t __errlist14.o
00010c10 T __etext
00002500 T __exit
00011018 D __exit_dummy_decl
00011014 D __exit_dummy_ref
00003ca0 t __fstat13.o
00010508 T __fwalk
00001c40 t __main.o
00005a80 T __memcpy
00006160 t __sigaction14.o
00003990 t __sigprocmask14.o
00001f10 t __strerror.o
00006200 t __syscall.o
0000a500 t __sysctl.o
0000244c T _abort
00001ddc T _atexit
000111e0 b _c.2
00003d50 T _close
000104a0 t _def_monetary.o
00010480 t _def_numeric.o
00001b54 T _dladdr
00001a34 T _dlclose
00001aa4 T _dlctl
00001af0 T _dlerror
000019fc T _dlopen
00001a6c T _dlsym
000111b0 D _edata
0002a1c4 B _end
0002a170 B _environ
0002a174 B _errno
00003ae0 t _errno.o
00010c10 T _etext
00001e98 T _exit
00001d40 t _exit.o
00002500 t _exit.o
0000fbd4 T _f_prealloc
0000a3fc T _fflush
0000c858 T _float32_eq
0000ca6c T _float32_eq_signaling
0000a534 T _float32_is_signaling_nan
0000c8f8 T _float32_le
0000caec T _float32_le_quiet
0000c9b4 T _float32_lt
0000cbc8 T _float32_lt_quiet
0000c350 T _float32_rem
0000b9c8 T _float32_round_to_int
0000c67c T _float32_sqrt
0000b37c T _float32_to_int32
0000ef40 T _float64_eq
0000f24c T _float64_eq_signaling
0000a578 T _float64_is_signaling_nan
0000f004 T _float64_le
0000f2f4 T _float64_le_quiet
0000f130 T _float64_lt
0000f43c T _float64_lt_quiet
0000e450 T _float64_rem
0000cca4 T _float64_round_to_int
0000eb48 T _float64_sqrt
0000b640 T _float64_to_int32
00011062 D _float_detect_tininess
00011060 D _float_exception_flags
0000a510 T _float_raise
00011061 D _float_rounding_mode
00010580 T _fpgetround
0000222c T _free
00003b4c T _getenv
000038dc T _getpagesize
00003980 T _getpid
00010bf0 T _getrlimit
00003ac0 T _htonl
00029880 b _initialized.7
00010c00 T _ioctl
000105dc T _isatty
000098c4 T _isinf
00009860 T _isnan
00003a90 T _kill
0000a2c0 T _localeconv
00010bb8 T _lseek
00001c00 T _m
00001c10 T _main
0000206c T _malloc
0000a0e0 T _mblen
0000a174 T _mbstowcs
0000a118 T _mbtowc
00009ff8 T _memchr
0000f870 T _memcpy
00005a80 t _memcpy.o
00003890 T _memmove
00003cec T _mmap
00003d40 T _munmap
00003ac0 T _ntohl
00003b00 T _open
00011010 d _p.2
00005a5c T _raise
00010b70 T _read
00002270 T _realloc
00003950 T _sbrk
000039dc T _signal
000034ac T _snprintf
00003c68 T _strchr
00001d80 T _strerror
00009a28 T _strlen
000061a8 T _strncmp
00002f08 T _strncpy
00007078 T _strtod
000107cc T _sysconf
00005fa4 T _sysctl
00010b3c T _tcgetattr
00003f18 T _vfprintf
0000a1c0 T _wcstombs
0000a158 T _wctomb
00010b60 T _write
00002410 t abort.o
00001da0 t atexit.o
00003ac0 t byte_swap_4.o
00003420 t catclose.o
00002f60 t catgets.o
000030c0 t catopen.o
00003aa0 T cerror
00003aa0 t cerror.o
00003d50 t close.o
0000f730 t ctype_.o
00011040 D curbrk
00003520 t divsi3.o
00001e60 t exit.o
0000a3c0 t fflush.o
0000fa60 t findfp.o
0000f700 t flt_rounds.o
00010580 t fpgetround.o
00009910 t fplib_glue.o
00009b80 t fvwrite.o
000104d0 t fwalk.o
00001d40 t gcc2_compiled.
00001c40 t gcc2_compiled.
00001c00 t gcc2_compiled.
00003b10 t getenv.o
000038a0 t getpagesize.o
00003980 t getpid.o
00010bf0 t getrlimit.o
0000f880 t infinity.o
00010c00 t ioctl.o
000105a0 t isatty.o
00009860 t isinf.o
00003a90 t kill.o
0000a280 t localeconv.o
00010b80 t lseek.o
0000f890 t makebuf.o
00002030 t malloc.o
00009fc0 t memchr.o
0000f870 t memcpy.o
00003890 t memmove.o
00003cb0 t mmap.o
0000a0a0 t multibyte.o
00003d40 t munmap.o
00003b00 t open.o
0000fc80 t qdivrem.o
00005a20 t raise.o
00010b70 t read.o
00003950 t sbrk.o
000039a0 t signal.o
00003470 t snprintf.o
0000a510 t softfloat.o
00001020 T start
00010600 t stdio.o
00003c30 t strchr.o
00001d40 t strerror.o
000099f0 t strlen.o
00006170 t strncmp.o
00002ed0 t strncpy.o
00006210 t strtod.o
00010790 t sysconf.o
00005f10 t sysctl.o
00010b00 t tcgetattr.o
0000a220 t udivdi3.o
0000a030 t umoddi3.o
00003d60 t vfprintf.o
00010b60 t write.o
00009a60 t wsetup.o
--------------7C7584BF057223B5FE01B810--