Bug 14458 - hald and addons commands all share part of the source, exporting multiple symbols
Summary: hald and addons commands all share part of the source, exporting multiple sym...
Status: RESOLVED WONTFIX
Alias: None
Product: hal
Classification: Unclassified
Component: build (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-11 06:15 UTC by Diego Elio Pettenò
Modified: 2010-09-10 06:07 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Diego Elio Pettenò 2008-02-11 06:15:38 UTC
With a script of mine I've been analysing my system for duplicated exported symbols. Interestingly enough, the addons (and probe) commands installed by hal all seem to share part of the source code with hald itself.

Symbol logger_enable_syslog@@ (64-bit UNIX System V ABI AMD x86-64 architecture) present 19 times
  /usr/libexec/hald-probe-smbios
  /usr/libexec/hald-addon-cpufreq
  /usr/libexec/hald-probe-net-bluetooth
  /usr/libexec/hald-probe-pc-floppy
  /usr/libexec/hald-addon-acpi
  /usr/libexec/hald-probe-printer
  /usr/libexec/hald-probe-input
  /usr/libexec/hald-probe-volume
  /usr/libexec/hald-generate-fdi-cache
  /usr/libexec/hald-probe-storage
  /usr/libexec/hald-probe-hiddev
  /usr/libexec/hald-addon-storage
  /usr/libexec/hald-addon-input
  /usr/libexec/hald-addon-macbook-backlight
  /usr/libexec/hald-addon-hid-ups
  /usr/libexec/hald-probe-serial
  /usr/libexec/hald-addon-usb-csr
  /usr/libexec/hald-addon-macbookpro-backlight
  /usr/libexec/hald-probe-ieee1394-unit

[hald is not listed there because of a glitch in my script, it's ignoring /sbin and /usr/sbin as they are not in my user's path, but it has the same problem].

There are two problems here, the first is that the shared code might have been better to be moved inside a libhald or libhalcore or libhalwhatever and shared between the programs, the second is that the colliding symbols are suboptimal. I'm also doubtful that any of those programs need to export any symbol at all. It would be nice to use hidden visibility at least for the final executables so to hide all the symbols.

As a documentation on the issue I can refer to my blog at  http://farragut.flameeyes.is-a-geek.org/articles/2008/02/10/why-would-an-executable-export-symbols .

While I don't think the amount of time spent for bindings in hald and in the programs is much on its own, it adds up together with all the execution of the addons and probe commands. Plus being hald used at boot in many distribution, even a little saving there on all the daemons might make a difference. Especially since I can't see any drawback in all this.
Comment 1 Danny Kukawka 2010-09-10 06:07:24 UTC
This is only about the logging function in hal and the addons, no need to fix it especially since HAL is in maintenance mode. Close the bug for now as WONTFIX.

Feel free to provide a patch, maybe we will integrate it.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.