search for: __syscall_error

Displaying 15 results from an estimated 15 matches for "__syscall_error".

2006 Jun 26
0
[klibc 31/43] ppc support for klibc
...p diff --git a/usr/klibc/arch/ppc/syscall.S b/usr/klibc/arch/ppc/syscall.S new file mode 100644 index 0000000..0a7c37c --- /dev/null +++ b/usr/klibc/arch/ppc/syscall.S @@ -0,0 +1,16 @@ +/* + * arch/ppc/syscall.S + * + * Common error-handling path for system calls. + */ + + .text + .align 2 + .globl __syscall_error + .type __syscall_error, at function +__syscall_error: + lis 9,errno at ha + stw 3,errno at l(9) + li 3,-1 + blr + .size __syscall_error,.-__syscall_error diff --git a/usr/klibc/arch/ppc/sysstub.ph b/usr/klibc/arch/ppc/sysstub.ph new file mode 100644 index 0000000..3b3916c --- /dev/null +++ b/usr/k...
2019 Jan 21
0
[PATCH] ia64: Fix shared build
...6) st4 [r32] = r9 - ;; (p7) st4 [r14] = r8 + mov r8 = r15 br.ret.sptk.many b0 .endp pipe diff --git a/usr/klibc/arch/ia64/syscall.S b/usr/klibc/arch/ia64/syscall.S index 9929618..155fdd8 100644 --- a/usr/klibc/arch/ia64/syscall.S +++ b/usr/klibc/arch/ia64/syscall.S @@ -9,11 +9,9 @@ .proc __syscall_error .globl __syscall_error __syscall_error: - addl r2 = @ltoffx(errno),gp + movl r2 = errno ;; - ld8.mov r3 = [r2],errno - ;; - st4 [r3] = r8 + st4 [r2] = r8 mov r8 = -1 br.ret.sptk.many b0 .size __syscall_error, .-__syscall_error -- 1.8.5.3
2019 Jan 21
0
[klibc:master] ia64: Fix shared build
...6) st4 [r32] = r9 - ;; (p7) st4 [r14] = r8 + mov r8 = r15 br.ret.sptk.many b0 .endp pipe diff --git a/usr/klibc/arch/ia64/syscall.S b/usr/klibc/arch/ia64/syscall.S index 9929618..155fdd8 100644 --- a/usr/klibc/arch/ia64/syscall.S +++ b/usr/klibc/arch/ia64/syscall.S @@ -9,11 +9,9 @@ .proc __syscall_error .globl __syscall_error __syscall_error: - addl r2 = @ltoffx(errno),gp + movl r2 = errno ;; - ld8.mov r3 = [r2],errno - ;; - st4 [r3] = r8 + st4 [r2] = r8 mov r8 = -1 br.ret.sptk.many b0 .size __syscall_error, .-__syscall_error
2014 Sep 09
3
[PATCH] ppc64: ELFv2: Load TOC value in system call stub
...he current TOC. The problem happened with dynamically-linked binaries because: - the system call is an indirect call (via global entry point) from the binary to the shared library, landing in the syscall stub (which didn't load up r2 with the TOC of the shared library) - its branch to __syscall_error is a direct call (via local entry point) within the shared library, landing in the function (which expects r2 to be set up to that TOC) - when the function attempts to store errno (in an address relative to the TOC), that address incorrectly pointed to a read-only segment -- segmentation...
2006 Jun 26
0
[klibc 25/43] ia64 support for klibc
...b0 + .endp longjmp diff --git a/usr/klibc/arch/ia64/syscall.S b/usr/klibc/arch/ia64/syscall.S new file mode 100644 index 0000000..9929618 --- /dev/null +++ b/usr/klibc/arch/ia64/syscall.S @@ -0,0 +1,20 @@ +# +# arch/ia64/syscall.S +# + +#include <asm/unistd.h> + + .text + .align 32 + .proc __syscall_error + .globl __syscall_error +__syscall_error: + addl r2 = @ltoffx(errno),gp + ;; + ld8.mov r3 = [r2],errno + ;; + st4 [r3] = r8 + mov r8 = -1 + br.ret.sptk.many b0 + .size __syscall_error, .-__syscall_error + .endp __syscall_error diff --git a/usr/klibc/arch/ia64/sysstub.ph b/usr/klibc/arch/ia64/sysst...
2011 Mar 21
3
unbreak vfork on cris architecture
...onsequently block both the child and parent process from execution indefinitely. But if that?s a concern? fix it ? Waldemar is an integrator, not a libc hacker. He found a problem and a WFM-style fix, which at least improves the situation. By all means, replace the errno access with a jump to __syscall_error after setting up registers in a way that routine (from sysdeps/linux/cris/sysdep.S) expects it; I don?t know cris assembly but it doesn?t look _too_ hard? bye, //mirabilos -- FWIW, I'm quite impressed with mksh interactively. I thought it was much *much* more bare bones. But it turns out it b...
2006 Jun 26
0
[klibc 32/43] ppc64 support for klibc
...mp diff --git a/usr/klibc/arch/ppc64/syscall.c b/usr/klibc/arch/ppc64/syscall.c new file mode 100644 index 0000000..a5895fe --- /dev/null +++ b/usr/klibc/arch/ppc64/syscall.c @@ -0,0 +1,14 @@ +/* + * arch/ppc64/syscall.c + * + * Common error-handling path for system calls. + * The return value from __syscall_error becomes the + * return value from the system call. + */ +#include <errno.h> + +long int __syscall_error(long int err) +{ + errno = err; + return -1; +} diff --git a/usr/klibc/arch/ppc64/sysstub.ph b/usr/klibc/arch/ppc64/sysstub.ph new file mode 100644 index 0000000..9ee9370 --- /dev/null +++...
2013 Dec 03
0
[klibc:master] ppc64: Add ppc64le support
...- print OUT "\t.type .${fname},\@function\n"; - print OUT "\t.globl .${fname}\n"; - print OUT ".${fname}:\n"; - print OUT "\tli 0,__NR_${sname}\n"; - print OUT "\tsc\n"; - print OUT "\tbnslr\n"; - print OUT "\tb .__syscall_error\n"; - print OUT "\t.size .${fname},.-.${fname}\n"; + print OUT <<EOF; +#include <asm/unistd.h> + + .text + .balign 4 + .globl ${fname} +#if _CALL_ELF == 2 + .type ${fname},\@function +${fname}: +#else + .section ".opd","aw" + .balign 8 +${fname}:...
2013 Dec 03
2
[PATCH 1/2] ppc64: Add ppc64le support
...- print OUT "\t.type .${fname},\@function\n"; - print OUT "\t.globl .${fname}\n"; - print OUT ".${fname}:\n"; - print OUT "\tli 0,__NR_${sname}\n"; - print OUT "\tsc\n"; - print OUT "\tbnslr\n"; - print OUT "\tb .__syscall_error\n"; - print OUT "\t.size .${fname},.-.${fname}\n"; + print OUT <<EOF; +#include <asm/unistd.h> + + .text + .balign 4 + .globl ${fname} +#if _CALL_ELF == 2 + .type ${fname},\@function +${fname}: +#else + .section ".opd","aw" + .balign 8 +${fname}:...
2016 Jan 06
0
[klibc:master] ppc64: ELFv2: Load TOC value in system call stub
...he current TOC. The problem happened with dynamically-linked binaries because: - the system call is an indirect call (via global entry point) from the binary to the shared library, landing in the syscall stub (which didn't load up r2 with the TOC of the shared library) - its branch to __syscall_error is a direct call (via local entry point) within the shared library, landing in the function (which expects r2 to be set up to that TOC) - when the function attempts to store errno (in an address relative to the TOC), that address incorrectly pointed to a read-only segment -- segmentation...
2016 Jan 06
5
[PATCH klibc 0/5] klibc architecture fixes
Here's an assortment of build and run-time fixes for various architectures that we've applied in Debian. Ben. Aurelien Jarno (1): ppc64: fix struct stat Ben Hutchings (2): MIPS: Update archfcntl.h syscalls: Override detection of direct socket syscalls on i386, m68k, s390 Helge Deller (1): Add pread and pwrite 32bit syscall wrappers for parisc Mauricio Faria de Oliveira
2006 Jun 28
35
[klibc 00/31] klibc as a historyless patchset (updated and reorganized)
I have updated the klibc patchset based on feedback received. In particular, the patchset has been reorganized so as not to break git-bisect. Additionally, this updates the patch base to 2.6.17-git12 (d38b69689c349f35502b92e20dafb30c62d49d63) and klibc 1.4.8; the main difference on the klibc side is removal of obsolete code. This is also available as a git tree at:
2013 Oct 09
0
[PATCH 1/1] Porting klibc to AArch64
...w8,__NR_${sname}\n"; print OUT " svc 0\n"; + print OUT " b __syscall_common\n"; print OUT " .word __NR_${sname}\n"; print OUT " .size ${fname},.-${fname}\n"; -# branch if not set -# print OUT " b .__syscall_error\n"; -# print OUT " .size .${fname},.-.${fname}\n"; - } 1; diff --git a/usr/klibc/arch/aarch64/vfork.S b/usr/klibc/arch/aarch64/vfork.S index 378098c..23869d3 100644 --- a/usr/klibc/arch/aarch64/vfork.S +++ b/usr/klibc/arch/aarch64/vfork.S @@ -13,10 +13,35 @@ .globl...
2017 Aug 01
2
[RFC] Profile guided section layout
...onEv res_thread_freeres 9 _ZN3lld3elf11ScriptLexer7consumeEN4llvm9StringRefE res_thread_freeres 9 _ZN12_GLOBAL__N_112ScriptParser16readLinkerScriptEv res_thread_freeres 9 _ZN4llvm9BitVector6resizeEjb __realloc 9 _ZdlPvRKSt9nothrow_t __cfree 9 _GLOBAL__sub_I_SLPVectorizer.cpp __cxa_atexit 9 __access __syscall_error 9 _ZN4llvm3sys2fs6accessERKNS_5TwineENS1_10AccessModeE _ZNSt3_V216generic_categoryEv 9 _ZN4llvm12RegisterBankC2EjPKcjPKjj _ZN4llvm9BitVector9applyMaskILb1ELb0EEEvPKjj 9 _ZN4llvm12RegisterBankC2EjPKcjPKjj _ZN4llvm9BitVector6resizeEjb 9 _ZN12_GLOBAL__N_16WriterIN4llvm6object7ELFTypeILNS1_7support10en...
2017 Jul 31
2
[RFC] Profile guided section layout
A rebased version of the lld patch is attached. Cheers, Rafael On 31 July 2017 at 15:11, Rafael Avila de Espindola <rafael.espindola at gmail.com> wrote: > Tobias Edler von Koch <tobias at codeaurora.org> writes: > >> Hi Rafael, >> >> On 07/31/2017 04:20 PM, Rafael Avila de Espindola via llvm-dev wrote: >>> However, do we need to start with