Index: i386/stdlib/ldiv.S =================================================================== --- i386/stdlib/ldiv.S (revision 184546) +++ i386/stdlib/ldiv.S (revision 184549) @@ -39,3 +39,4 @@ movl %eax,4(%esp) movl %edx,8(%esp) ret +END(ldiv) Index: i386/stdlib/labs.S =================================================================== --- i386/stdlib/labs.S (revision 184546) +++ i386/stdlib/labs.S (revision 184549) @@ -44,3 +44,4 @@ jns 1f negl %eax 1: ret +END(labs) Index: i386/stdlib/div.S =================================================================== --- i386/stdlib/div.S (revision 184546) +++ i386/stdlib/div.S (revision 184549) @@ -36,3 +36,4 @@ movl %eax,4(%esp) movl %edx,8(%esp) ret +END(div) Index: i386/stdlib/abs.S =================================================================== --- i386/stdlib/abs.S (revision 184546) +++ i386/stdlib/abs.S (revision 184549) @@ -44,3 +44,4 @@ jns 1f negl %eax 1: ret +END(abs) Index: i386/SYS.h =================================================================== --- i386/SYS.h (revision 184546) +++ i386/SYS.h (revision 184549) @@ -44,13 +44,14 @@ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b -#define RSYSCALL(x) SYSCALL(x); ret +#define RSYSCALL(x) SYSCALL(x); ret; END(__CONCAT(__sys_,x)) #define PSEUDO(x) 2: PIC_PROLOGUE; jmp PIC_PLT(HIDENAME(cerror)); \ ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ - mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b; ret + mov __CONCAT($SYS_,x),%eax; KERNCALL; jb 2b; ret; \ + END(__CONCAT(__sys_,x)) /* gas messes up offset -- although we don't currently need it, do for BCS */ #define LCALL(x,y) .byte 0x9a ; .long y; .word x Index: i386/string/ffs.S =================================================================== --- i386/string/ffs.S (revision 184546) +++ i386/string/ffs.S (revision 184549) @@ -51,3 +51,4 @@ .align 2 L1: xorl %eax,%eax /* clear result */ ret +END(ffs) Index: i386/string/memcmp.S =================================================================== --- i386/string/memcmp.S (revision 184546) +++ i386/string/memcmp.S (revision 184549) @@ -73,3 +73,4 @@ popl %esi popl %edi ret +END(memcmp) Index: i386/string/bcmp.S =================================================================== --- i386/string/bcmp.S (revision 184546) +++ i386/string/bcmp.S (revision 184549) @@ -61,3 +61,4 @@ popl %esi popl %edi ret +END(bcmp) Index: i386/string/bzero.S =================================================================== --- i386/string/bzero.S (revision 184546) +++ i386/string/bzero.S (revision 184549) @@ -79,3 +79,4 @@ popl %ebx popl %edi ret +END(bzero) Index: i386/string/strcpy.S =================================================================== --- i386/string/strcpy.S (revision 184546) +++ i386/string/strcpy.S (revision 184549) @@ -87,3 +87,4 @@ jne L1 L2: popl %eax /* pop dst address */ ret +END(strcpy) Index: i386/string/strncmp.S =================================================================== --- i386/string/strncmp.S (revision 184546) +++ i386/string/strncmp.S (revision 184549) @@ -164,3 +164,4 @@ L4: xorl %eax,%eax popl %ebx ret +END(strncmp) Index: i386/string/strrchr.S =================================================================== --- i386/string/strrchr.S (revision 184546) +++ i386/string/strrchr.S (revision 184549) @@ -62,3 +62,4 @@ jne L1 popl %ebx ret +END(strrchr) Index: i386/string/wcschr.S =================================================================== --- i386/string/wcschr.S (revision 184546) +++ i386/string/wcschr.S (revision 184549) @@ -74,3 +74,4 @@ no: popl %ebx xorl %eax,%eax ret +END(wcschr) Index: i386/string/rindex.S =================================================================== --- i386/string/rindex.S (revision 184546) +++ i386/string/rindex.S (revision 184549) @@ -62,3 +62,4 @@ jne L1 popl %ebx ret +END(rindex) Index: i386/string/memset.S =================================================================== --- i386/string/memset.S (revision 184546) +++ i386/string/memset.S (revision 184549) @@ -87,3 +87,4 @@ popl %ebx popl %edi ret +END(memset) Index: i386/string/wcslen.S =================================================================== --- i386/string/wcslen.S (revision 184546) +++ i386/string/wcslen.S (revision 184549) @@ -66,3 +66,4 @@ found1: incl %eax found0: popl %ebx ret +END(wcslen) Index: i386/string/wcscmp.S =================================================================== --- i386/string/wcscmp.S (revision 184546) +++ i386/string/wcscmp.S (revision 184549) @@ -77,3 +77,4 @@ popl %esi popl %edi ret +END(wcscmp) Index: i386/string/swab.S =================================================================== --- i386/string/swab.S (revision 184546) +++ i386/string/swab.S (revision 184549) @@ -97,3 +97,4 @@ L4: popl %edi popl %esi ret +END(swab) Index: i386/string/strcat.S =================================================================== --- i386/string/strcat.S (revision 184546) +++ i386/string/strcat.S (revision 184549) @@ -98,3 +98,4 @@ L2: popl %eax /* pop destination address */ popl %edi /* restore edi */ ret +END(strcat) Index: i386/string/wmemchr.S =================================================================== --- i386/string/wmemchr.S (revision 184546) +++ i386/string/wmemchr.S (revision 184549) @@ -103,3 +103,4 @@ popl %ebx popl %edi ret +END(wmemchr) Index: i386/string/strchr.S =================================================================== --- i386/string/strchr.S (revision 184546) +++ i386/string/strchr.S (revision 184549) @@ -61,3 +61,4 @@ L2: popl %ebx ret +END(strchr) Index: i386/string/index.S =================================================================== --- i386/string/index.S (revision 184546) +++ i386/string/index.S (revision 184549) @@ -61,3 +61,4 @@ L2: popl %ebx ret +END(index) Index: i386/string/strlen.S =================================================================== --- i386/string/strlen.S (revision 184546) +++ i386/string/strlen.S (revision 184549) @@ -51,3 +51,4 @@ leal -1(%ecx),%eax /* and subtracting one */ popl %edi ret +END(strlen) Index: i386/string/strcmp.S =================================================================== --- i386/string/strcmp.S (revision 184546) +++ i386/string/strcmp.S (revision 184549) @@ -117,3 +117,4 @@ movzbl (%edx),%edx subl %edx,%eax ret +END(strcmp) Index: i386/string/memchr.S =================================================================== --- i386/string/memchr.S (revision 184546) +++ i386/string/memchr.S (revision 184549) @@ -56,3 +56,4 @@ L1: xorl %eax,%eax popl %edi ret +END(memchr) Index: i386/string/bcopy.S =================================================================== --- i386/string/bcopy.S (revision 184546) +++ i386/string/bcopy.S (revision 184549) @@ -97,3 +97,12 @@ popl %esi cld ret +#ifdef MEMCOPY +END(memcpy) +#else +#ifdef MEMMOVE +END(memmove) +#else +END(bcopy) +#endif +#endif Index: i386/gen/_setjmp.S =================================================================== --- i386/gen/_setjmp.S (revision 184546) +++ i386/gen/_setjmp.S (revision 184549) @@ -58,6 +58,7 @@ fnstcw 24(%eax) xorl %eax,%eax ret +END(_setjmp) .weak CNAME(_longjmp) .set CNAME(_longjmp),CNAME(___longjmp) @@ -76,3 +77,4 @@ incl %eax 1: movl %ecx,0(%esp) ret +END(___longjmp) Index: i386/gen/setjmp.S =================================================================== --- i386/gen/setjmp.S (revision 184546) +++ i386/gen/setjmp.S (revision 184549) @@ -69,6 +69,7 @@ fnstcw 24(%ecx) xorl %eax,%eax ret +END(setjmp) .weak CNAME(longjmp) .set CNAME(longjmp),CNAME(__longjmp) @@ -96,3 +97,4 @@ incl %eax 1: movl %ecx,0(%esp) ret +END(__longjmp) Index: i386/gen/modf.S =================================================================== --- i386/gen/modf.S (revision 184546) +++ i386/gen/modf.S (revision 184549) @@ -82,3 +82,4 @@ fdivp /* return +/- 0 for +/- Inf, NaN for NaN */ leave ret +END(modf) Index: i386/gen/sigsetjmp.S =================================================================== --- i386/gen/sigsetjmp.S (revision 184546) +++ i386/gen/sigsetjmp.S (revision 184549) @@ -78,10 +78,11 @@ fnstcw 24(%ecx) xorl %eax,%eax ret +END(sigsetjmp) .weak CNAME(siglongjmp); - .set CNAME(siglongjmp),CNAME(__siglongjmp); -ENTRY(__siglongjmp); + .set CNAME(siglongjmp),CNAME(__siglongjmp) +ENTRY(__siglongjmp) movl 4(%esp),%edx cmpl $0,44(%edx) jz 2f @@ -108,3 +109,4 @@ incl %eax 1: movl %ecx,0(%esp) ret +END(__siglongjmp) Index: i386/gen/_ctx_start.S =================================================================== --- i386/gen/_ctx_start.S (revision 184546) +++ i386/gen/_ctx_start.S (revision 184549) @@ -49,3 +49,4 @@ call PIC_PLT(_ctx_done) /* should never return */ call PIC_PLT(abort) /* fubar */ ret +END(_ctx_start) Index: i386/gen/rfork_thread.S =================================================================== --- i386/gen/rfork_thread.S (revision 184546) +++ i386/gen/rfork_thread.S (revision 184549) @@ -115,3 +115,4 @@ popl %ebp PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) +END(rfork_thread) Index: i386/gen/fabs.S =================================================================== --- i386/gen/fabs.S (revision 184546) +++ i386/gen/fabs.S (revision 184549) @@ -40,3 +40,4 @@ fldl 4(%esp) fabs ret +END(fabs) Index: i386/sys/ptrace.S =================================================================== --- i386/sys/ptrace.S (revision 184546) +++ i386/sys/ptrace.S (revision 184549) @@ -55,3 +55,4 @@ err: PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) +END(ptrace) Index: i386/sys/brk.S =================================================================== --- i386/sys/brk.S (revision 184546) +++ i386/sys/brk.S (revision 184549) @@ -42,6 +42,7 @@ .globl HIDENAME(minbrk) ENTRY(_brk) jmp ok +END(_brk) ENTRY(brk) #ifdef PIC @@ -84,3 +85,4 @@ err: jmp HIDENAME(cerror) #endif +END(brk) Index: i386/sys/setlogin.S =================================================================== --- i386/sys/setlogin.S (revision 184546) +++ i386/sys/setlogin.S (revision 184549) @@ -52,3 +52,4 @@ movl $0,CNAME(_logname_valid) #endif ret /* setlogin(name) */ +END(setlogin) Index: i386/sys/getcontext.S =================================================================== --- i386/sys/getcontext.S (revision 184546) +++ i386/sys/getcontext.S (revision 184549) @@ -48,3 +48,4 @@ 1: PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) +END(__sys_getcontext) Index: i386/sys/reboot.S =================================================================== --- i386/sys/reboot.S (revision 184546) +++ i386/sys/reboot.S (revision 184549) @@ -40,3 +40,4 @@ SYSCALL(reboot) iret +END(reboot) Index: i386/sys/pipe.S =================================================================== --- i386/sys/pipe.S (revision 184546) +++ i386/sys/pipe.S (revision 184549) @@ -44,3 +44,4 @@ movl %edx,4(%ecx) movl $0,%eax ret +END(pipe) Index: i386/sys/sbrk.S =================================================================== --- i386/sys/sbrk.S (revision 184546) +++ i386/sys/sbrk.S (revision 184549) @@ -88,3 +88,4 @@ err: jmp HIDENAME(cerror) #endif /* PIC */ +END(sbrk) Index: i386/sys/Ovfork.S =================================================================== --- i386/sys/Ovfork.S (revision 184546) +++ i386/sys/Ovfork.S (revision 184549) @@ -52,3 +52,4 @@ pushl %ecx PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) +END(__sys_vfork) Index: i386/sys/exect.S =================================================================== --- i386/sys/exect.S (revision 184546) +++ i386/sys/exect.S (revision 184549) @@ -49,3 +49,4 @@ KERNCALL PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) /* exect(file, argv, env); */ +END(exect) Index: i386/sys/syscall.S =================================================================== --- i386/sys/syscall.S (revision 184546) +++ i386/sys/syscall.S (revision 184549) @@ -50,3 +50,4 @@ 1: PIC_PROLOGUE jmp PIC_PLT(HIDENAME(cerror)) +END(syscall) Index: amd64/stdlib/ldiv.S =================================================================== --- amd64/stdlib/ldiv.S (revision 184546) +++ amd64/stdlib/ldiv.S (revision 184549) @@ -13,3 +13,4 @@ cqto idivq %rsi ret +END(ldiv) Index: amd64/stdlib/div.S =================================================================== --- amd64/stdlib/div.S (revision 184546) +++ amd64/stdlib/div.S (revision 184549) @@ -15,3 +15,4 @@ salq $32,%rdx orq %rdx,%rax ret +END(div) Index: amd64/stdlib/lldiv.S =================================================================== --- amd64/stdlib/lldiv.S (revision 184546) +++ amd64/stdlib/lldiv.S (revision 184549) @@ -13,3 +13,4 @@ cqto idivq %rsi ret +END(lldiv) Index: amd64/SYS.h =================================================================== --- amd64/SYS.h (revision 184546) +++ amd64/SYS.h (revision 184549) @@ -43,13 +43,15 @@ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \ - 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx + 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx; \ + END(__CONCAT(__sys_,x)) #define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret ; \ - 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx + 2: movq PIC_GOT(HIDENAME(cerror)),%rcx; jmp *%rcx; \ + END(__CONCAT(__sys_,x)) #else #define RSYSCALL(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(x); \ @@ -57,13 +59,15 @@ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \ - 2: jmp HIDENAME(cerror) + 2: jmp HIDENAME(cerror); \ + END(__CONCAT(__sys_,x)) #define PSEUDO(x) ENTRY(__CONCAT(__sys_,x)); \ .weak CNAME(__CONCAT(_,x)); \ .set CNAME(__CONCAT(_,x)),CNAME(__CONCAT(__sys_,x)); \ mov __CONCAT($SYS_,x),%rax; KERNCALL; jb 2f; ret; \ - 2: jmp HIDENAME(cerror) + 2: jmp HIDENAME(cerror); \ + END(__CONCAT(__sys_,x)) #endif #define KERNCALL movq %rcx, %r10; syscall Index: amd64/string/memcmp.S =================================================================== --- amd64/string/memcmp.S (revision 184546) +++ amd64/string/memcmp.S (revision 184549) @@ -39,3 +39,4 @@ movb -1(%rsi),%dl subl %edx,%eax ret +END(memcmp) Index: amd64/string/strcat.S =================================================================== --- amd64/string/strcat.S (revision 184546) +++ amd64/string/strcat.S (revision 184549) @@ -163,3 +163,4 @@ .Ldone: ret +END(strcat) Index: amd64/string/bcmp.S =================================================================== --- amd64/string/bcmp.S (revision 184546) +++ amd64/string/bcmp.S (revision 184549) @@ -22,3 +22,4 @@ setne %al movsbl %al,%eax ret +END(bcmp) Index: amd64/string/bzero.S =================================================================== --- amd64/string/bzero.S (revision 184546) +++ amd64/string/bzero.S (revision 184549) @@ -41,3 +41,4 @@ stosb ret +END(bzero) Index: amd64/string/strcpy.S =================================================================== --- amd64/string/strcpy.S (revision 184546) +++ amd64/string/strcpy.S (revision 184549) @@ -109,3 +109,4 @@ .Ldone: ret +END(strcpy) Index: amd64/string/strcmp.S =================================================================== --- amd64/string/strcmp.S (revision 184546) +++ amd64/string/strcmp.S (revision 184549) @@ -71,3 +71,4 @@ movzbq %dl,%rdx subq %rdx,%rax ret +END(strcmp) Index: amd64/string/memset.S =================================================================== --- amd64/string/memset.S (revision 184546) +++ amd64/string/memset.S (revision 184549) @@ -58,3 +58,4 @@ movq %r11,%rax ret +END(memset) Index: amd64/string/bcopy.S =================================================================== --- amd64/string/bcopy.S (revision 184546) +++ amd64/string/bcopy.S (revision 184549) @@ -86,3 +86,12 @@ movsq cld ret +#ifdef MEMCOPY +END(memcpy) +#else +#ifdef MEMMOVE +END(memmove) +#else +END(bcopy) +#endif +#endif Index: amd64/gen/modf.S =================================================================== --- amd64/gen/modf.S (revision 184546) +++ amd64/gen/modf.S (revision 184549) @@ -86,3 +86,4 @@ movsd -8(%rsp),%xmm0 ret +END(modf) Index: amd64/gen/_setjmp.S =================================================================== --- amd64/gen/_setjmp.S (revision 184546) +++ amd64/gen/_setjmp.S (revision 184549) @@ -61,6 +61,7 @@ stmxcsr 68(%rax) /* and mxcsr */ xorq %rax,%rax ret +END(_setjmp) .weak CNAME(_longjmp) .set CNAME(_longjmp),CNAME(___longjmp) @@ -90,3 +91,4 @@ incq %rax 1: movq %rcx,0(%rsp) ret +END(___longjmp) Index: amd64/gen/setjmp.S =================================================================== --- amd64/gen/setjmp.S (revision 184546) +++ amd64/gen/setjmp.S (revision 184549) @@ -70,6 +70,7 @@ stmxcsr 68(%rcx) /* and mxcsr */ xorq %rax,%rax ret +END(setjmp) .weak CNAME(longjmp) .set CNAME(longjmp),CNAME(__longjmp) @@ -108,3 +109,4 @@ incq %rax 1: movq %rcx,0(%rsp) ret +END(__longjmp) Index: amd64/gen/sigsetjmp.S =================================================================== --- amd64/gen/sigsetjmp.S (revision 184546) +++ amd64/gen/sigsetjmp.S (revision 184549) @@ -77,6 +77,7 @@ fnstcw 64(%rcx) /* 8; fpu cw */ xorq %rax,%rax ret +END(sigsetjmp) .weak CNAME(siglongjmp) .set CNAME(siglongjmp),CNAME(__siglongjmp) @@ -109,3 +110,4 @@ incq %rax 1: movq %rcx,0(%rsp) ret +END(__siglongjmp) Index: amd64/gen/rfork_thread.S =================================================================== --- amd64/gen/rfork_thread.S (revision 184546) +++ amd64/gen/rfork_thread.S (revision 184549) @@ -99,3 +99,4 @@ #else jmp HIDENAME(cerror) #endif +END(rfork_thread) Index: amd64/gen/fabs.S =================================================================== --- amd64/gen/fabs.S (revision 184546) +++ amd64/gen/fabs.S (revision 184549) @@ -37,6 +37,7 @@ movsd signbit(%rip), %xmm0 andnpd %xmm1, %xmm0 ret +END(fabs) .data signbit: Index: amd64/sys/brk.S =================================================================== --- amd64/sys/brk.S (revision 184546) +++ amd64/sys/brk.S (revision 184549) @@ -43,6 +43,7 @@ ENTRY(_brk) pushq %rdi jmp ok +END(_brk) ENTRY(brk) pushq %rdi @@ -81,3 +82,4 @@ #else jmp HIDENAME(cerror) #endif +END(brk) Index: amd64/sys/ptrace.S =================================================================== --- amd64/sys/ptrace.S (revision 184546) +++ amd64/sys/ptrace.S (revision 184549) @@ -57,3 +57,4 @@ #else jmp HIDENAME(cerror) #endif +END(ptrace) Index: amd64/sys/getcontext.S =================================================================== --- amd64/sys/getcontext.S (revision 184546) +++ amd64/sys/getcontext.S (revision 184549) @@ -52,3 +52,4 @@ #else jmp HIDENAME(cerror) #endif +END(__sys_getcontext) Index: amd64/sys/setlogin.S =================================================================== --- amd64/sys/setlogin.S (revision 184546) +++ amd64/sys/setlogin.S (revision 184549) @@ -62,3 +62,4 @@ #else jmp HIDENAME(cerror) #endif +END(__sys_setlogin) Index: amd64/sys/vfork.S =================================================================== --- amd64/sys/vfork.S (revision 184546) +++ amd64/sys/vfork.S (revision 184549) @@ -56,3 +56,4 @@ #else jmp HIDENAME(cerror) #endif +END(__sys_vfork) Index: amd64/sys/reboot.S =================================================================== --- amd64/sys/reboot.S (revision 184546) +++ amd64/sys/reboot.S (revision 184549) @@ -54,3 +54,4 @@ #else jmp HIDENAME(cerror) #endif +END(__sys_reboot) Index: amd64/sys/pipe.S =================================================================== --- amd64/sys/pipe.S (revision 184546) +++ amd64/sys/pipe.S (revision 184549) @@ -57,3 +57,4 @@ #else jmp HIDENAME(cerror) #endif +END(__sys_pipe) Index: amd64/sys/sbrk.S =================================================================== --- amd64/sys/sbrk.S (revision 184546) +++ amd64/sys/sbrk.S (revision 184549) @@ -85,3 +85,4 @@ #else jmp HIDENAME(cerror) #endif +END(sbrk) Index: amd64/sys/exect.S =================================================================== --- amd64/sys/exect.S (revision 184546) +++ amd64/sys/exect.S (revision 184549) @@ -53,3 +53,4 @@ #else jmp HIDENAME(cerror) #endif +END(exect)