Browse Source

Fix extra PLT reference in libc.so due to __glob64_time64 if build with gcc 7.5 on 32bit.

Starting with recent commit 84f7ce8447
"posix: Add glob64 with 64-bit time_t support", elf/check-localplt
fails due to extra PLT reference __glob64_time64 in __glob64_time64
itself.

This is observable with gcc 7.5 on x86_64 with -m32 or s390x with
-m31.  E.g. if build with gcc 10, gcc is generating a call to
__glob64_time64.localalias.

This patch is adding a hidden version of __glob64_time64 in the
same way as for __globfree64_time64.
codonell/c-utf8
Stefan Liebler 5 years ago
parent
commit
ba436665b1
  1. 1
      include/glob.h
  2. 1
      posix/glob64-time64.c
  3. 1
      sysdeps/unix/sysv/linux/glob64-time64.c

1
include/glob.h

@ -31,6 +31,7 @@ typedef struct
extern int __glob64_time64 (const char *pattern, int flags,
int (*errfunc) (const char *, int),
glob64_time64_t *pglob);
libc_hidden_proto (__glob64_time64)
void __globfree64_time64 (glob64_time64_t *pglob);
libc_hidden_proto (__globfree64_time64)
# endif

1
posix/glob64-time64.c

@ -43,6 +43,7 @@ __glob64_time64 (const char *pattern, int flags,
__set_errno (ENOSYS);
return GLOB_NOSYS;
}
libc_hidden_def (__glob64_time64)
stub_warning (glob64)

1
sysdeps/unix/sysv/linux/glob64-time64.c

@ -41,4 +41,5 @@
# define COMPILE_GLOB64 1
# include <posix/glob.c>
libc_hidden_def (__glob64_time64)
#endif

Loading…
Cancel
Save