On 2/1/10 5:51 PM, Mark Hatle wrote:
Daniel Jacobowitz wrote:On Mon, Feb 01, 2010 at 01:53:37AM +0300, Maxim Kuvyrkov wrote:Joseph, Would you please review the following patch which make EGLIBC's run-time linker 8-10% smaller. The following patch adds a new option group to EGLIBC -- OPTION_EGLIBC_RTLD_DEBUG. This group makes debug print-outs of the run-time linker optional. These are the print-outs triggered by LD_DEBUG and TRACE_PRELINKING environment variables. Removing the associated code makes the run-time linker smaller.I believe that disabling LD_TRACE_PRELINKING will break the prelinker. Are those a big portion of the space savings? If not, may want to leave them alone.
Removing the prelinking output is a substantial part of the space savings. More importantly, not removing the prelinking debug output would complicate the patch. The current design of the patch allows all-or-nothing choice with the debugging code; making a special case for one of the debug options would increase the merging/maintenance costs and that would make the patch not worth the effort.
Along the same lines, it's worth checking whether ldd still works.
Good note. Ldd does still work, but with the exception of the `--unused' option -- I'll add a note to the option group description.
When using the cross prelinker (cross rtld) patches, I don't think this will cause a problem. So it still looks beneficial to me. But I do believe it needs to be clearly listed (where ever appropriate) that this will likely break both prelinking on the target and ldd.
I agree; how does the following look to you: This option group enables debug output of the runtime linker which is activated via LD_DEBUG and LD_TRACE_PRELINKING environment variables. Disabling this option group yields a smaller runtime linker binary. BEWARE: Disabling this option group is likely to break the `ldd' utility and prelinking support. In particular, the `--unused' ldd option will not work correctly. Thank you, -- Maxim Kuvyrkov CodeSourcery maxim@xxxxxxxxxxxxxxxx (650) 331-3385 x724