summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-10-13 11:12:28 -0700
committerRoland McGrath <roland@hack.frob.com>2014-10-13 11:12:28 -0700
commit53544380266a8eb38bef9389562fba3ed58a0d11 (patch)
treed040f7c483990e8cf4bb8e11102f15c04a2f6514 /elf
parentfcb32af153a745414b0d949e707c9485ab77d6ba (diff)
downloadglibc-53544380266a8eb38bef9389562fba3ed58a0d11.tar.gz
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-cache.c2
-rw-r--r--elf/dl-deps.c8
-rw-r--r--elf/dl-fini.c6
-rw-r--r--elf/dl-iteratephdr.c3
-rw-r--r--elf/dl-sym.c8
-rw-r--r--elf/dl-version.c20
6 files changed, 22 insertions, 25 deletions
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index 91fef9578e..699d9474fe 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -75,8 +75,6 @@ do \
found. So we have to find the beginning. */ \
while (middle > 0) \
{ \
- __typeof__ (cache->libs[0].key) key; \
- \
key = cache->libs[middle - 1].key; \
/* Make sure string table indices are not bogus before \
using them. */ \
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index b34039c4da..00b184c891 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -629,11 +629,11 @@ Filters not supported with LD_TRACE_PRELINKING"));
unsigned int k = nlist - 1;
while (k > i)
{
- struct link_map **runp = l_initfini[k]->l_initfini;
- if (runp != NULL)
+ struct link_map **map_runp = l_initfini[k]->l_initfini;
+ if (map_runp != NULL)
/* Look through the dependencies of the object. */
- while (*runp != NULL)
- if (__glibc_unlikely (*runp++ == thisp))
+ while (*map_runp != NULL)
+ if (__glibc_unlikely (*map_runp++ == thisp))
{
/* Move the current object to the back past the last
object with it as the dependency. */
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
index c35577565e..aa0f82783c 100644
--- a/elf/dl-fini.c
+++ b/elf/dl-fini.c
@@ -101,7 +101,7 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
{
/* If a cycle exists with a link time dependency,
preserve the latter. */
- struct link_map **runp = thisp->l_initfini;
+ runp = thisp->l_initfini;
if (runp != NULL)
while (*runp != NULL)
if (__glibc_unlikely (*runp++ == maps[k]))
@@ -246,8 +246,8 @@ _dl_fini (void)
ElfW(Addr) *array =
(ElfW(Addr) *) (l->l_addr
+ l->l_info[DT_FINI_ARRAY]->d_un.d_ptr);
- unsigned int i = (l->l_info[DT_FINI_ARRAYSZ]->d_un.d_val
- / sizeof (ElfW(Addr)));
+ i = (l->l_info[DT_FINI_ARRAYSZ]->d_un.d_val
+ / sizeof (ElfW(Addr)));
while (i-- > 0)
((fini_t) array[i]) ();
}
diff --git a/elf/dl-iteratephdr.c b/elf/dl-iteratephdr.c
index 6572ec3a33..21e8760f06 100644
--- a/elf/dl-iteratephdr.c
+++ b/elf/dl-iteratephdr.c
@@ -33,7 +33,6 @@ int
__dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
size_t size, void *data), void *data)
{
- struct link_map *l;
struct dl_phdr_info info;
int ret = 0;
@@ -61,7 +60,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
}
#endif
- for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
+ for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
{
info.dlpi_addr = l->l_real->l_addr;
info.dlpi_name = l->l_real->l_name;
diff --git a/elf/dl-sym.c b/elf/dl-sym.c
index 69671c172f..205de4a950 100644
--- a/elf/dl-sym.c
+++ b/elf/dl-sym.c
@@ -154,11 +154,11 @@ do_sym (void *handle, const char *name, void *who,
RTLD_NEXT used in code not dynamically loaded"));
}
- struct link_map *l = match;
- while (l->l_loader != NULL)
- l = l->l_loader;
+ struct link_map *next = match;
+ while (next->l_loader != NULL)
+ next = next->l_loader;
- result = GLRO(dl_lookup_symbol_x) (name, match, &ref, l->l_local_scope,
+ result = GLRO(dl_lookup_symbol_x) (name, match, &ref, next->l_local_scope,
vers, 0, 0, match);
}
else
diff --git a/elf/dl-version.c b/elf/dl-version.c
index 525e9d52e5..735746c6a2 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -30,19 +30,19 @@
#define make_string(string, rest...) \
({ \
- const char *all[] = { string, ## rest }; \
- size_t len, cnt; \
- char *result, *cp; \
+ const char *_all[] = { string, ## rest }; \
+ size_t _len, _cnt; \
+ char *_result, *_cp; \
\
- len = 1; \
- for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt) \
- len += strlen (all[cnt]); \
+ _len = 1; \
+ for (_cnt = 0; _cnt < sizeof (_all) / sizeof (_all[0]); ++_cnt) \
+ _len += strlen (_all[_cnt]); \
\
- cp = result = alloca (len); \
- for (cnt = 0; cnt < sizeof (all) / sizeof (all[0]); ++cnt) \
- cp = __stpcpy (cp, all[cnt]); \
+ _cp = _result = alloca (_len); \
+ for (_cnt = 0; _cnt < sizeof (_all) / sizeof (_all[0]); ++_cnt) \
+ _cp = __stpcpy (_cp, _all[_cnt]); \
\
- result; \
+ _result; \
})