summaryrefslogtreecommitdiffstats
path: root/lib/libc/arch (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Simplify sig{set,long}jmp(): just Do The Job instead of calling othersguenther2016-05-081-52/+50
| | | | ok kettenis@
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-0778-1233/+337
| | | | | | | | | | | | | | | | | 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@
* Don't add setjmp.S twice.kettenis2016-04-281-2/+2
|
* Don't use sigreturn(2) in longjmp(3). Instead use a similar approach as inkettenis2016-04-281-59/+22
| | | | | | _longjmp(3) but also restore the signal mask. ok deraadt@
* remove duplicate strrchr.c entry in SRCSjsg2016-04-281-2/+2
| | | | ok deraadt@
* Don't need to define SYS_sycall hereguenther2016-03-271-4/+1
| | | | noted by miod@
* Switch to RSYSCALL: no special handling is needed here any more andguenther2016-03-271-6/+2
| | | | | | we do need the hidden _libc_syscall alias. from miod@
* The asm in the MD_DISABLE_KBIND macro was too fragile and broke alpha and hppa.guenther2016-03-2112-300/+0
| | | | | | So instead, do the kbind disabling with syscall(). debugging and ok deraadt@, ok kettenis@
* Rearrange C runtime bits: now that ld.so exports environ and __progname,guenther2016-03-2012-0/+300
| | | | | | | | | | | move their definitions and initialization in static links to libc.a Make crt0 always invoke a new func _csu_finish() in libc to process the auxv and to either register the ld.so cleanup function (in dynamic links) or initialize environ and __progname and do MC_DISABLE_KBIND (in static links). In libc, get pagesize from auxv; cache that between getpagesize() and sysconf(_SC_PAGESIZE) ok mpi@ "good time" deraadt@
* We are done providing support for the vax.deraadt2016-03-0951-2599/+0
| | | | lots of agreement.
* "the the" -> "the" in commentmmcc2015-12-111-2/+2
|
* Tweak previous: rename it to fpround() to match FreeBSDguenther2015-11-151-11/+11
| | | | requested by kettenis@
* I got a round tuit to rename round() to roundit() to avoid gcc warning.guenther2015-11-151-14/+14
| | | | ok deraadt@
* Split the non-syscall ASM bits from SYS.h into DEFS.h and use that in theguenther2015-11-1413-41/+80
| | | | | | non-syscall .S source ok millert@ miod@
* Invoke the _HIDDEN() sigprocmask label rather than the public one.miod2015-10-312-8/+10
|
* This is sigprocmask, not sigpending.miod2015-10-311-2/+2
|
* Wrap the remaining math functions in libc: __fpclassify*(), __flt_rounds(),guenther2015-10-2721-27/+48
| | | | | | and ldexp(). ok millert@
* Merge the sigaction() and sigprocmask() overloads/wrappers from libpthreadguenther2015-10-2328-78/+93
| | | | | | | | | 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@
* Pull in <float.h> instead of declaring __flt_rounds() locallyguenther2015-10-181-3/+2
| | | | ok miod@ jsg@
* Rename SYSEXIT() to SYSCALL_END() for consistency with most other archs.guenther2015-10-175-25/+14
| | | | | | No change in resulting object files ok millert@
* Delete an inexplicable commentguenther2015-10-041-2/+2
|
* vax deserves gdtoa love too!guenther2015-09-141-1/+3
|
* Need SYS.h for END_STRONG()guenther2015-09-135-6/+6
|
* Add hidden _libc_ aliases and symbol sizesguenther2015-09-132-1/+3
|
* Add hidden _libc_ aliases and symbol sizesguenther2015-09-134-0/+4
| | | | prodded by semarie@
* Uses angle brackets to include softfloat.h, and add the proper directory tomiod2015-09-132-2/+4
| | | | | CFLAGS. ok guenther@
* Wrap <stdlib.h> so that calls go direct and the symbols not in theguenther2015-09-139-12/+9
| | | | | | C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
* Do provide hidden _libc_* aliases for sig{block,setmask} and use them inguenther2015-09-1313-62/+46
| | | | | | | the ASM *setjmp implementations. Skip the PLT when calling them on amd64 (other archs to do this after testing) ok miod@
* Adds hidden _libc_FOO aliases for the system call stubs.guenther2015-09-1050-163/+278
| | | | | | | | | | 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. alpha, arm, m88k, sh, sparc, and vax assistance miod@ hppa assistance kettenis@ ok deraadt@ miod@
* Backtrack a little bit and don't try to use the per-thread errno location ifkettenis2015-09-091-23/+21
| | | | | | | | | | r2 is zero. Some upcoming changes will probably change the offset at which the errno pointer is stored, or might even store errno directly. Instead, call __errno to get the location of errno. Make sure we go through the PLT such that we call the version in libpthread if it is linked in. Set up r30 for this purpose. The ___cerrno function itself remains protected. ok guenther@
* Fix previous: restore a PSEUDO_SUFFIX macro to actually handle errno and returnguenther2015-09-051-1/+2
| | | | | cone of shame guenther@ ok deraadt@
* This is probably what guenther@ had in mind.miod2015-09-051-2/+2
|
* Adds hidden _libc_FOO aliases for the system call stubs.guenther2015-09-0539-125/+198
| | | | | | | | 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@
* use #function rather than @function on armderaadt2015-08-311-2/+2
| | | | ok guenther
* Also add ALTEXIT_{STRONG,WEAK} to hppa64, copied from hppa. Document'em tooguenther2015-08-312-3/+11
| | | | ok deraadt@
* Add ALTEXIT_{STRONG,WEAK} to support wrapping of functions using ALTENTRY.guenther2015-08-312-2/+7
| | | | | | Fix memmove with that ok deraadt@
* Add framework for resolving (pun intended) libc namespace issues, usingguenther2015-08-3182-166/+520
| | | | | | | | | | | | 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@
* fix commentguenther2015-08-271-2/+2
|
* Sync with other per-arch Symbols.list filesguenther2015-08-261-3/+0
|
* Hide many (194!) symbols that nothing should be using.guenther2015-08-2652-786/+195
| | | | | | | Delete exect(2); it wasn't portable across archs and nothing used it. ports test build by naddy@ ok deraadt@ kettenis@
* catch upmiod2015-08-251-0/+12
|
* Make __cerror() use the per-thread errno location if r2 isn't zero. This waykettenis2015-08-234-17/+25
| | | | | | | | | | | | 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@
* Fetch the _GLOBAL_OFFSET_TABLE_ pointer in a way that's compatible with thekettenis2015-08-232-8/+12
| | | | Secure-PLT ABI.
* Set up r30 with the _GLOBAL_OFFSET_TABLE_ pointer as required by thekettenis2015-08-231-3/+21
| | | | Secure-PLT ABI.
* Explicitly list the symbols permitted to be exported by libc.guenther2015-08-2210-0/+315
| | | | | | | | This is primed with the current list of exported symbols so it doesn't change the ABI yet, but will prevent unintentional additions in the future and sets the stage for reductions. ok deraadt@ kettenis@
* Set FUNC symbol sizes of auto-generated and hand-written syscall wrappers.uebayasi2015-06-1710-14/+40
| | | | | | Original diff from guenther@, adjusted by me. OK guenther@
* Reuse SYSENTRY_HIDDEN() in SYSENTRY(); no functional changes.uebayasi2015-06-121-2/+2
|
* At some point arm moved to a unified syntax for arm and thumb instructions.jsg2015-06-082-37/+41
| | | | | | | | | While binutils supports both "unified" and "divided" syntax (defaulting to divided) the integrated assembler in clang only supports unified names so switch some files to unified syntax. Similiar changes were made in bitrig and freebsd. No difference in objdump -d output. tested on zaurus by deraadt@, ok miod@
* Since the __{div,rem}{l,q}{,u} special libc entry points use a specificmiod2015-06-011-7/+46
| | | | | | | | | | | calling convention which conflicts over t11 usage with the secureplt calling convention, force these symbols to be `notype' rather `function', so that the linker will not attempt to use plt relocations for them in the absence of explicit relocation information. Note that these symbols are still public and still callable with the old plt convention, so existing binaries will still work with an updated libc, and no libc version change is necessary.
* Put END() matching _ENTRY() (== ENTRY() w/o prof).uebayasi2015-06-011-1/+2
|