Deleted Added
full compact
setlogin.S (217106) setlogin.S (240178)
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(LIBC_SCCS) && !defined(lint)
34 .asciz "@(#)setlogin.s 5.2 (Berkeley) 4/12/91"
35#endif /* LIBC_SCCS and not lint */
36#include <machine/asm.h>
1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(LIBC_SCCS) && !defined(lint)
34 .asciz "@(#)setlogin.s 5.2 (Berkeley) 4/12/91"
35#endif /* LIBC_SCCS and not lint */
36#include <machine/asm.h>
37__FBSDID("$FreeBSD: head/lib/libc/amd64/sys/setlogin.S 217106 2011-01-07 16:08:40Z kib $");
37__FBSDID("$FreeBSD: head/lib/libc/amd64/sys/setlogin.S 240178 2012-09-06 20:59:49Z jilles $");
38
39#include "SYS.h"
40
41.globl CNAME(_logname_valid) /* in _getlogin() */
42
43 .weak _setlogin
44 .set _setlogin,__sys_setlogin
45 .weak setlogin
46 .set setlogin,__sys_setlogin
47ENTRY(__sys_setlogin)
48 mov $SYS_setlogin,%rax
49 KERNCALL
38
39#include "SYS.h"
40
41.globl CNAME(_logname_valid) /* in _getlogin() */
42
43 .weak _setlogin
44 .set _setlogin,__sys_setlogin
45 .weak setlogin
46 .set setlogin,__sys_setlogin
47ENTRY(__sys_setlogin)
48 mov $SYS_setlogin,%rax
49 KERNCALL
50 jb 1f
50 jb HIDENAME(cerror)
51#ifdef PIC
52 movq PIC_GOT(CNAME(_logname_valid)),%rdx
53 movl $0,(%rdx)
54#else
55 movl $0,CNAME(_logname_valid)(%rip)
56#endif
57 ret /* setlogin(name) */
51#ifdef PIC
52 movq PIC_GOT(CNAME(_logname_valid)),%rdx
53 movl $0,(%rdx)
54#else
55 movl $0,CNAME(_logname_valid)(%rip)
56#endif
57 ret /* setlogin(name) */
581:
59#ifdef PIC
60 movq PIC_GOT(HIDENAME(cerror)),%rdx
61 jmp *%rdx
62#else
63 jmp HIDENAME(cerror)
64#endif
65END(__sys_setlogin)
66
67 .section .note.GNU-stack,"",%progbits
58END(__sys_setlogin)
59
60 .section .note.GNU-stack,"",%progbits