a8599e090f
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. Not exporting .cerror causes it to be jumped to directly instead of via the PLT. This change also takes advantage of .cerror's new status by not saving and loading %ebx before jumping to it. (Therefore, .cerror now saves and loads %ebx itself.) Where there was a conditional jump to a jump to .cerror, the conditional jump has been changed to jump to .cerror directly (many modern CPUs don't do static prediction and in any case it is not much of a benefit anyway). This change makes libc.so.7 a few kilobytes smaller. Reviewed by: kib
70 lines
922 B
Plaintext
70 lines
922 B
Plaintext
/*
|
|
* $FreeBSD$
|
|
*/
|
|
|
|
/*
|
|
* This only needs to contain symbols that are not listed in
|
|
* symbol maps from other parts of libc (i.e., not found in
|
|
* stdlib/Symbol.map, string/Symbol.map, sys/Symbol.map, ...).
|
|
*/
|
|
FBSD_1.0 {
|
|
/* PSEUDO syscalls */
|
|
_exit;
|
|
|
|
.mcount;
|
|
_setjmp;
|
|
_longjmp;
|
|
alloca;
|
|
fabs;
|
|
__flt_rounds;
|
|
__nan;
|
|
__infinity;
|
|
makecontext;
|
|
rfork_thread;
|
|
setjmp;
|
|
longjmp;
|
|
sigsetjmp;
|
|
siglongjmp;
|
|
htonl;
|
|
htons;
|
|
ntohl;
|
|
ntohs;
|
|
vfork;
|
|
brk;
|
|
exect;
|
|
i386_clr_watch;
|
|
i386_get_fsbase;
|
|
i386_get_gsbase;
|
|
i386_get_ioperm;
|
|
i386_get_ldt;
|
|
i386_set_fsbase;
|
|
i386_set_gsbase;
|
|
i386_set_ioperm;
|
|
i386_set_ldt;
|
|
i386_set_watch;
|
|
i386_vm86;
|
|
sbrk;
|
|
___tls_get_addr;
|
|
};
|
|
|
|
FBSDprivate_1.0 {
|
|
/* PSEUDO syscalls */
|
|
__sys_getlogin;
|
|
_getlogin;
|
|
__sys_exit;
|
|
|
|
_set_tp;
|
|
___longjmp;
|
|
__makecontext;
|
|
__longjmp;
|
|
__signalcontext;
|
|
signalcontext;
|
|
__siglongjmp;
|
|
__sys_vfork;
|
|
_vfork;
|
|
_end;
|
|
_brk;
|
|
.curbrk;
|
|
.minbrk;
|
|
};
|