[PATCH] Always set l_used for vDSO (BZ #13706)
Marek Polacek
polacek@redhat.com
Mon Feb 20 09:22:00 GMT 2012
As the PR says, ldd reports linux-vdso.so.1 as unused. The problem is that
we weren't always setting l_used for vDSO. This path seems to fix it.
Regtested on x86_64-linux, ok for trunk?
2012-02-20 Marek Polacek <polacek@redhat.com>
* elf/rtld.c (dl_main): Always set l_used to 1 for vDSO.
--- libc/elf/rtld.c.mp 2012-02-20 10:03:06.799226404 +0100
+++ libc/elf/rtld.c 2012-02-20 10:03:18.732248427 +0100
@@ -1,5 +1,5 @@
/* Run time dynamic linker.
- Copyright (C) 1995-2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -1375,6 +1375,9 @@ of this helper program; chances are you
_dl_setup_hash (l);
l->l_relocated = 1;
+ /* The vDSO is always used. */
+ l->l_used = 1;
+
/* Initialize l_local_scope to contain just this map. This allows
the use of dl_lookup_symbol_x to resolve symbols within the vdso.
So we create a single entry list pointing to l_real as its only
--- libc/NEWS.mp 2012-02-20 10:02:20.037140095 +0100
+++ libc/NEWS 2012-02-20 10:03:42.095291549 +0100
@@ -12,7 +12,7 @@ Version 2.16
174, 350, 411, 3335, 4026, 4596, 4822, 5077, 5805, 5993, 6884, 6907, 9739,
9902, 10140, 10210, 11174, 11322, 11494, 12047, 13058, 13525, 13526,
13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551, 13552,
- 13553, 13555, 13559, 13583, 13618, 13704
+ 13553, 13555, 13559, 13583, 13618, 13704, 13706
* ISO C11 support:
Marek
More information about the Libc-alpha
mailing list