|
Message-ID: <CAK1hOcPcchkdKyyqNG6o8dhaP_8La7q1LP2rvaxVO8oL81=RuQ@mail.gmail.com> Date: Wed, 28 Oct 2015 11:05:56 +0100 From: Denys Vlasenko <vda.linux@...glemail.com> To: musl <musl@...ts.openwall.com>, Rich Felker <dalias@...c.org> Subject: Re: [PATCH] configure: add gcc flags for better link-time optimization On Wed, Oct 28, 2015 at 10:53 AM, Denys Vlasenko <vda.linux@...glemail.com> wrote: >> Did you see any symbols disappear when adding --gc-sections? > > Yes, I do. > > $ nm --size-sort busybox_unstripped >busybox_unstripped.nm > $ nm --size-sort busybox_unstripped--gc-sections >>busybox_unstripped--gc-sections.nm > $ diff -u busybox_unstripped.nm busybox_unstripped--gc-sections.nm | > grep '^[^ @]' > > --- busybox_unstripped.nm 2015-10-28 10:48:16.362304813 +0100 > +++ busybox_unstripped--gc-sections.nm 2015-10-28 10:48:26.056294599 +0100 > -0000000000000001 t reinit_unicode_for_ash > -0000000000000001 t reinit_unicode_for_hush > -0000000000000007 T xmalloc_sockaddr2host > -0000000000000008 b cur.1926 > -0000000000000008 b dummy > -0000000000000008 b dummy_file > -0000000000000008 b end.1927 > -0000000000000008 b lock.1928 > -0000000000000008 T xstrtoi_range > -0000000000000008 T xstrtoll_range > -000000000000000a T bb_internal_getpwnam_r > -000000000000000a T ipneigh_main > -000000000000000c T xsocket_stream > -000000000000000e T xgid2group > -0000000000000010 T selinux_or_die > -0000000000000011 T xatoi_range_sfx > -0000000000000011 T xatou_range_sfx > -0000000000000012 T xstrtoi > -0000000000000013 T xatoll_range_sfx > -0000000000000015 T replace > -0000000000000017 T xatoi_sfx > -0000000000000017 T xspawn > -0000000000000018 T replace_underscores > -000000000000001a T bb_iswspace > -000000000000001b T bb_internal_setpwent > -000000000000001b T xgetgrgid > -000000000000001c T llist_rev > -000000000000001c T xstrtoll > -000000000000001d T xread_char > -000000000000001e T monotonic_ns > -0000000000000021 T xatoll_sfx > -0000000000000021 T xmalloc_fgetline_str > -0000000000000022 T bb_iswpunct > -0000000000000023 T bb_iswalnum > -000000000000002f T bb_internal_endpwent > -000000000000002f T isrv_want_wr > -0000000000000033 T bb_delete_module > -000000000000003c T index_in_str_array > -000000000000003e T rewind > -0000000000000043 T is_suffixed_with > -000000000000004b T moderror > -0000000000000054 T executable_exists > -000000000000005a T rta_addattr_l > -0000000000000062 T string_to_llist > -0000000000000088 T bb_init_module > -00000000000000ae T bb_herror_msg > -00000000000000c3 T parse_cmdline_module_options > -000000000000010d T __simple_malloc This was with Rob's preconpiled system-image-x86_64. Now with musl built with -ffunction-sections -fdata-sections: --- busybox_unstripped.nm 2015-10-28 11:02:13.047555187 +0100 +++ busybox_unstripped--gc-sections.nm 2015-10-28 11:02:04.290531243 +0100 -0000000000000001 T __cxa_finalize -0000000000000001 t dummy -0000000000000001 t dummy -0000000000000001 t dummy -0000000000000001 t dummy -0000000000000001 t reinit_unicode_for_ash -0000000000000001 t reinit_unicode_for_hush -0000000000000003 t dummy -0000000000000004 T ether_line -0000000000000004 T ether_ntohost -0000000000000005 T fseek -0000000000000005 T ftell -0000000000000005 T __isalnum_l -0000000000000005 W isalnum_l -0000000000000005 T __iswalnum_l -0000000000000005 W iswalnum_l -0000000000000005 T __iswalpha_l -0000000000000005 W iswalpha_l -0000000000000005 T __iswblank_l -0000000000000005 W iswblank_l -0000000000000005 T __iswcntrl_l -0000000000000005 W iswcntrl_l -0000000000000005 T __iswctype_l -0000000000000005 W iswctype_l -0000000000000005 T __iswgraph_l -0000000000000005 W iswgraph_l -0000000000000005 T __iswlower_l -0000000000000005 W iswlower_l -0000000000000005 T __iswprint_l -0000000000000005 W iswprint_l -0000000000000005 T __iswpunct_l -0000000000000005 W iswpunct_l -0000000000000005 T __iswspace_l -0000000000000005 W iswspace_l -0000000000000005 T __iswupper_l -0000000000000005 W iswupper_l -0000000000000005 T __iswxdigit_l -0000000000000005 W iswxdigit_l -0000000000000005 T strtoimax -0000000000000005 W __strtoimax_internal -0000000000000005 T strtoumax -0000000000000005 W __strtoumax_internal -0000000000000005 T __toread_needs_stdio_exit -0000000000000005 T __towlower_l -0000000000000005 W towlower_l -0000000000000005 T __towrite_needs_stdio_exit -0000000000000005 T __towupper_l -0000000000000005 W towupper_l -0000000000000005 T __wctype_l -0000000000000005 W wctype_l -0000000000000006 b a.2175 -0000000000000007 T xmalloc_sockaddr2host -0000000000000008 b cur.1926 -0000000000000008 b dummy -0000000000000008 b dummy_file -0000000000000008 b end.1927 -0000000000000008 b lock.1928 -0000000000000008 D __stderr_used -0000000000000008 T xstrtoi_range -0000000000000008 T xstrtoll_range -000000000000000a T bb_internal_getpwnam_r -000000000000000a T ether_aton -000000000000000a T ipneigh_main -000000000000000a T strtold -000000000000000a W __strtold_l -000000000000000a W strtold_l -000000000000000c T xsocket_stream -000000000000000e T posix_openpt -000000000000000e T xgid2group -0000000000000010 T selinux_or_die -0000000000000011 T __tolower_l -0000000000000011 W tolower_l -0000000000000011 T xatoi_range_sfx -0000000000000011 T xatou_range_sfx -0000000000000012 T __isblank_l -0000000000000012 W isblank_l -0000000000000012 T xstrtoi -0000000000000013 T xatoll_range_sfx -0000000000000015 T replace -0000000000000017 T umount -0000000000000017 T xatoi_sfx -0000000000000017 T xspawn -0000000000000018 T replace_underscores -000000000000001a T bb_iswspace -000000000000001b T bb_internal_setpwent -000000000000001b T xgetgrgid -000000000000001c T llist_rev -000000000000001c T xstrtoll -000000000000001d T xread_char -000000000000001e T monotonic_ns -0000000000000021 T xatoll_sfx -0000000000000021 T xmalloc_fgetline_str -0000000000000022 T bb_iswpunct -0000000000000022 T endusershell -0000000000000022 T strtof -0000000000000022 W __strtof_l -0000000000000022 W strtof_l -0000000000000023 T bb_iswalnum -000000000000002f T bb_internal_endpwent -000000000000002f T __do_orphaned_stdio_locks -000000000000002f T isrv_want_wr -0000000000000033 T bb_delete_module -0000000000000034 T fstatvfs -0000000000000034 W fstatvfs64 -0000000000000034 T statvfs -0000000000000034 W statvfs64 -0000000000000035 T setlogmask -000000000000003c T index_in_str_array -000000000000003e T rewind -0000000000000043 T is_suffixed_with -000000000000004b T moderror -000000000000004f W fstatfs -000000000000004f T __fstatfs -000000000000004f W fstatfs64 -0000000000000054 T addmntent -0000000000000054 T executable_exists -000000000000005a T rta_addattr_l -000000000000005b T __timedwait -0000000000000062 T string_to_llist -0000000000000070 T __strcasecmp_l -0000000000000070 W strcasecmp_l -0000000000000088 T bb_init_module -000000000000008b T __strncasecmp_l -000000000000008b W strncasecmp_l -000000000000009c t fixup -00000000000000ae T bb_herror_msg -00000000000000c3 T parse_cmdline_module_options -000000000000010c T __simple_malloc Because now objects live in separate sections each, ld can drop more of them.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.