Date: Thu, 17 Oct 1996 07:59:08 -0600 (MDT) From: Nate Williams <nate@mt.sri.com> To: Keith Mitchell <kmitch@unix.guru.org> Cc: current@freebsd.org Subject: Re: Weirdness in current Message-ID: <199610171359.HAA17511@rocky.mt.sri.com> In-Reply-To: <199610170430.AAA01023@unix.guru.org> References: <no.id> <199610170430.AAA01023@unix.guru.org>
next in thread | previous in thread | raw e-mail | index | archive | help
>>> I have a C++ program I wrote, and it works fine as long as you don't try to >>> redirect the output. Doing so, causes it to core dump. Compiling the >>> same program on a 2.1.0R system works fine though. >> >> I have a little more insight on this one. It appears that the same libraries >> are not getting linked in on current as on stable (2.1.0 or 2.1.5). Note, gcc and libg++ have changed in -current vs. stable. >> For >> some reason the math library is getting linked in on stable even though >> I don't tell it to and my program doesn't use it directly. I don't know why. I just looked, and it's not being forced to... > Ok. Here's an update. I just did a make world from a 10-16 current. > The dynamic linking now appears to work correctly using the math library > by default. Are you saying the math library is brought in even if you don't explicitly ask for it? > Anyone know why this is even necessary? It still fails when > linking the program statically through the -Xlinker -Bstatic option. Note, there are known oustanding bugs (that will probably never get fixed with the current a.out toolchain) w/regards to different behavior in the linker when doing static/dynamic linking. I'm not sure if this is what you are seeing, but it does exist and is known about. The linker does *NOT* link the program the preference of the command line when mixing static/shared libraries, but instead 'preferes' shared libraries over their static counter-parts. Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610171359.HAA17511>