Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jan 2000 23:25:18 -0800
From:      Jason Evans <jasone@canonware.com>
To:        Jim Bloom <bloom@acm.org>
Cc:        committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/lib/libc_r/uthread uthread_accept.c uthread_aio_suspend.c uthread_bind.c uthread_connect.c uthread_dup.c uthread_dup2.c uthread_execve.c uthread_exit.c uthread_fchflags.c uthread_fchmod.c uthread_fchown.c uthread_flock.c uthread_fork.c ...
Message-ID:  <20000129232517.H73462@sturm.canonware.com>
In-Reply-To: <3893DDF8.6266F727@acm.org>; from bloom@acm.org on Sun, Jan 30, 2000 at 01:45:12AM -0500
References:  <jasone@canonware.com> <20000130030156.F119577@pinyon.org> <20000129190324.E73462@sturm.canonware.com> <3893DDF8.6266F727@acm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 30, 2000 at 01:45:12AM -0500, Jim Bloom wrote:
> What should the correct nm output look like for the strong symbols? 
> Here is what I see by doing nm in the middle of my second buildworld:
> 
> /usr/obj/usr/src/lib/libc_r/uthread_accept.o:
>          U __error
> 00000000 T _accept
>          U _thread_fd_lock_debug
>          U _thread_fd_table
>          U _thread_fd_table_init
>          U _thread_fd_unlock_debug
>          U _thread_kern_sched_state
>          U _thread_kern_set_timeout
>          U _thread_run
>          U _thread_sys_accept
>          U _thread_sys_close

It should look like:

         U __error
00000000 T _accept
         U _thread_fd_lock_debug
         U _thread_fd_table
         U _thread_fd_table_init
         U _thread_fd_unlock_debug
         U _thread_kern_sched_state
         U _thread_kern_set_timeout
         U _thread_run
         U _thread_sys_accept
         U _thread_sys_close
00000000 T accept

However, it surely doesn't, because the definition of __strong_reference() is
broken.  In an effort to make the style of __strong_reference() similar to
__weak_reference(), I renamed the arguments to (sym,alias).  That was Bad.
alias happens to be one of the words in the macro body.  For what it's
worth, I carefully tested this all before changing the macro argument
names...

The problem with the build system caused me to see warnings about function
prototypes during the first buildworld, and it wasn't until the second
buildworld completed that I noticed this problem.

The following patch fixes the problem.  I will seek Jordan's approval ASAP.

Jason

Index: cdefs.h
===================================================================
RCS file: /home/ncvs/src/sys/sys/cdefs.h,v
retrieving revision 1.27
diff -u -r1.27 cdefs.h
--- cdefs.h     2000/01/29 22:51:16     1.27
+++ cdefs.h     2000/01/30 07:22:22
@@ -153,8 +153,8 @@
 #endif
 
 #ifdef __GNUC__
-#define __strong_reference(sym,alias)  \
-       extern __typeof (sym) alias __attribute__ ((alias (#sym)));
+#define __strong_reference(sym,aliassym)       \
+       extern __typeof (sym) aliassym __attribute__ ((alias (#sym)));
 #ifdef __ELF__
 #ifdef __STDC__
 #define        __weak_reference(sym,alias)     \


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000129232517.H73462>