#
272461 |
|
02-Oct-2014 |
gjb |
Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
240178 |
|
06-Sep-2012 |
jilles |
libc/amd64: Do not export .cerror.
For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit in the FBSDprivate_1.0 version. It looks like there is no reason for this since it is not used from other libraries. Given that it cannot be accessed from C and its strange calling convention, it is rather unlikely that other things rely on it. Perhaps it is from a time when symbols could not be hidden.
Most of the amd64 assembler code jumps to .cerror using the GOT. It can jump to it directly now, as in non-PIC mode.
There are also some minor size optimizations to instructions but they yield virtually no benefit in the size of libc.so.7 due to padding.
Reviewed by: kib
|
#
184547 |
|
02-Nov-2008 |
peter |
We've been lax about matching END() macros in asm code for some time. This is used to set the ELF size attribute for functions. It isn't normally critical but some things can make use of it (gdb for stack traces). Valgrind needs it so I'm adding it in. The problem is present on all branches and on both i386 and amd64.
|
#
171217 |
|
04-Jul-2007 |
peter |
Adjust the syscall stub macros to be consistent in their meaning. In particular: SYSCALL() makes a syscall, with errno handling, and continues execution directly after the macro in the non-error case. RSYSCALL() is just like SYSCALL(), but returns after success. Both SYSCALL(name) and RSYSCALL(name) export "__sys_name" as a strong symbol, with "_name" and "name" as weak aliases. PSEUDO() is just like RSYSCALL(), but skipping the "name" weak alias. It still does "__sys_name" and "_name".
Change i386 to add errno handling to PSEUDO. The same for amd64 and sparc64, with appear to have copied the behavior. ia64 was correct (as was alpha). Just remove some apparently unused variants of the macros. (untested!) I believe powerpc is correct. Fix arm to not export "name" from the PSEUDO case. Remove apparently extra unused variants. (untested!)
The errno problem manifested on i386/amd64/sparc64 by having "PSEUDO" classified syscalls return without setting errno. eg: "addr = mmap()" could return with "addr" = 22 instead of setting errno to 22 and returning -1.
Approved by: re (kensmith)
|
#
165903 |
|
08-Jan-2007 |
imp |
Per Regents of the University of Calfornia letter, remove advertising clause.
# If I've done so improperly on a file, please let me know.
|
#
126107 |
|
22-Feb-2004 |
peter |
Change the syscall stub branch orders so that the static branch prediction will assume that syscalls will succeed rather than fail.
|
#
115279 |
|
24-May-2003 |
peter |
Repair PIC mode. It seems I was a bit too excited about the implications of native PC relative addressing.
|
#
114306 |
|
30-Apr-2003 |
peter |
Update for AMD64-style syscalls. Repocopied from i386/SYS.h. Note that the syscall instruction clobbers %rcx, which is inconvenient because it is the fourth syscall argument, so we use %r10 (another scratch register) for the 4th syscall arg instead (I picked %r10 to be the same as NetBSD). int 0x80 is still possible though, and it uses %rcx as usual. Note that the syscall style syscall does *NOT* preserve all the registers, unlike int 0x80. We do not preserve the scratch registers except for %rdi and %rsi. int 0x80 does preserve everything but the return values.
|
#
103436 |
|
16-Sep-2002 |
peter |
Initiate deorbit burn for the i386-only a.out related support. Moves are under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that.
Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now.
Tested on: i386 (extensively), alpha
|
#
92991 |
|
22-Mar-2002 |
obrien |
Fix the style of the SCM ID's. I believe have made all of libc .h's as consistent as possible.
|
#
87006 |
|
27-Nov-2001 |
jhb |
Use 'mov' instead of 'lea' for setting the syscall number in %eax as that is clearer about what we are actually doing.
Requested by: bde
|
#
85437 |
|
24-Oct-2001 |
peter |
De-orbit DEFS.h - the other arches do not use it, and it got replaced with <machine/asm.h>.
Reviewed by: bde
|
#
71770 |
|
29-Jan-2001 |
deischen |
Clean up syscall generation in libc by removing HIDDEN_SYSCALLS and treating (almost) all system calls the same way:
__sys_foo - actual syscall foo, _foo - weak definitions to __sys_foo
Change PSEUDO syscalls (currently only _exit and _getlogin) to be __sys_foo (T) and _foo (W).
Add $FreeBSD$ to a few files to satisfy commitprep.
Suggested by: bde
|
#
71579 |
|
24-Jan-2001 |
deischen |
Remove _THREAD_SAFE and make libc thread-safe by default by adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in.
Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo
Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo.
Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible.
Remove uneeded includes of <errno.h> from a few files.
Add $FreeBSD$ to a few files in order to pass commitprep.
Approved by: -arch
|
#
58126 |
|
16-Mar-2000 |
jasone |
Take care to avoid having "strong" and "weak" symbols of the same name in libc_r.
|
#
56809 |
|
29-Jan-2000 |
jasone |
Undo the ill-conceived breakage of the previous commit and really fix:
For libc_r renamed syscalls, correct symbol naming from _thread_sys_foo() <-- _foo() to _thread_sys_foo() <-- _foo() <-- foo(). This is necessary for system calls which libc_r doesn't define foo().
Some weak symbols such as poll() are defined twice. From what I understand, depending on one weak symbol or the other to be used is a bad idea. All such weak symbols defined in the libc_r-specific code should therefore be made strong (non-weak?).
Simplify PSEUDO() to not define any weak symbols, since they aren't ever needed.
alpha/SYS.h:
Correct reversed usage of WEAK_ALIAS(), which has reversed arguments from __weak_reference(). Also, fix reversal of symbols, so that syscall foo() is a weak alias for _foo().
Add WEAK_ALIAS() call to PRSYSCALL(), which unlike the i386 version of PRSYSCALL(), is not defined in terms of PSYSCALL().
Make PSEUDO() equivalent to the i386 version.
|
#
56773 |
|
28-Jan-2000 |
jasone |
For syscalls that are renamed to _thread_sys_foo, create a weak alias called _foo, not _thread_sys_foo.
|
#
56698 |
|
27-Jan-2000 |
jasone |
Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(), just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo().
Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().
Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid().
Make thread cancellation fully POSIX-compliant.
Suggested by: deischen
|
#
55837 |
|
12-Jan-2000 |
jasone |
Add three-tier symbol naming in support of POSIX thread cancellation points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read().
|
#
50476 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
35761 |
|
05-May-1998 |
jb |
Build the syscalls (in libc, not libc_r) with weak symbols so that libpthread can override them as required.
|
#
25029 |
|
19-Apr-1997 |
bde |
Fixed long lines.
Removed unused macros CALL() and ASMSTR.
Reviewed by: jdp
|
#
22993 |
|
22-Feb-1997 |
peter |
Revert $FreeBSD$ to $Id$
|
#
22715 |
|
14-Feb-1997 |
bde |
Moved definitions of PIC macros from SYS.h to DEFS.h so that SYS.h doesn't need to be included in files that have nothing to do with syscalls.
Added missing `.text' to START_ENTRY so that ENTRY() works when invoked in the data section.
|
#
21673 |
|
14-Jan-1997 |
jkh |
Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
|
#
19294 |
|
31-Oct-1996 |
dyson |
Correct a "spelling" error in a comment.
|
#
17769 |
|
22-Aug-1996 |
julian |
Submitted by: john birell (jb@cimlogic.com.au) fixups for makefiles and for Thread-safe sycalls
|
#
17706 |
|
20-Aug-1996 |
julian |
Submitted by: John Birrell <cimaxp1!jb@werple.net.au>
Here are the diffs for libc_r to get it one step closer to P1003.1c These make most of the thread/mutex/condvar structures opaque to the user. There are three functions which have been renamed with _np suffixes because they are extensions to P1003.1c (I did them for JAVA, which needs to suspend/resume threads and also start threads suspended).
I've created a new header (pthread_np.h) for the non-POSIX stuff.
The egrep tags stuff in /usr/src/lib/libc_r/Makefile that I uncommented doesn't work. I think its best to delete it. I don't think libc_r needs tags anyway, 'cause most of the source is in libc which does have tags.
also:
Here's the first batch of man pages for the thread functions. The diff to /usr/src/lib/libc_r/Makefile removes some stuff that was inherited from /usr/src/lib/libc/Makefile that should only be done with libc.
also:
I should have sent this diff with the pthread(3) man page. It allows people to type
make -DWANT_LIBC_R world
to get libc_r built with the rest of the world. I put this in the pthread(3) man page. The default is still not to build libc_r.
also: The diff attached adds a pthread(3) man page to /usr/src/share/man/man3. The idea is that without libc_r installed, this man page will give people enough info to know that they have to build libc_r.
|
#
15634 |
|
05-May-1996 |
peter |
Add support to enable libc to be compiled in ELF format. (#ifdef __ELF__) In a nutshell, this macroizes the local/global symbol scoping rules that are different in a.out and ELF. It also makes the i386 assembler stubs conform to i386 PIC calling conventions - the a.out ld.so didn't object, but the ELF one needs it as it implements PIC jumps via PLT's as well as calls. The a.out rtld only worked because it was accidently snooping the grandparent calling function's return address off the stack..
This also affects the libc_r code a little, because of cpp macro nesting.
|
#
13545 |
|
21-Jan-1996 |
julian |
Reviewed by: julian and (hsu?) Submitted by: John Birrel(L?)
changes for threadsafe operations
|
#
1849 |
|
04-Aug-1994 |
wollman |
First crack at making libc work with the new make macros. It compiles on my machine, and a simple static (genassym) and shared (sysctl) executable both work. Still to be done: RPCand YP merge.
|
#
1573 |
|
27-May-1994 |
rgrimes |
BSD 4.4 Lite Lib Sources
|