diff options
author | jilles <jilles@FreeBSD.org> | 2012-09-06 20:59:49 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2012-09-06 20:59:49 +0000 |
commit | bd7319c0d8e9fd3f2becfb5f5c255627f777b178 (patch) | |
tree | 52129e8c46adddfb2fbbbad68f2b439bbbed0bec /lib/libc/amd64/sys/setlogin.S | |
parent | 0bc0a2586ce9caa8fbee0c1f134bff3f6dec4f15 (diff) | |
download | FreeBSD-src-bd7319c0d8e9fd3f2becfb5f5c255627f777b178.zip FreeBSD-src-bd7319c0d8e9fd3f2becfb5f5c255627f777b178.tar.gz |
libc/amd64: Do not export .cerror.
For some reason, libc exports the symbol .cerror (HIDENAME(cerror)), albeit
in the FBSDprivate_1.0 version. It looks like there is no reason for this
since it is not used from other libraries. Given that it cannot be accessed
from C and its strange calling convention, it is rather unlikely that other
things rely on it. Perhaps it is from a time when symbols could not be
hidden.
Most of the amd64 assembler code jumps to .cerror using the GOT. It can jump
to it directly now, as in non-PIC mode.
There are also some minor size optimizations to instructions but they yield
virtually no benefit in the size of libc.so.7 due to padding.
Reviewed by: kib
Diffstat (limited to 'lib/libc/amd64/sys/setlogin.S')
-rw-r--r-- | lib/libc/amd64/sys/setlogin.S | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/libc/amd64/sys/setlogin.S b/lib/libc/amd64/sys/setlogin.S index 23692b9..a451491 100644 --- a/lib/libc/amd64/sys/setlogin.S +++ b/lib/libc/amd64/sys/setlogin.S @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); ENTRY(__sys_setlogin) mov $SYS_setlogin,%rax KERNCALL - jb 1f + jb HIDENAME(cerror) #ifdef PIC movq PIC_GOT(CNAME(_logname_valid)),%rdx movl $0,(%rdx) @@ -55,13 +55,6 @@ ENTRY(__sys_setlogin) movl $0,CNAME(_logname_valid)(%rip) #endif ret /* setlogin(name) */ -1: -#ifdef PIC - movq PIC_GOT(HIDENAME(cerror)),%rdx - jmp *%rdx -#else - jmp HIDENAME(cerror) -#endif END(__sys_setlogin) .section .note.GNU-stack,"",%progbits |