Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 May 1998 13:06:01 +1000 (EST)
From:      John Birrell  <jb@cimlogic.com.au>
To:        tlambert@primenet.com (Terry Lambert)
Cc:        jb@cimlogic.com.au, tlambert@primenet.com, current@FreeBSD.ORG
Subject:   Re: Undefined symbol "___error"
Message-ID:  <199805150306.NAA16946@cimlogic.com.au>
In-Reply-To: <199805150251.TAA18202@usr01.primenet.com> from Terry Lambert at "May 15, 98 02:51:40 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> Was the libc version actually bumped?

For 3.0 I think yes, but not specifically for this change.

> Are we talking code that doesn't get rebuilt when the system is
> rebuilt?  Ie: the system is *NOT* rebuilt, only *PART* of the system
> is rebuilt?

We are talking about programs that are not distributed by FreeBSD.

> If *PART* of the system *WASN'T* rebuilt, I now see the problem.  The
> user is too lazy to be running -current.  ;-).

I'll let you tell Bruce he's lazy. 8-) 8-). I think it has more to do
with POLA.

> #ifdef __GCC__
> #pragma weak	__error = ___error
> static ___inline int *___error( void) { extern int errno; return &errno; }
> #endif	/* __GCC__*/
> 
> #define	errno	(* __error)
> --------------------------------------------------------------------------
> 
> This would give each library a weak accessor that would be overridden
> by the real accessor if the thing got linked to the right libc, right?

Provided that weak symbols are handled properly when there is more than
one weak symbol for the same name, yes. Remember that libpthread needs
to have a non-weak __error symbol that can override the one in libc
*and the errno.h header in you example) for kernel threads.

-- 
John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/
CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137

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?199805150306.NAA16946>