Bug 5219 - Lots of symbols dublicated between binaries
Lots of symbols dublicated between binaries
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: Build
unspecified
Other Linux
: P3 normal
: ---
Assigned To: Björn Jacke
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-21 19:17 UTC by Diego Pettenò
Modified: 2012-11-22 09:55 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Pettenò 2008-01-21 19:17:19 UTC
I've been trying a script of mine (which helps identifying possible symbol collisions between libraries and executables), and I've found samba duplicating lots of symbols, and thus of functions, between various binaries.

Example:

Symbol lp_passwd_chat_debug@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
  /usr/bin/ntlm_auth
  /usr/bin/smbtree
  /usr/bin/smbspool
  /usr/bin/smbget
  /usr/bin/rpcclient
  /usr/bin/smbcontrol
  /usr/lib64/samba/security/pam_smbpass.so
  /usr/lib64/samba/libmsrpc.so
  /usr/lib64/samba/libsmbclient.so
  /usr/bin/smbclient
  /lib64/security/pam_smbpass.so
  /usr/bin/eventlogadm
  /usr/bin/testparm
  /usr/bin/smbcquotas
  /usr/bin/smbpasswd
  /usr/bin/smbcacls
  /usr/bin/profiles
  /usr/bin/pdbedit
  /usr/bin/net
  /usr/bin/nmblookup
  /usr/bin/smbstatus
  /usr/bin/smbmount


Symbol lp_dos_charset@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_dos_filemode@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_dos_filetime_resolution@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_dos_filetimes@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_dump@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_dump_one@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_ea_support@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_enable_asu_support@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_enable_core_files@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_enable_privileges@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_encrypted_passwords@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_enhanced_browsing@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_enumports_cmd@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_eventlog_list@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_failed_convert_char@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_fake_dir_create_times@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_fake_oplocks@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_file_list_changed@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_force_create_mode@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_force_dir_mode@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_force_dir_security_mode@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_force_group@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_force_printername@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_force_security_mode@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_force_unknown_acl_user@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_force_user@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_fstype@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_get_quota_command@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_get_spoolss_state@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_guest_ok@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_guest_only@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_guestaccount@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_hide_dot_files@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_hide_files@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_hide_special_files@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_hideunreadable@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_hideunwriteable_files@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_host_msdfs@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_hostname_lookups@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_hostsallow@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_hostsdeny@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_idmap_alloc_backend@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_idmap_backend@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times
Symbol lp_idmap_cache_time@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 22 times

and a lot more.

As you an see in http://farragut.flameeyes.is-a-geek.org/articles/2008/01/21/what-to-do-with-shared-code , even just using --gc-sections option of the linker helps reducing the amount of code put into the final executables. If you could split this in a libsambacore, it would probably be a very nice improvement.
Comment 1 Björn Jacke 2011-03-16 10:20:21 UTC
this is a known issue since a long time, yes. Günther's work on the samba3 waf build might be a first step to achieve something like you propose here. Günther, if you think this isn't a mid-term goal, you might resolve this as LATER maybe?
Comment 2 Guenther Deschner 2011-05-17 12:37:22 UTC
Yeah, the waf build already in 3.6.0rc1 comes with a dramatically smaller installation size due to the use of many shared libraries. If time and resources permit, we will try to finish this work for 3.6.0 final or a 3.6.x release.
Comment 3 Björn Jacke 2012-11-22 09:55:03 UTC
in 4.0 this should be ready to use. If you see any more symbol bloat with the waf build in 4.0 please let us know. Even if you are more satified with that, please let us know :-)