Date: Thu, 14 Oct 1999 14:06:40 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: marcel@scc.nl Cc: current@freebsd.org Subject: Re: World breakage in libc_r? Message-ID: <199910142106.OAA07367@vashon.polstra.com> In-Reply-To: <3805AD86.B6D2608E@scc.nl> References: <XFMail.991013143629.jdp@polstra.com> <Pine.BSF.4.10.9910140907140.306-100000@salmon.nlsystems.com> <3805AD86.B6D2608E@scc.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <3805AD86.B6D2608E@scc.nl>, Marcel Moolenaar <marcel@scc.nl> wrote: > Doug Rabson wrote: > > On Wed, 13 Oct 1999, John Polstra wrote: > > > > > and the fix is to add sigpending.o and sigsuspend.o to the > > > definition of HIDDEN_SYSCALLS in "src/lib/libc_r/Makefile". > > > > > > > I'm pretty sure that this is the right fix. My guess as to why it didn't > > pop up on i386 is that the old and new implementations were sufficiently > > close in size that rounding up to 16bytes made them look identical. > > > > I've just committed this. Thanks. > I'm also pretty sure this is the right fix. I don't know why ld/i386 > doesn't complain. It may be a bug, because the difference in size > is probably more than 16 bytes. Compare for example sigprocmask, it > originally also wasn't added to HIDDEN_SYSCALLS and therefore was > also defined twice. I'm very much surprised if both versions end op > being the same size... I know now why it worked on the i386 but not on the Alpha. On the i386 a system call "read", for example, produces a strong (normal global) symbol "_read" and a weak alias "read". Because the symbols were weak, the linker didn't complain about the multiple definitions. But on the Alpha, only a strong symbol "read" is emitted. So multiple definitions caused a diagnostic there. On a related topic, we should fix the Alpha to emit the weak alias like the i386 does. That's for ANSI/ISO C compliance, so that if a user defines his own version of read(), it won't affect the behavior of, say, getc(). We need a lot more of this throughout the C library for both target platforms. And we need to fix the calls inside there to use the "_xxx" symbols rather than the "xxx" versions. Don't ya just love people who say "we" need to do stuff? :-) John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "No matter how cynical I get, I just can't keep up." -- Nora Ephron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910142106.OAA07367>