Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Oct 1999 17:35:05 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        jdp@polstra.com, marcel@scc.nl
Cc:        current@FreeBSD.ORG
Subject:   Re: World breakage in libc_r?
Message-ID:  <199910142135.RAA00099@pcnet1.pcnet.com>

next in thread | raw e-mail | index | archive | help
John Polstra wrote:
> 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? :-)

One of the things on my wish list is a libpthread that can be linked
with libc.  So the way to accomplish this is to have null hooks with
weak symbols in libc, and provide the same (non-null) functions in
libpthread but with strong symbols?

Dan Eischen
eischen@vigrid.com


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?199910142135.RAA00099>