[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

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

Post by Guest »

Dies ist eine mehrteilige Nachricht im MIME-Format.
--=_alternative 005E3120C125768D_=
Content-Type: text/plain; charset="utf-8"
content-transfer-encoding: quoted-printable

> 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=20
elf_i386 --hash-style=3Dgnu -dynamic-linker /lib/ld-linux.so.2 -o send_nsca=
=20
send_nsca.o utils.o netutils.o -lnsl -lgcc /usr/lib/crt1.o /usr/lib/crti.o=
=20
/usr/lib/gcc/i386-redhat-linux/4.1.2/crtbegin.o -L/usr/lib=20
-L/usr/lib/gcc/i386-redhat-linux/4.1.2 --as-needed -lgcc_s --no-as-needed=20
-lc -lgcc --as-needed -lgcc_s --no-as-needed=20
/usr/lib/gcc/i386-redhat-linux/4.1.2/crtend.o /usr/lib/crtn.o=20
/usr/lib/libmcrypt.a

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...

Thanks for the hint anyway.

Regards
Sascha



GFKL Financial Services AG
Vorstand: Dr. Peter J=C3=A4nsch (Vors.), J=C3=BCrgen Baltes, Dr. Tom Haverk=
amp
Vorsitzender des Aufsichtsrats: Dr. Georg F. Thoma
Sitz: Limbecker Platz 1, 45127 Essen, Amtsgericht Essen, HRB 13522
--=_alternative 005E3120C125768D_=
Content-Type: text/html; charset="utf-8"
content-transfer-encoding: quoted-printable

> 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=3Dgnu -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

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...

Thanks for the hint anyway.

Regards
        Sascha



GFKL Financial Services AG
Vorstand: Dr. Peter J=C3=A4nsch (Vors.), J=C3=BCrgen Baltes, Dr. Tom H=
averkamp
Vorsitzender des Aufsichtsrats: Dr. Georg F. Thoma
Sitz: Limbecker Platz 1, 45127 Essen, Amtsgericht Essen, HRB 13522
--=_alternative 005E3120C125768D_=--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked