aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/riscv/sys
Commit message (Collapse)AuthorAgeFilesLines
* Reimplement brk() and sbrk() to avoid the use of _end.Mark Johnston2018-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, libc.so would initialize its notion of the break address using _end, a special symbol emitted by the static linker following the bss section. Compatibility issues between lld and ld.bfd could cause the wrong definition of _end (libc.so's definition rather than that of the executable) to be used, breaking the brk()/sbrk() interface. Avoid this problem and future interoperability issues by simply not relying on _end. Instead, modify the break() system call to return the kernel's view of the current break address, and have libc initialize its state using an extra syscall upon the first use of the interface. As a side effect, this appears to fix brk()/sbrk() usage in executables run with rtld direct exec, since the kernel and libc.so no longer maintain separate views of the process' break address. PR: 228574 Reviewed by: kib (previous version) MFC after: 2 months Differential Revision: https://reviews.freebsd.org/D15663 Notes: svn path=/head/; revision=334626
* Remove architecture specific shmat.S files.Brooks Davis2018-04-052-42/+0
| | | | | | | | | | | | These files are identical to the generated system calls. In the case of MIPS, the file was already disconnected from the build. Submitted by: Ali Mashtizadeh <ali@mashtizadeh.com> Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D14976 Notes: svn path=/head/; revision=332080
* Remove architecture specific sigreturn.S files.Brooks Davis2018-04-042-41/+0
| | | | | | | | | | | | | All of these files are identical (modulo license blocks and VCS IDs) to the files generated by lib/libc/sys/Makefile.inc and serve no purpose. Reported by: Ali Mashtizadeh <ali@mashtizadeh.com> Reviewed by: kib Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14953 Notes: svn path=/head/; revision=332048
* Use unconditional jr (jump register) so cerror relocation offset fits.Ruslan Bukin2017-04-271-1/+3
| | | | | | | | | | This fixes libc build on riscv64sf. Reviewed by: jhb Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=317530
* Reduce duplicate NOASM and PSEUDO definitionsBrooks Davis2016-09-081-10/+1
| | | | | | | | | | | | | | | | The initial value of NOASM is nearly the same in all cases and the initial value of PSEUDO is the same in all cases so reduce duplication (and hopefully, future merge conflicts) by machine independent defaults. Also document the PSEUDO variable. Reviewed by: jhb, kib Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D7820 Notes: svn path=/head/; revision=305630
* Remove unusedd and obsolete openbsd_poll system call. (Phase 1)George V. Neville-Neil2016-08-181-1/+0
| | | | | | | | | Reported by: brooks Reviewed by: brooks,jhb Differential Revision: https://reviews.freebsd.org/D7548 Notes: svn path=/head/; revision=304395
* Replace use of the pipe(2) system call with pipe2(2) with a zero flagsBrooks Davis2016-06-222-58/+0
| | | | | | | | | | | | | | | | | | | value. This eliminates the need for machine dependant assembly wrappers for pipe(2). It also make passing an invalid address to pipe(2) return EFAULT rather than triggering a segfault. Document this behavior (which was already true for pipe2(2), but undocumented). Reviewed by: andrew Approved by: re (gjb) Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D6815 Notes: svn path=/head/; revision=302092
* Do not generate code for sbrk syscall -- sbrk support was removed.Ruslan Bukin2016-05-251-0/+1
| | | | | | | Pointed out by: andrew Notes: svn path=/head/; revision=300689
* Remove legacy brk and sbrk from RISC-V.Ruslan Bukin2016-05-253-159/+1
| | | | | | | | | Discussed with: andrew Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Notes: svn path=/head/; revision=300680
* Bring in initial libc and libstand support for RISC-V.Ruslan Bukin2016-01-179-0/+459
Reviewed by: andrew, emaste, kib Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Differential Revision: https://reviews.freebsd.org/D4943 Notes: svn path=/head/; revision=294227