diff options
author | jilles <jilles@FreeBSD.org> | 2013-08-17 19:24:58 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-08-17 19:24:58 +0000 |
commit | fd29e78a6864b1354fa628a2e1c86403f42edb1c (patch) | |
tree | e6e7bc14dde6fbd106d542a3999fdc26cb10ceea /lib/libc/amd64 | |
parent | a8298dcc377707c8e7f1295e9e503cad9057196e (diff) | |
download | FreeBSD-src-fd29e78a6864b1354fa628a2e1c86403f42edb1c.zip FreeBSD-src-fd29e78a6864b1354fa628a2e1c86403f42edb1c.tar.gz |
libc: Access _logname_valid more efficiently.
The variable _logname_valid is not exported via the version script;
therefore, change C and i386/amd64 assembler code to remove indirection
(which allowed interposition). This makes the code slightly smaller and
faster.
Also, remove #define PIC_GOT from i386/amd64 in !PIC mode. Without PIC,
there is no place containing the address of each variable, so there is no
possible definition for PIC_GOT.
Diffstat (limited to 'lib/libc/amd64')
-rw-r--r-- | lib/libc/amd64/sys/setlogin.S | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/libc/amd64/sys/setlogin.S b/lib/libc/amd64/sys/setlogin.S index a451491..73b5364 100644 --- a/lib/libc/amd64/sys/setlogin.S +++ b/lib/libc/amd64/sys/setlogin.S @@ -48,12 +48,7 @@ ENTRY(__sys_setlogin) mov $SYS_setlogin,%rax KERNCALL jb HIDENAME(cerror) -#ifdef PIC - movq PIC_GOT(CNAME(_logname_valid)),%rdx - movl $0,(%rdx) -#else movl $0,CNAME(_logname_valid)(%rip) -#endif ret /* setlogin(name) */ END(__sys_setlogin) |