PowerPC: Fix ftime gettimeofday internal call returning bogus data
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Thu, 16 Jan 2014 12:53:18 +0000 (06:53 -0600)
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Thu, 16 Jan 2014 12:53:18 +0000 (06:53 -0600)
commit736c304a1ab4cee36a2f3343f1698bc0abae4608
tree63e4834af05375e2b1ef3b8c7db6515109edd6b8
parent94d0cea0ad2c225019736c2f18e1280eae50fa6c
PowerPC: Fix ftime gettimeofday internal call returning bogus data

This patches fixes BZ#16430 by setting a different symbol for internal
GLIBC calls that points to ifunc resolvers. For PPC32, if the symbol
is defined as hidden (which is the case for gettimeofday and time) the
compiler will create local branches (symbol@local) and linker will not
create PLT calls (required for IFUNC). This will leads to internal symbol
calling the IFUNC resolver instead of the resolved symbol.
For PPC64 this behavior does not occur because a call to a function in
another translation unit might use a different toc pointer thus requiring
a PLT call.
ChangeLog
sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
sysdeps/unix/sysv/linux/powerpc/time.c