atom feed17 messages in org.freebsd.freebsd-currentRe: World breakage in libc_r?
FromSent OnAttachments
John PolstraOct 13, 1999 2:36 pm 
Doug RabsonOct 14, 1999 1:08 am 
Marcel MoolenaarOct 14, 1999 3:16 am 
Wilko BulteOct 14, 1999 9:45 am 
Kenneth Wayne CulverOct 14, 1999 12:09 pm 
Daniel EischenOct 14, 1999 12:20 pm 
John PolstraOct 14, 1999 2:06 pm 
John BirrellOct 14, 1999 2:19 pm 
Daniel EischenOct 14, 1999 2:34 pm 
John PolstraOct 14, 1999 2:44 pm 
John BirrellOct 14, 1999 2:53 pm 
Daniel EischenOct 14, 1999 3:25 pm 
David O'BrienOct 15, 1999 8:38 am 
Wilko BulteOct 15, 1999 11:09 am 
John BirrellOct 15, 1999 3:07 pm 
pa...@phoenix.volant.orgOct 15, 1999 3:23 pm 
John PolstraOct 17, 1999 10:16 am 
Subject:Re: World breakage in libc_r?
From:John Polstra (jd@polstra.com)
Date:Oct 14, 1999 2:06:18 pm
List:org.freebsd.freebsd-current

In article <3805@scc.nl>, Marcel Moolenaar <mar@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

To Unsubscribe: send mail to majo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message