[uClibc-cvs] uClibc/ldso/ldso/sh elfinterp.c,1.9,1.10
Erik Andersen
andersen at uclibc.org
Sat Feb 14 11:54:07 UTC 2004
Update of /var/cvs/uClibc/ldso/ldso/sh
In directory nail:/home/andersen/CVS/uClibc/ldso/ldso/sh
Modified Files:
elfinterp.c
Log Message:
Give gcc branch prediction some hits on obviously unlikely branches
Index: elfinterp.c
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/sh/elfinterp.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- elfinterp.c 14 Feb 2004 11:30:36 -0000 1.9
+++ elfinterp.c 14 Feb 2004 11:54:05 -0000 1.10
@@ -136,7 +136,7 @@
strtab = (char *) (tpnt->dynamic_info[DT_STRTAB] + tpnt->loadaddr);
symname = strtab + symtab[symtab_index].st_name;
- if (reloc_type != R_SH_JMP_SLOT) {
+ if (unlikely(reloc_type != R_SH_JMP_SLOT)) {
_dl_dprintf(2, "%s: Incorrect relocation type in jump relocations\n",
_dl_progname);
_dl_exit(1);
@@ -150,7 +150,7 @@
/* Get the address of the GOT entry */
new_addr = _dl_find_hash(symname, tpnt->symbol_scope, ELF_RTYPE_CLASS_PLT);
- if (!new_addr) {
+ if (unlikely(!new_addr)) {
_dl_dprintf(2, "%s: can't resolve symbol '%s'\n", _dl_progname, symname);
_dl_exit(1);
}
@@ -222,7 +222,7 @@
if (symtab_index)
_dl_dprintf(2, "symbol '%s': ", strtab + symtab[symtab_index].st_name);
- if (res <0)
+ if (unlikely(res <0))
{
int reloc_type = ELF32_R_TYPE(rpnt->r_info);
#if defined (__SUPPORT_LD_DEBUG__)
@@ -232,7 +232,7 @@
#endif
_dl_exit(-res);
}
- else if (res >0)
+ if (unlikely(res >0))
{
_dl_dprintf(2, "can't resolve symbol\n");
return res;
More information about the uClibc-cvs
mailing list