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
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to