aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.16/GLRO_dl_debug_mask.patch
blob: 99cd812bc9dae069a438c0b7c6b9ebc984e5b131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
Its controlled by __OPTION_EGLIBC_RTLD_DEBUG
so we should use GLRO_dl_debug_mask

Singed-off-by: Khem Raj <raj.khem@gmail.com>

Upstream-Status: Pending
Index: libc/elf/dl-open.c
===================================================================
--- libc.orig/elf/dl-open.c	2012-07-04 18:26:34.000000000 -0700
+++ libc/elf/dl-open.c	2012-07-23 22:55:10.700072511 -0700
@@ -153,7 +153,7 @@
 	  ns->_ns_main_searchlist->r_list[new_nlist++] = map;
 
 	  /* We modify the global scope.  Report this.  */
-	  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+	  if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
 	    _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
 			      map->l_name, map->l_ns);
 	}
@@ -293,7 +293,7 @@
   _dl_debug_state ();
 
   /* Print scope information.  */
-  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+  if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
     _dl_show_scope (new, 0);
 
   /* Only do lazy relocation if `LD_BIND_NOW' is not set.  */
@@ -501,7 +501,7 @@
 	}
 
       /* Print scope information.  */
-      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+      if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
 	_dl_show_scope (imap, from_scope);
     }
 
Index: libc/ports/sysdeps/mips/dl-lookup.c
===================================================================
--- libc.orig/ports/sysdeps/mips/dl-lookup.c	2012-07-04 18:25:46.000000000 -0700
+++ libc/ports/sysdeps/mips/dl-lookup.c	2012-07-24 00:04:45.496274559 -0700
@@ -110,7 +110,7 @@
 	continue;
 
       /* Print some debugging info if wanted.  */
-      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0))
+      if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS, 0))
 	_dl_debug_printf ("symbol=%s;  lookup in file=%s [%lu]\n",
 			  undef_name,
 			  map->l_name[0] ? map->l_name : rtld_progname,
@@ -431,7 +431,7 @@
 		     hash table.  */
 		  if (__builtin_expect (tab->size, 0))
 		    {
-		      assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
+		      assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
 		      __rtld_lock_unlock_recursive (tab->lock);
 		      goto success;
 		    }
@@ -680,7 +680,7 @@
 	}
 
       /* Display information if we are debugging.  */
-      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
+      if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
 	_dl_debug_printf ("\
 \nfile=%s [%lu];  needed by %s [%lu] (relocation dependency)\n\n",
 			  map->l_name[0] ? map->l_name : rtld_progname,
@@ -787,7 +787,7 @@
     {
       if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
 	  && skip_map == NULL
-	  && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
+	  && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
 	{
 	  /* We could find no value for a strong reference.  */
 	  const char *reference_name = undef_map ? undef_map->l_name : "";
@@ -860,7 +860,7 @@
   if (__builtin_expect (current_value.m->l_used == 0, 0))
     current_value.m->l_used = 1;
 
-  if (__builtin_expect (GLRO(dl_debug_mask)
+  if (__builtin_expect (GLRO_dl_debug_mask
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK), 0))
     _dl_debug_bindings (undef_name, undef_map, ref,
 			&current_value, version, type_class, protected);
@@ -925,7 +925,7 @@
 {
   const char *reference_name = undef_map->l_name;
 
-  if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
+  if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS)
     {
       _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
 			(reference_name[0]
@@ -941,7 +941,7 @@
 	_dl_debug_printf_c ("\n");
     }
 #ifdef SHARED
-  if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
+  if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
     {
       int conflict = 0;
       struct sym_val val = { NULL, NULL };
Index: libc/elf/rtld.c
===================================================================
--- libc.orig/elf/rtld.c	2012-07-04 18:26:34.000000000 -0700
+++ libc/elf/rtld.c	2012-07-23 22:55:10.700072511 -0700
@@ -2214,7 +2214,7 @@
   GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
 
   /* Print scope information.  */
-  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES, 0))
+  if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_SCOPES, 0))
     {
       _dl_debug_printf ("\nInitial object scopes\n");
 
Index: libc/elf/dl-lookup.c
===================================================================
--- libc.orig/elf/dl-lookup.c	2012-07-04 18:26:35.000000000 -0700
+++ libc/elf/dl-lookup.c	2012-07-24 00:04:14.680273070 -0700
@@ -770,7 +770,7 @@
     {
       if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
 	  && skip_map == NULL
-	  && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
+	  && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
 	{
 	  /* We could find no value for a strong reference.  */
 	  const char *reference_name = undef_map ? undef_map->l_name : "";