OSDN Git Service

getutid: add a hidden def
authorMike Frysinger <vapier@gentoo.org>
Sat, 3 Dec 2011 17:16:56 +0000 (12:16 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 3 Dec 2011 17:18:30 +0000 (12:18 -0500)
The pututline func calls getutid, so add a hidden def for
it to avoid plt relocs:

$ readelf -r lib/libc.so.0
...
Relocation section '.rela.plt' at offset 0xb058 contains 11 entries:
  Offset          Info           Type           Sym. Value    Sym. Name + Addend
000000236000  01cf00000007 R_X86_64_JUMP_SLO 00000000000190ab getutid + 0
...

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
include/utmp.h
libc/misc/utmp/utent.c

index e80b65b..10b75c9 100644 (file)
@@ -78,6 +78,7 @@ libc_hidden_proto(endutent)
 /* Search forward from the current point in the utmp file until the
    next entry with a ut_type matching ID->ut_type.  */
 extern struct utmp *getutid (__const struct utmp *__id) __THROW;
+libc_hidden_proto(getutid)
 
 /* Search forward from the current point in the utmp file until the
    next entry with a ut_line matching LINE->ut_line.  */
index 11d6154..f97cad3 100644 (file)
@@ -146,6 +146,7 @@ struct utmp *getutid(const struct utmp *utmp_entry)
     return ret;
 }
 #endif
+libc_hidden_def(getutid)
 
 struct utmp *getutline(const struct utmp *utmp_entry)
 {