aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2016-08-17 13:41:51 -0500
committerMark Hatle <mark.hatle@windriver.com>2016-08-17 13:45:34 -0500
commite09997c6839c6207f8ce303fd98001bbbdbd67f9 (patch)
treeb9bfd24d285a539260c605708e63c31ac43227b6
parent33be255d62af533189f1f7bc66c06602b703980a (diff)
downloadprelink-cross-e09997c6839c6207f8ce303fd98001bbbdbd67f9.tar.gz
prelink-cross-e09997c6839c6207f8ce303fd98001bbbdbd67f9.tar.bz2
prelink-cross-e09997c6839c6207f8ce303fd98001bbbdbd67f9.zip
src/rtld/dl-open.c: Change to work with older compilers
2016-08-17 Mark Hatle <mark.hatle@windriver.com> * src/rtld/dl-open.c: Change to work with older compilers Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r--ChangeLog3
-rw-r--r--src/rtld/ChangeLog3
-rw-r--r--src/rtld/dl-open.c9
3 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 548a848..6d693d2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2016-08-17 Mark Hatle <mark.hatle@windriver.com>
+ * src/rtld/dl-open.c: Change to work with older compilers
+
2016-06-03 Dave Lerner <dave.lerner@windriver.com>
* src/exec.c: New check_reorder_needed, section_reorder_fix functions
diff --git a/src/rtld/ChangeLog b/src/rtld/ChangeLog
index c53c6dd..0f77d9c 100644
--- a/src/rtld/ChangeLog
+++ b/src/rtld/ChangeLog
@@ -1,3 +1,6 @@
+2016-08-17 Mark Hatle <mark.hatle@windriver.com>
+ * dl-open.c: Change function to work with older compilers
+
2016-03-18 Donn Seeley <donn.seeley@windriver.com>
* rtld.c: rewrite build_local_scope to ensure breadth-first
processing
diff --git a/src/rtld/dl-open.c b/src/rtld/dl-open.c
index 070a3f5..de699a5 100644
--- a/src/rtld/dl-open.c
+++ b/src/rtld/dl-open.c
@@ -25,12 +25,14 @@ _dl_show_scope (struct link_map *l, int from)
{
_dl_debug_printf ("object=%s [%lu]\n",
DSO_FILENAME (l->l_name), 0UL);
- if (l->l_local_scope != NULL)
- for (int scope_cnt = from; l->l_local_scope[scope_cnt] != NULL; ++scope_cnt)
+ if (l->l_local_scope != NULL) {
+ int scope_cnt;
+ for (scope_cnt = from; l->l_local_scope[scope_cnt] != NULL; ++scope_cnt)
{
_dl_debug_printf (" scope %u:", scope_cnt);
- for (unsigned int cnt = 0; cnt < l->l_local_scope[scope_cnt]->r_nlist; ++cnt)
+ unsigned int cnt;
+ for (cnt = 0; cnt < l->l_local_scope[scope_cnt]->r_nlist; ++cnt)
if (*l->l_local_scope[scope_cnt]->r_list[cnt]->l_name)
_dl_debug_printf_c (" %s",
l->l_local_scope[scope_cnt]->r_list[cnt]->l_name);
@@ -39,6 +41,7 @@ _dl_show_scope (struct link_map *l, int from)
_dl_debug_printf_c ("\n");
}
+ }
else
_dl_debug_printf (" no scope\n");
_dl_debug_printf ("\n");