Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Apr 1998 14:40:30 +1000 (EST)
From:      John Birrell <jb@cimlogic.com.au>
To:        bde@zeta.org.au
Cc:        committers@FreeBSD.ORG
Subject:   Syscall as weak symbols
Message-ID:  <199804280440.OAA17651@cimlogic.com.au>

next in thread | raw e-mail | index | archive | help

As part of a cleanup to things related to libc, I'd like to change
the SYSCALL macro to generate (something like) __syscall_name as
the non-weak symbol for the `name' syscall, and declare name as a
weak symbol so that an "nm -W write.o" gives:

00000008 T  __syscall_write
         U  cerror
00000008 TW write

using:

#define SYSCALL(x)  2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \
                    ENTRY(__CONCAT(_syscall_,x)); \
                    .weak x; .set x,__CONCAT(__syscall_,x); \
                    lea __CONCAT(SYS_,x),%eax; KERNCALL; jb 2b

This will allow the complexity of renaming syscalls for libc_r to be
removed. It is also a step towards cleaning up the user's namespace.

Comments?

-- 
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 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?199804280440.OAA17651>