This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid local PLT for dirfd


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]