diff options
| author | raf <none@none> | 2008-04-29 14:12:45 -0700 |
|---|---|---|
| committer | raf <none@none> | 2008-04-29 14:12:45 -0700 |
| commit | 8cd45542f2a452ca0dab13d8b2d5cfa876ccbebc (patch) | |
| tree | 0571ec3284912727f3d8ba667ed57b4cc6afb8cd /usr/src/lib/libc/sparc | |
| parent | 31e69ea4bce567a03de57e063cb36ef69af61470 (diff) | |
| download | illumos-joyent-8cd45542f2a452ca0dab13d8b2d5cfa876ccbebc.tar.gz | |
6678310 using LD_AUDIT, ld.so.1 calls shared library's .init before library is fully relocated
6689238 libc needs global protection against ld.so.1
Diffstat (limited to 'usr/src/lib/libc/sparc')
| -rw-r--r-- | usr/src/lib/libc/sparc/crt/cerror.s | 15 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/crt/cerror64.s | 10 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/gen/getctxt.c | 16 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/gen/memcpy.s | 12 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/gen/memset.s | 12 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/gen/swapctxt.c | 15 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/mapfile-vers | 176 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/sys/__getcontext.s | 10 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s | 4 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/sys/door.s | 2 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/sys/ptrace.c | 44 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/threads/asm_subr.s | 13 | ||||
| -rw-r--r-- | usr/src/lib/libc/sparc/threads/machdep.c | 6 |
13 files changed, 157 insertions, 178 deletions
diff --git a/usr/src/lib/libc/sparc/crt/cerror.s b/usr/src/lib/libc/sparc/crt/cerror.s index 7caf5d1bf0..f702967cfa 100644 --- a/usr/src/lib/libc/sparc/crt/cerror.s +++ b/usr/src/lib/libc/sparc/crt/cerror.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,15 +18,15 @@ * * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + .ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.6 */ .file "cerror.s" @@ -46,7 +45,7 @@ mov EINTR, %o0 1: save %sp, -SA(MINFRAME), %sp - call _private___errno + call ___errno nop st %i0, [%o0] restore diff --git a/usr/src/lib/libc/sparc/crt/cerror64.s b/usr/src/lib/libc/sparc/crt/cerror64.s index 821e3e78db..27e4e2cd47 100644 --- a/usr/src/lib/libc/sparc/crt/cerror64.s +++ b/usr/src/lib/libc/sparc/crt/cerror64.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,7 +40,7 @@ mov EINTR, %o0 1: save %sp, -SA(MINFRAME), %sp - call _private___errno + call ___errno nop st %i0, [%o0] restore diff --git a/usr/src/lib/libc/sparc/gen/getctxt.c b/usr/src/lib/libc/sparc/gen/getctxt.c index a7fe3ebc58..b119860217 100644 --- a/usr/src/lib/libc/sparc/gen/getctxt.c +++ b/usr/src/lib/libc/sparc/gen/getctxt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,17 +19,16 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" -#pragma weak _private_getcontext = _getcontext #pragma weak getcontext = _getcontext #include "synonyms.h" @@ -44,7 +42,7 @@ getcontext(ucontext_t *ucp) greg_t *reg; ucp->uc_flags = UC_ALL; - if (__getcontext_syscall(ucp)) + if (__getcontext(ucp)) return (-1); /* diff --git a/usr/src/lib/libc/sparc/gen/memcpy.s b/usr/src/lib/libc/sparc/gen/memcpy.s index bfa751fd6e..2587108195 100644 --- a/usr/src/lib/libc/sparc/gen/memcpy.s +++ b/usr/src/lib/libc/sparc/gen/memcpy.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 1987-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -57,10 +57,6 @@ #include "synonyms.h" - .weak _private_memcpy - .type _private_memcpy, #function - _private_memcpy = memcpy - ENTRY(memcpy) st %o0, [%sp + 68] ! save des address for return val cmp %o2, 17 ! for small counts copy bytes diff --git a/usr/src/lib/libc/sparc/gen/memset.s b/usr/src/lib/libc/sparc/gen/memset.s index a1f9c223c1..7dd7d51961 100644 --- a/usr/src/lib/libc/sparc/gen/memset.s +++ b/usr/src/lib/libc/sparc/gen/memset.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 1987-2003 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -56,10 +56,6 @@ #include "synonyms.h" - .weak _private_memset - .type _private_memset, #function - _private_memset = memset - ENTRY(memset) mov %o0, %o5 ! copy sp before using it cmp %o2, 7 ! if small counts, just write bytes diff --git a/usr/src/lib/libc/sparc/gen/swapctxt.c b/usr/src/lib/libc/sparc/gen/swapctxt.c index ed77d3042b..8c052ca843 100644 --- a/usr/src/lib/libc/sparc/gen/swapctxt.c +++ b/usr/src/lib/libc/sparc/gen/swapctxt.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,14 +19,14 @@ * CDDL HEADER END */ -/* Copyright (c) 1988 AT&T */ -/* All Rights Reserved */ - /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* Copyright (c) 1988 AT&T */ +/* All Rights Reserved */ + #pragma ident "%Z%%M% %I% %E% SMI" #pragma weak swapcontext = _swapcontext @@ -42,7 +41,7 @@ swapcontext(ucontext_t *oucp, const ucontext_t *nucp) { greg_t *reg; - if (__getcontext_syscall(oucp)) + if (__getcontext(oucp)) return (-1); /* diff --git a/usr/src/lib/libc/sparc/mapfile-vers b/usr/src/lib/libc/sparc/mapfile-vers index 6319501512..3c08ffb4b7 100644 --- a/usr/src/lib/libc/sparc/mapfile-vers +++ b/usr/src/lib/libc/sparc/mapfile-vers @@ -26,7 +26,7 @@ # SUNW_1.23 { - global: + protected: aio_cancel64; aio_error64; aio_fsync64; @@ -45,7 +45,7 @@ SUNW_1.23 { }; SUNW_1.22.1 { - global: + protected: # Note: The atomic_OP_WIDTH_nv symbols defined here are also defined # by the common mapfile. Here, we add the NODYNSORT attribute # to them. On this platform, they are aliases for the non-_nv @@ -72,6 +72,16 @@ SUNW_1.22.1 { SUNW_1.22 { global: + dladdr = FUNCTION FILTER /usr/lib/ld.so.1; + dladdr1 = FUNCTION FILTER /usr/lib/ld.so.1; + dlclose = FUNCTION FILTER /usr/lib/ld.so.1; + dldump = FUNCTION FILTER /usr/lib/ld.so.1; + dlerror = FUNCTION FILTER /usr/lib/ld.so.1; + dlinfo = FUNCTION FILTER /usr/lib/ld.so.1; + dlmopen = FUNCTION FILTER /usr/lib/ld.so.1; + dlopen = FUNCTION FILTER /usr/lib/ld.so.1; + dlsym = FUNCTION FILTER /usr/lib/ld.so.1; + protected: alphasort64; _alphasort64; @@ -83,28 +93,19 @@ SUNW_1.22 { atomic_add_32_nv = NODYNSORT; atomic_add_64_nv = NODYNSORT; - dladdr = FUNCTION FILTER /usr/lib/ld.so.1; - dladdr1 = FUNCTION FILTER /usr/lib/ld.so.1; - dlclose = FUNCTION FILTER /usr/lib/ld.so.1; - dldump = FUNCTION FILTER /usr/lib/ld.so.1; - dlerror = FUNCTION FILTER /usr/lib/ld.so.1; - dlinfo = FUNCTION FILTER /usr/lib/ld.so.1; - dlmopen = FUNCTION FILTER /usr/lib/ld.so.1; - dlopen = FUNCTION FILTER /usr/lib/ld.so.1; - dlsym = FUNCTION FILTER /usr/lib/ld.so.1; pselect_large_fdset; scandir64; _scandir64; }; SUNW_1.21.2 { - global: + protected: __makecontext_v2; ___makecontext_v2; }; SUNW_1.21 { - global: + protected: attropen64; _attropen64; fstatat64; @@ -115,12 +116,12 @@ SUNW_1.21 { }; SUNW_1.18 { - global: + protected: select_large_fdset; }; SUNW_1.1 { - global: + protected: creat64; _creat64; fgetpos64; @@ -184,23 +185,12 @@ SUNW_1.1 { SUNW_0.7 { global: - _assert; _bufendtab; - __builtin_alloca; _ctype; - file_to_decimal; - _flsbuf; _lastbuf; - _mutex_held = NODYNSORT; - _mutex_lock = NODYNSORT; - p_online; - _rw_read_held; - _rw_write_held; _sibuf; _sobuf; - srand48; _sys_buslist; - _syscall; _sys_cldlist; sys_errlist; _sys_fpelist; @@ -212,10 +202,25 @@ SUNW_0.7 { _sys_siglistn; _sys_siglistp; _sys_traplist; + protected: + _assert; + __builtin_alloca; + file_to_decimal; + _flsbuf; + _mutex_held = NODYNSORT; + _mutex_lock = NODYNSORT; + p_online; + _rw_read_held; + _rw_write_held; + srand48; + _syscall; } SISCD_2.3; SISCD_2.3 { global: + errno = NODIRECT; + _iob; + protected: addseverity; _addseverity; asctime_r; @@ -229,7 +234,6 @@ SISCD_2.3 { _encrypt; endgrent; endpwent; - errno = NODIRECT; ___errno; fgetgrent; fgetgrent_r; @@ -255,7 +259,6 @@ SISCD_2.3 { gettimeofday; _gettimeofday; gmtime_r; - _iob; localtime_r; __mul64; putchar_unlocked; @@ -286,6 +289,43 @@ SISCD_2.3 { SYSVABI_1.3 { global: + _altzone; + calloc = NODIRECT; + __ctype; + daylight; + _daylight; + environ = NODIRECT; + _environ = NODIRECT; + free = NODIRECT; + frexp = FUNCTION FILTER libm.so.2; + getdate_err; + _getdate_err; + __huge_val; + __iob; + isnan = FUNCTION FILTER libm.so.2; + _isnan = FUNCTION FILTER libm.so.2; + isnand = FUNCTION FILTER libm.so.2; + _isnand = FUNCTION FILTER libm.so.2; + ldexp = FUNCTION FILTER libm.so.2; + logb = FUNCTION FILTER libm.so.2; + malloc = NODIRECT; + modf = FUNCTION FILTER libm.so.2; + _modf = FUNCTION FILTER libm.so.2; + nextafter = FUNCTION FILTER libm.so.2; + _nextafter = FUNCTION FILTER libm.so.2; + _numeric; + optarg; + opterr; + optind; + optopt; + realloc = NODIRECT; + scalb = FUNCTION FILTER libm.so.2; + _scalb = FUNCTION FILTER libm.so.2; + timezone; + _timezone; + tzname; + _tzname; + protected: .div; .mul; .rem; @@ -305,7 +345,6 @@ SYSVABI_1.3 { _acct; alarm; _alarm; - _altzone; asctime; __assert; atexit; @@ -313,7 +352,6 @@ SYSVABI_1.3 { atoi; atol; bsearch; - calloc = NODIRECT; catclose; _catclose; catgets; @@ -340,7 +378,7 @@ SYSVABI_1.3 { clearerr; clock; _close; - close = NODIRECT; + close; closedir; _closedir; creat; @@ -348,11 +386,8 @@ SYSVABI_1.3 { ctermid; _ctermid; ctime; - __ctype; cuserid; _cuserid; - daylight; - _daylight; difftime; div; __dtou; @@ -360,8 +395,6 @@ SYSVABI_1.3 { _dup; dup2; _dup2; - environ = NODIRECT; - _environ = NODIRECT; execl; _execl; execle; @@ -405,16 +438,14 @@ SYSVABI_1.3 { _fmtmsg; fopen; _fork; - fork = NODIRECT; + fork; fpathconf; _fpathconf; fprintf; fputc; fputs; fread; - free = NODIRECT; freopen; - frexp = FUNCTION FILTER libm.so.2; fscanf; fseek; fsetpos; @@ -437,8 +468,6 @@ SYSVABI_1.3 { _getcwd; getdate; _getdate; - getdate_err; - _getdate_err; getegid; _getegid; getenv; @@ -496,10 +525,8 @@ SYSVABI_1.3 { _hdestroy; hsearch; _hsearch; - __huge_val; initgroups; _initgroups; - __iob; ioctl; _ioctl; isalnum; @@ -514,10 +541,6 @@ SYSVABI_1.3 { isdigit; isgraph; islower; - isnan = FUNCTION FILTER libm.so.2; - _isnan = FUNCTION FILTER libm.so.2; - isnand = FUNCTION FILTER libm.so.2; - _isnand = FUNCTION FILTER libm.so.2; isprint; ispunct; isspace; @@ -528,7 +551,6 @@ SYSVABI_1.3 { labs; lchown; _lchown; - ldexp = FUNCTION FILTER libm.so.2; ldiv; lfind; _lfind; @@ -538,7 +560,6 @@ SYSVABI_1.3 { localtime; lockf; _lockf; - logb = FUNCTION FILTER libm.so.2; longjmp; lsearch; _lsearch; @@ -548,7 +569,6 @@ SYSVABI_1.3 { _lstat; makecontext; _makecontext; - malloc = NODIRECT; mblen; mbstowcs; mbtowc; @@ -574,8 +594,6 @@ SYSVABI_1.3 { _mlock; mmap; _mmap; - modf = FUNCTION FILTER libm.so.2; - _modf = FUNCTION FILTER libm.so.2; monitor; _monitor; mount; @@ -596,23 +614,16 @@ SYSVABI_1.3 { _munlock; munmap; _munmap; - nextafter = FUNCTION FILTER libm.so.2; - _nextafter = FUNCTION FILTER libm.so.2; nftw; _nftw; nice; _nice; nl_langinfo; _nl_langinfo; - _numeric; open; _open; opendir; _opendir; - optarg; - opterr; - optind; - optopt; pathconf; _pathconf; pause; @@ -677,7 +688,6 @@ SYSVABI_1.3 { _readlink; readv; _readv; - realloc = NODIRECT; remove; rename; _rename; @@ -686,8 +696,6 @@ SYSVABI_1.3 { _rewinddir; rmdir; _rmdir; - scalb = FUNCTION FILTER libm.so.2; - _scalb = FUNCTION FILTER libm.so.2; scanf; seekdir; _seekdir; @@ -726,8 +734,8 @@ SYSVABI_1.3 { _shmdt; shmget; _shmget; - sigaction = NODIRECT; - _sigaction = NODIRECT NODYNSORT; + sigaction; + _sigaction = NODYNSORT; sigaddset; _sigaddset; sigaltstack; @@ -842,8 +850,6 @@ SYSVABI_1.3 { _time; times; _times; - timezone; - _timezone; tmpfile; tmpnam; toascii; @@ -858,8 +864,6 @@ SYSVABI_1.3 { _ttyname; twalk; _twalk; - tzname; - _tzname; tzset; _tzset; ulimit; @@ -897,12 +901,6 @@ SYSVABI_1.3 { SUNWprivate_1.1 { global: - __ashldi3; - __ashrdi3; - _cerror; - _cerror64; - __cmpdi2; - __divdi3; _dladdr = FUNCTION FILTER /usr/lib/ld.so.1; _dladdr1 = FUNCTION FILTER /usr/lib/ld.so.1; _dlclose = FUNCTION FILTER /usr/lib/ld.so.1; @@ -912,6 +910,22 @@ SUNWprivate_1.1 { _dlmopen = FUNCTION FILTER /usr/lib/ld.so.1; _dlopen = FUNCTION FILTER /usr/lib/ld.so.1; _dlsym = FUNCTION FILTER /usr/lib/ld.so.1; + _ld_libc = FUNCTION FILTER /usr/lib/ld.so.1; + __lyday_to_month; + __mon_lengths; + _sys_errlist; + _sys_errs; + _sys_index; + _sys_nerr = NODYNSORT; + _sys_num_err; + __yday_to_month; + protected: + __ashldi3; + __ashrdi3; + _cerror; + _cerror64; + __cmpdi2; + __divdi3; _file_set; __floatdidf; __floatdisf; @@ -920,22 +934,16 @@ SUNWprivate_1.1 { __fseterror_u; _fwprintf_c89; _fwscanf_c89; - gtty; - _gtty; - _hasmntopt; _imaxabs_c89; _imaxdiv_c89; install_utrap; _install_utrap; - _ld_libc = FUNCTION FILTER /usr/lib/ld.so.1; __lshrdi3; - __lyday_to_month; _memcmp = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1; _memcpy = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1; _memmove = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1; _memset = AUXILIARY /platform/$PLATFORM/lib/libc_psr.so.1; __moddi3; - __mon_lengths; __muldi3; nop; _printf_c89; @@ -956,11 +964,6 @@ SUNWprivate_1.1 { _strtoumax_c89; _swprintf_c89; _swscanf_c89; - _sys_errlist; - _sys_errs; - _sys_index; - _sys_nerr = NODYNSORT; - _sys_num_err; __ucmpdi2; __udivdi3; __umoddi3; @@ -982,13 +985,10 @@ SUNWprivate_1.1 { _wprintf_c89; _wscanf_c89; _xregs_clrptr; - __yday_to_month; local: __cerror = NODYNSORT; __cerror64 = NODYNSORT; - _private_fstat64 = NODYNSORT; - _private_stat64 = NODYNSORT; _seekdir64 = NODYNSORT; _telldir64 = NODYNSORT; }; diff --git a/usr/src/lib/libc/sparc/sys/__getcontext.s b/usr/src/lib/libc/sparc/sys/__getcontext.s index ce2cd69835..86364e3ee3 100644 --- a/usr/src/lib/libc/sparc/sys/__getcontext.s +++ b/usr/src/lib/libc/sparc/sys/__getcontext.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -36,8 +36,6 @@ #include "SYS.h" - ANSI_PRAGMA_WEAK2(__getcontext_syscall,__getcontext,function) - ENTRY(__getcontext) mov %o0, %o1 mov 0, %o0 diff --git a/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s b/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s index fb2e0f2dce..79dfca3c39 100644 --- a/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s +++ b/usr/src/lib/libc/sparc/sys/_lwp_mutex_unlock.s @@ -20,7 +20,7 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -36,8 +36,6 @@ #include <sys/synch32.h> #include <../assym.h> - ANSI_PRAGMA_WEAK2(_private_lwp_mutex_unlock,_lwp_mutex_unlock,function) - ENTRY(_lwp_mutex_unlock) membar #LoadStore|#StoreStore add %o0, MUTEX_LOCK_WORD, %o1 diff --git a/usr/src/lib/libc/sparc/sys/door.s b/usr/src/lib/libc/sparc/sys/door.s index 2a2f4216c1..19059ef056 100644 --- a/usr/src/lib/libc/sparc/sys/door.s +++ b/usr/src/lib/libc/sparc/sys/door.s @@ -156,7 +156,7 @@ door_restart: nop save %sp, -SA(MINFRAME), %sp - call _private_getpid /* get current process id */ + call getpid nop PIC_SETUP(g1) #ifdef __sparcv9 diff --git a/usr/src/lib/libc/sparc/sys/ptrace.c b/usr/src/lib/libc/sparc/sys/ptrace.c index 53f9a1964a..68c923489e 100644 --- a/usr/src/lib/libc/sparc/sys/ptrace.c +++ b/usr/src/lib/libc/sparc/sys/ptrace.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,13 +18,14 @@ * * CDDL HEADER END */ + /* - * ptrace(2) interface built on top of proc(4). + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. */ /* - * Copyright 1990-2003 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * ptrace(2) interface built on top of proc(4). */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -155,10 +155,10 @@ ptrace(int request, pid_t pid, int addr, int data) #if PTRACE_DEBUG fprintf(stderr, " ptrace(%s, 0x%X, 0x%X, 0x%X)\n", - map(request), pid, addr, data); + map(request), pid, addr, data); #endif - (void) _private_mutex_lock(&pt_lock); + (void) mutex_lock(&pt_lock); if (request == 0) { /* PTRACE_TRACEME, executed by traced process */ /* @@ -206,7 +206,7 @@ ptrace(int request, pid_t pid, int addr, int data) if (close(fd) != 0) exit(255); - (void) _private_mutex_unlock(&pt_lock); + (void) mutex_unlock(&pt_lock); return (0); } @@ -238,7 +238,7 @@ again: goto eio; if (pread(cp->asfd, (char *)&data, sizeof (data), (off_t)addr) == sizeof (data)) { - (void) _private_mutex_unlock(&pt_lock); + (void) mutex_unlock(&pt_lock); return (data); } goto eio; @@ -256,7 +256,7 @@ again: if ((int)xaddr >= 0 && xaddr < U_END) { /* LINTED pointer alignment */ data = *((int *)((caddr_t)(&cp->user) + xaddr)); - (void) _private_mutex_unlock(&pt_lock); + (void) mutex_unlock(&pt_lock); return (data); } goto eio; @@ -271,7 +271,7 @@ again: cp->flags |= CS_SETREGS; if (pwrite(cp->asfd, (char *)&data, sizeof (data), (off_t)addr) == sizeof (data)) { - (void) _private_mutex_unlock(&pt_lock); + (void) mutex_unlock(&pt_lock); return (data); } goto eio; @@ -291,14 +291,14 @@ again: data &= ~03; cp->user.u_reg[rx] = data; cp->flags |= CS_SETREGS; - (void) _private_mutex_unlock(&pt_lock); + (void) mutex_unlock(&pt_lock); return (data); } goto eio; case 7: /* PTRACE_CONT */ case 9: /* PTRACE_SINGLESTEP */ - { + { long runctl[3]; if (cp->flags & CS_SETREGS) { @@ -325,7 +325,7 @@ again: ps->pr_lwp.pr_reg[R_O6] = cp->user.u_reg[REG_O6]; ps->pr_lwp.pr_reg[R_O7] = cp->user.u_reg[REG_O7]; (void) pread(cp->asfd, (char *)&ps->pr_lwp.pr_reg[R_L0], - 16*sizeof (int), (off_t)cp->user.u_reg[REG_SP]); + 16*sizeof (int), (off_t)cp->user.u_reg[REG_SP]); cmd = PCSREG; iov[0].iov_base = (caddr_t)&cmd; iov[0].iov_len = sizeof (long); @@ -364,16 +364,16 @@ again: if (errno == ENOENT) { /* current signal must have killed it */ ReleaseProc(cp); - (void) _private_mutex_unlock(&pt_lock); + (void) mutex_unlock(&pt_lock); return (data); } goto tryagain; } (void) memset((char *)ps, 0, sizeof (pstatus_t)); cp->flags = 0; - (void) _private_mutex_unlock(&pt_lock); + (void) mutex_unlock(&pt_lock); return (data); - } + } case 8: /* PTRACE_KILL */ /* overkill? */ @@ -384,7 +384,7 @@ again: sizeof (long)+sizeof (siginfo_t)); (void) kill(pid, SIGKILL); ReleaseProc(cp); - (void) _private_mutex_unlock(&pt_lock); + (void) mutex_unlock(&pt_lock); return (0); default: @@ -399,11 +399,11 @@ tryagain: } eio: errno = EIO; - (void) _private_mutex_unlock(&pt_lock); + (void) mutex_unlock(&pt_lock); return (-1); esrch: errno = ESRCH; - (void) _private_mutex_unlock(&pt_lock); + (void) mutex_unlock(&pt_lock); return (-1); } @@ -644,7 +644,7 @@ ProcUpdate(cstatus_t *cp) ps->pr_lwp.pr_reg[R_O6] = cp->user.u_reg[REG_O6]; ps->pr_lwp.pr_reg[R_O7] = cp->user.u_reg[REG_O7]; (void) pread(cp->asfd, (char *)&ps->pr_lwp.pr_reg[R_L0], - 16*sizeof (int), (off_t)cp->user.u_reg[REG_SP]); + 16*sizeof (int), (off_t)cp->user.u_reg[REG_SP]); cmd = PCSREG; iov[0].iov_base = (caddr_t)&cmd; iov[0].iov_len = sizeof (long); diff --git a/usr/src/lib/libc/sparc/threads/asm_subr.s b/usr/src/lib/libc/sparc/threads/asm_subr.s index 22245d6155..f2fbb6adab 100644 --- a/usr/src/lib/libc/sparc/threads/asm_subr.s +++ b/usr/src/lib/libc/sparc/threads/asm_subr.s @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -19,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -128,11 +128,6 @@ RET SET_SIZE(__lwp_unpark_all) - ENTRY(lwp_yield) - SYSTRAP_RVAL1(yield) - RET - SET_SIZE(lwp_yield) - /* * __sighndlr(int sig, siginfo_t *si, ucontex_t *uc, void (*hndlr)()) * diff --git a/usr/src/lib/libc/sparc/threads/machdep.c b/usr/src/lib/libc/sparc/threads/machdep.c index 0fc62303f8..c5510f776f 100644 --- a/usr/src/lib/libc/sparc/threads/machdep.c +++ b/usr/src/lib/libc/sparc/threads/machdep.c @@ -48,8 +48,8 @@ setup_context(ucontext_t *ucp, void *(*func)(ulwp_t *), SA(MINFRAME); /* clear the context and the top stack frame */ - (void) _memset(ucp, 0, sizeof (*ucp)); - (void) _memset((void *)stack, 0, SA(MINFRAME)); + (void) memset(ucp, 0, sizeof (*ucp)); + (void) memset((void *)stack, 0, SA(MINFRAME)); /* fill in registers of interest */ ucp->uc_flags |= UC_CPU; @@ -77,7 +77,7 @@ _thr_setup(ulwp_t *self) self->ul_ustack.ss_sp = (void *)(self->ul_stktop - self->ul_stksiz); self->ul_ustack.ss_size = self->ul_stksiz; self->ul_ustack.ss_flags = 0; - (void) _private_setustack(&self->ul_ustack); + (void) setustack(&self->ul_ustack); update_sched(self); tls_setup(); |
