This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Avoid local PLT for dirfd
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andreas Jaeger <aj at suse dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 28 Feb 2012 13:55:22 +0100
- Subject: Re: Avoid local PLT for dirfd
- References: <201202281319.16335.aj@suse.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Feb 28, 2012 at 01:19:16PM +0100, Andreas Jaeger wrote:
> Running make check I noticed a local PLT failure:
>
> cat elf/check-localplt.out
> --- ../scripts/data/localplt-generic.data 2009-06-03 09:17:46.000000000 +0200
> +++ - 2012-02-28 12:16:38.670783466 +0100
> @@ -1,4 +1,5 @@
> libc.so: calloc
> +libc.so: dirfd
> libc.so: free
> libc.so: malloc
> libc.so: memalign
>
> I'm appending a patch to fix this. Tested on Linux/x86-64.
I'd say you should not introduce __dirfd, but instead just
add libc_hidden_proto (dirfd) (in include/dirent.h) and
libc_hidden_def (dirfd) (in the dirfd.c).
Then you don't need to adjust any users of that function.
> 2012-02-28 Andreas Jaeger <aj@suse.de>
>
>
> * dirent/dirfd.c: Rename dirfd to __dirfd, add weak_alias.
> * sysdeps/unix/dirfd.c: Likewise.
> * sysdeps/mach/hurd/dirfd.c: Likewise.
>
> * include/dirent.h: Add __dirfd prototype.
>
> * posix/glob.c (glob_in_dir): Avoid local PLT for dirfd.
> * io/fts.c (fts_build): Likewise.
> * io/ftw.c (__attribute): Likewise.
> * sysdeps/unix/sysv/linux/grantpt.c (close_all_fds): Likewise.
Jakub