Date: Sat, 11 Mar 1995 14:02:07 +1000 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, davidg@Root.COM Cc: freebsd-current@FreeBSD.org Subject: Re: HEADS UP - About removing libgcc.so.261 Message-ID: <199503110402.OAA18280@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>>I'm still concerned about the static libgcc unnecessarily bloating all
>>executables by 4K, partly because the of linkage order bugs.
> It doesn't bloat anything I tried by 4k...very little if anything seems to
>be included from it.
Here is annotated output from `nm -n' for `main() {}'.
Bruce
00001020 F /usr/lib/crt0.o # start of crt0
00001038 T start # this is about 3 times larger than I like
00001424 T _dlopen # linux's crt0 is leaner
00001448 T _dlclose
0000146c T _dlsym
000014a4 T _dlerror
00001590 # end of crt0 (0x570 bytes)
00001590 F /var/tmp/cc0030111.o # useless temporary file name
00001590 t ___gnu_compiled_c # start of main program
00001590 T _main
00001590 t gcc2_compiled.
000015a0 # end of main program (0x10 bytes)
000015a0 T ___do_global_dtors # start of necessary new bloat
000015a0 F __main.o # (but this should be in libc)
000015c8 T ___do_global_ctors
00001620 T ___main
00001640 # end of necessary new bloat (0xa0 bytes)
00001640 # start of unnecessary new bloat
# these routines are linked because they
# are referenced by functions in libc.a,
# although the functions are not actually
# called for our simple program, and
# most of them are not actually called
# for most programs
00001640 T ___fixsfdi # the version in libc.a should be used
00001640 F _exit.o # empty
00001640 F _fixsfdi.o
00001680 F _fixunssfdi.o
0000169c T ___fixunssfdi # the version in libc.a should be used
000017b0 T ___fixdfdi # ditto
000017b0 F _fixdfdi.o
000017f0 F _fixunsdfdi.o
0000180c T ___fixunsdfdi # ditto
00001920 F _fixunsdfsi.o
00001930 T ___fixunsdfsi # ditto
00001990 F _floatdisf.o
00001998 T ___floatdisf # ditto
00001a10 F _floatdidf.o
00001a18 T ___floatdidf # ditto
00001a70 T ___ucmpdi2 # ditto
00001a70 F _ucmpdi2.o
00001ab0 T ___ashrdi3 # ditto
00001ab0 F _ashrdi3.o
00001b10 T ___ashldi3 # ditto
00001b10 F _ashldi3.o
00001b60 T ___lshldi3 # ditto
00001b60 F _lshldi3.o
00001bb0 T ___lshrdi3 # ditto
00001bb0 F _lshrdi3.o
00001c10 T ___negdi2 # ditto
00001c10 F _negdi2.o
00001c40 T ___umoddi3 # ditto
00001c40 F _umoddi3.o
00001c70 T ___udivdi3 # ditto
00001c70 F _udivdi3.o
00001c90 T ___moddi3 # ditto
00001c90 F _moddi3.o
00001d50 T ___divdi3 # ditto
00001d50 F _divdi3.o
00001e00 T ___muldi3 # ditto
00001e00 F _muldi3.o
00001e50 T ___fixdfsi # ditto
00001e50 F _fixdfsi.o
00001e80 T ___divsi3 # ditto
00001e80 F _divsi3.o
00001e90 T ___udivsi3 # ditto
00001e90 F _udivsi3.o
00001ea0 T ___cmpdi2 # ditto
00001ea0 F _cmpdi2.o
00001ee0 F _udivmoddi4.o
00001fe0 T ___udivmoddi4 # missing from libc.a. libc.a has a
# similar or equivalent routine named
# ___qdivrem.
00001ee0 + 0x2c0 = 0x21a0 # end of unnecessary new bloat (0xb60 bytes)
# dynamic linkage info
00002844 T _etext # end of dynamic linkage info (0x6a4 bytes
# including 0x334 bytes of unnecessary bloat
# for the about unnecessary symbols)
00003000 d __DYNAMIC
000030a0 D ___progname
000030ac D __exit_dummy_ref
000030bc D __exit_dummy_decl
000030cc D _edata
000030d4 B ___DTOR_LIST__
000030dc B ___CTOR_LIST__
000030e4 B _environ
000030e8 B _errno
000030ec B _end
# Total necessary new bloat = 0xa0 bytes
# Total unnecessary new bloat = 0xb60 + 0x334 = 0xe94 bytes
# Total new bloat = 0xf74 bytes = about 4K.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503110402.OAA18280>
