Antwort: Re: Antwort: Re: [Nagios-users] Alternatives to NSCA?

Andreas Ericsson ae at op5.se
Wed Dec 16 09:20:12 CET 2009


On 12/15/2009 06:08 PM, Sascha.Runschke at gfkl.com wrote:
>> It's your ld-fu that's weak. Basically, you can treat an ar-archive
>> as an object file when liking them together. That way you can choose
>> which libraries to link statically and which to link dynamically.
> 
> You are correct. I strengthend my ld-fu (or rather my collect2-fu)
> and came up with:
> 
> /usr/libexec/gcc/i386-redhat-linux/4.1.2/collect2 --eh-frame-hdr -m
> elf_i386 --hash-style=gnu -dynamic-linker /lib/ld-linux.so.2 -o send_nsca
> send_nsca.o utils.o netutils.o -lnsl -lgcc /usr/lib/crt1.o /usr/lib/crti.o
> /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbegin.o -L/usr/lib
> -L/usr/lib/gcc/i386-redhat-linux/4.1.2 --as-needed -lgcc_s --no-as-needed
> -lc -lgcc --as-needed -lgcc_s --no-as-needed
> /usr/lib/gcc/i386-redhat-linux/4.1.2/crtend.o /usr/lib/crtn.o
> /usr/lib/libmcrypt.a
> 

Impressive, though I'd have preferred something like

  gcc send_nsca.o /usr/lib/libmcrypt.a -s -o send_nsca

> This gives me a dynamic linked send_nsca with static linked libmcrypt.
> Sadly I didn't check the size of libmcrypt.a and the stripped send_nsca
> is still 170kb - little bit too much for me.
> 
> Guess I have to keep looking for a solution...
> 

  strip send_nsca

and it should lose about 100K.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 




More information about the Developers mailing list