Re: [Nagios-devel] Antwort: Re: Antwort: Re: [Nagios-users]

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Antwort: Re: Antwort: Re: [Nagios-users]

Post by Guest »

On 12/15/2009 06:08 PM, [email protected] 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 [email protected]
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 post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked