#
83762a71 |
| 10-Dec-2023 |
deraadt <deraadt@openbsd.org> |
Populate the non-LOAD openbsd.syscalls section (and PT_OPENBSD_SYSCALL) with {uint offset, uint syscall#} entries in libc & ld.so. In libc a few syscall# entries (break, sigprocmask, _tfork, _threxit
Populate the non-LOAD openbsd.syscalls section (and PT_OPENBSD_SYSCALL) with {uint offset, uint syscall#} entries in libc & ld.so. In libc a few syscall# entries (break, sigprocmask, _tfork, _threxit) are duplicated because additional or inline uses occur (that situation is handled elsewhere) ok kettenis
show more ...
|
#
4c4efc0a |
| 11-Feb-2023 |
guenther <guenther@openbsd.org> |
Use a consistent comment to explain why 32bit archs set their second return register to -1 in the syscall error path ("for lseek").
removal of the misleading __syscall() mention requested by deraadt
Use a consistent comment to explain why 32bit archs set their second return register to -1 in the syscall error path ("for lseek").
removal of the misleading __syscall() mention requested by deraadt@ ok deraadt@
show more ...
|
#
0be5e928 |
| 10-Jun-2022 |
guenther <guenther@openbsd.org> |
Add _?ENTRY_NB() macro for doing an ASM function entry without setting the binding to global (NB == "no binding"), as clang 13 is now warning about changing the binding from global to weak. Use them
Add _?ENTRY_NB() macro for doing an ASM function entry without setting the binding to global (NB == "no binding"), as clang 13 is now warning about changing the binding from global to weak. Use them for bcopy, brk, and sbrk.
Add the '.L' prefix to internal labels in the bcopy implementation to remove them from the symbol table
Start using the MI DEFS.h: delete the #defines from powerpc/SYS.h that the MI DEFS.h provides and switch from SYS.h to DEFS.h in files that don't do syscalls. Use END_BUILTIN from the MI DEFS.h for ffs.
ok gkoehler@
show more ...
|
#
15572fcf |
| 28-Nov-2020 |
gkoehler <gkoehler@openbsd.org> |
Add retguard to macppc kernel locore.S, ofwreal.S, setjmp.S
This changes RETGUARD_SETUP(ffs) to RETGUARD_SETUP(ffs, %r11, %r12) and RETGUARD_CHECK(ffs) to RETGUARD_CHECK(ffs, %r11, %r12) to show tha
Add retguard to macppc kernel locore.S, ofwreal.S, setjmp.S
This changes RETGUARD_SETUP(ffs) to RETGUARD_SETUP(ffs, %r11, %r12) and RETGUARD_CHECK(ffs) to RETGUARD_CHECK(ffs, %r11, %r12) to show that r11 and r12 are in use between setup and check, and to pick registers other than r11 and r12 in some kernel functions.
ok mortimer@ deraadt@
show more ...
|
#
d2c5a474 |
| 26-Oct-2020 |
gkoehler <gkoehler@openbsd.org> |
Retguard asm macros for powerpc libc, ld.so
Add retguard to some, but not all, asm functions in libc. Edit SYS.h in libc to remove the PREFIX macros and add SYSENTRY (more like aarch64 and powerpc6
Retguard asm macros for powerpc libc, ld.so
Add retguard to some, but not all, asm functions in libc. Edit SYS.h in libc to remove the PREFIX macros and add SYSENTRY (more like aarch64 and powerpc64), so we can insert RETGUARD_SETUP after SYSENTRY. Some .S files in this commit don't get retguard, but do stop using the old prefix macros.
Tested by deraadt@, who put this diff in a macppc snap.
show more ...
|
#
b21062f5 |
| 14-Jul-2019 |
guenther <guenther@openbsd.org> |
Unlike gas, clang's assembler complains about duplicate symbol assignments. Tweak the PSEUDO() macro to avoid that.
problem noted and tested by kettenis@
|
#
5e1df623 |
| 15-May-2016 |
guenther <guenther@openbsd.org> |
TIB conversion is complete, so set errno in the syscall stub and eliminate __cerror
ok ketternis@
|
#
fe38b55c |
| 07-May-2016 |
guenther <guenther@openbsd.org> |
Use a Thread Information Block in both single and multi-threaded programs. This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an
Use a Thread Information Block in both single and multi-threaded programs. This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable!
Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via <errno.h> now!
Clean up libpthread's symbol exports like libc.
On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec.
Testing by various, particularly sthen@ and patrick@ ok kettenis@
show more ...
|
#
5aed4d28 |
| 23-Oct-2015 |
guenther <guenther@openbsd.org> |
Merge the sigaction() and sigprocmask() overloads/wrappers from libpthread into libc, and move pthread_sigmask() as well (just a trivial wrapper). This provides consistent handling of SIGTHR between
Merge the sigaction() and sigprocmask() overloads/wrappers from libpthread into libc, and move pthread_sigmask() as well (just a trivial wrapper). This provides consistent handling of SIGTHR between single- and multi-threaded programs and is a step in the merge of all the libpthread overloads, providing some ASM and Makefile bits that the other wrappers will need.
ok deraadt@ millert@
show more ...
|
#
aa797096 |
| 05-Sep-2015 |
guenther <guenther@openbsd.org> |
Adds hidden _libc_FOO aliases for the system call stubs. Stop generating _brk and _sbrk symbols: they've already been hidden. Set the ELF symbol size on the syscall stubs. Give the __{min,cur}brk sym
Adds hidden _libc_FOO aliases for the system call stubs. Stop generating _brk and _sbrk symbols: they've already been hidden. Set the ELF symbol size on the syscall stubs. Give the __{min,cur}brk symbols a size and type, and hide more jump labels.
ok deraadt@
show more ...
|
#
9b9d2a55 |
| 31-Aug-2015 |
guenther <guenther@openbsd.org> |
Add framework for resolving (pun intended) libc namespace issues, using wrapper .h files and asm labels to let internal calls resolve directly and not be overridable or use the PLT. Then, apply that
Add framework for resolving (pun intended) libc namespace issues, using wrapper .h files and asm labels to let internal calls resolve directly and not be overridable or use the PLT. Then, apply that framework to most of the functions in stdio.h, string.h, err.h, and wchar.h. Delete the should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.
tests clean on i386, amd64, sparc64, powerpc, and mips64
naming feedback from kettenis@ and millert@ ok kettenis@
show more ...
|
#
a2e13100 |
| 23-Aug-2015 |
kettenis <kettenis@openbsd.org> |
Make __cerror() use the per-thread errno location if r2 isn't zero. This way libpthread no longer has to override it which means that we can use a local call and can avoid setting up r30 as a _GLOBA
Make __cerror() use the per-thread errno location if r2 isn't zero. This way libpthread no longer has to override it which means that we can use a local call and can avoid setting up r30 as a _GLOBAL_OFFSET_TABLE_ pointer, which is hard the way the powerpc ABI works.
For now we continue to provide __cerror as a weak symbol, but ___cerror is now protected and internal calls within libc now use ___cerror instead of __cerror.
discussed with guenther@
show more ...
|
#
514a545f |
| 07-Apr-2015 |
guenther <guenther@openbsd.org> |
Make pthread_atfork() track the DSO that called it like atexit() does, unregistering callbacks if the DSO is unloaded. Move the callback handling from libpthread to libc, though libpthread still ove
Make pthread_atfork() track the DSO that called it like atexit() does, unregistering callbacks if the DSO is unloaded. Move the callback handling from libpthread to libc, though libpthread still overrides the inner call to handle locking and thread-library reinitialization. Major version bump for both libc and libpthread.
verification that this fixes various ports ajacoutot@ asm assistance miod@; ok millert@ deraadt@
show more ...
|
#
b67c48e9 |
| 04-Jun-2014 |
matthew <matthew@openbsd.org> |
Apply "unifdef -D__STDC__" to libc/arch/*/SYS.h
A while back, pascal@ converted our system call stubs from using "cpp | as" to "cc -x assembler-with-cpp", so there's no need to stay compatible with
Apply "unifdef -D__STDC__" to libc/arch/*/SYS.h
A while back, pascal@ converted our system call stubs from using "cpp | as" to "cc -x assembler-with-cpp", so there's no need to stay compatible with ancient preprocessor semantics.
ok miod
show more ...
|
#
eca0a8db |
| 01-Oct-2010 |
guenther <guenther@openbsd.org> |
Provide a WEAK_ALIAS macro in <machine/asm.h> for the few platforms that didn't already have one, and then immediately use it in libc's SYS.h
ok miod@
|
#
159cac4c |
| 07-Oct-2002 |
drahn <drahn@openbsd.org> |
cerror -> __cerror as suggested by art, with a couple of missing _ASM_LABEL() added as appropriate.
|
#
5fb677a1 |
| 19-Feb-2002 |
millert <millert@openbsd.org> |
We need to keep K&R compat macros for some ports where the assemnbler is still using -traditional-cpp.
|
#
e7beb4a7 |
| 19-Feb-2002 |
millert <millert@openbsd.org> |
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
|
#
7dd1fba8 |
| 20-Sep-2001 |
drahn <drahn@openbsd.org> |
change PSEUDO_NOERROR so it is indeed does not set errno.
|
#
ba8732b6 |
| 20-Sep-2001 |
millert <millert@openbsd.org> |
Add PSEUDO_NOERROR similar to that used by NetBSD. Some ports were setting errno in PSEUDO and some were not. Now errno is set for all in PSEUDO and PSEUDO_NOERROR is provided for the non-errno case
Add PSEUDO_NOERROR similar to that used by NetBSD. Some ports were setting errno in PSEUDO and some were not. Now errno is set for all in PSEUDO and PSEUDO_NOERROR is provided for the non-errno case (only used by _exit).
Needs testing on vax and m88k. XXX - hppa and powerpc still lack a real PSEUDO_NOERROR implementation. Currently PSEUDO_NOERROR and PSEUDO are the same (so builds don't break on those platforms).
show more ...
|
#
79112ce9 |
| 06-Oct-2000 |
d <d@openbsd.org> |
weaken syscall symbols in libc by default
|
#
1fc27e41 |
| 01-Mar-2000 |
todd <todd@openbsd.org> |
$OpenBSD$
|
#
3b09c8ae |
| 15-Jun-1999 |
rahnds <rahnds@openbsd.org> |
changes required for powerpc libc_r support.
|
#
6685c05b |
| 12-Mar-1999 |
rahnds <rahnds@openbsd.org> |
Fixes to the currently unused PIC support in the powerpc asm files. contact rahnds@openbsd.org before attempting to use this funcationality.
|
#
301bc95d |
| 01-Feb-1999 |
d <d@openbsd.org> |
remove PASSTHRU
|