aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/GLRO_dl_debug_mask.patch
blob: e858bfaeda86f8ede92e13a3a3f8e5fbe3e10181 (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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
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: git/elf/dl-open.c
===================================================================
--- git.orig/elf/dl-open.c	2014-08-27 05:03:59.732070587 +0000
+++ git/elf/dl-open.c	2014-08-27 05:05:25.656070587 +0000
@@ -147,7 +147,7 @@
 	  ns->_ns_main_searchlist->r_list[new_nlist++] = map;
 
 	  /* We modify the global scope.  Report this.  */
-	  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+	  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
 	    _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
 			      map->l_name, map->l_ns);
 	}
@@ -243,7 +243,7 @@
   if (__glibc_unlikely (new->l_searchlist.r_list != NULL))
     {
       /* Let the user know about the opencount.  */
-      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
 	_dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
 			  new->l_name, new->l_ns, new->l_direct_opencount);
 
@@ -294,7 +294,7 @@
   LIBC_PROBE (map_complete, 3, args->nsid, r, new);
 
   /* Print scope information.  */
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
     _dl_show_scope (new, 0);
 
   /* Only do lazy relocation if `LD_BIND_NOW' is not set.  */
@@ -511,7 +511,7 @@
 	}
 
       /* Print scope information.  */
-      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
 	_dl_show_scope (imap, from_scope);
     }
 
@@ -584,7 +584,7 @@
 #endif
 
   /* Let the user know about the opencount.  */
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
     _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
 		      new->l_name, new->l_ns, new->l_direct_opencount);
 }
Index: git/elf/rtld.c
===================================================================
--- git.orig/elf/rtld.c	2014-08-27 05:03:59.732070587 +0000
+++ git/elf/rtld.c	2014-08-27 05:12:33.812070587 +0000
@@ -321,7 +321,7 @@
     }
 #endif
 
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS))
     {
 #ifndef HP_TIMING_NONAVAIL
       print_statistics (&rtld_total_time);
@@ -1699,7 +1699,7 @@
 	 after relocation.  */
       struct link_map *l;
 
-      if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
+      if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
 	{
 	  struct r_scope_elem *scope = &main_map->l_searchlist;
 
@@ -1729,7 +1729,7 @@
 		_dl_printf ("\n");
 	    }
 	}
-      else if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
+      else if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
 	{
 	  /* Look through the dependencies of the main executable
 	     and determine which of them is not actually
@@ -1837,7 +1837,7 @@
 		    }
 		}
 
-	      if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
+	      if ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
 		  && rtld_multiple_ref)
 		{
 		  /* Mark the link map as not yet relocated again.  */
@@ -1970,7 +1970,7 @@
       if (r_list == r_listend && liblist == liblistend)
 	prelinked = true;
 
-      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
 	_dl_debug_printf ("\nprelink checking: %s\n",
 			  prelinked ? "ok" : "failed");
     }
@@ -1988,7 +1988,7 @@
   GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
 
   /* Print scope information.  */
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
     {
       _dl_debug_printf ("\nInitial object scopes\n");
 
@@ -2262,7 +2262,7 @@
 	    if (debopts[cnt].len == len
 		&& memcmp (dl_debug, debopts[cnt].name, len) == 0)
 	      {
-		GLRO(dl_debug_mask) |= debopts[cnt].mask;
+		GLRO_dl_debug_mask |= debopts[cnt].mask;
 		any_debug = 1;
 		break;
 	      }
@@ -2283,7 +2283,7 @@
       ++dl_debug;
     }
 
-  if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
+  if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
     {
       /* In order to get an accurate picture of whether a particular
 	 DT_NEEDED entry is actually used we have to process both
@@ -2291,7 +2291,7 @@
       GLRO(dl_lazy) = 0;
     }
 
-  if (GLRO(dl_debug_mask) & DL_DEBUG_HELP)
+  if (GLRO_dl_debug_mask & DL_DEBUG_HELP)
     {
       size_t cnt;
 
@@ -2490,7 +2490,7 @@
 	    {
 	      mode = trace;
 	      GLRO(dl_verbose) = 1;
-	      GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK;
+	      GLRO_dl_debug_mask |= DL_DEBUG_PRELINK;
 	      GLRO(dl_trace_prelink) = &envline[17];
 	    }
 	  break;
@@ -2537,7 +2537,7 @@
       if (__access ("/etc/suid-debug", F_OK) != 0)
 	{
 	  unsetenv ("MALLOC_CHECK_");
-	  GLRO(dl_debug_mask) = 0;
+	  GLRO_dl_debug_mask = 0;
 	}
 
       if (mode != normal)
Index: git/elf/dl-lookup.c
===================================================================
--- git.orig/elf/dl-lookup.c	2014-08-27 05:03:59.732070587 +0000
+++ git/elf/dl-lookup.c	2014-08-27 05:13:07.644070587 +0000
@@ -300,7 +300,7 @@
 	 hash table.  */
       if (__glibc_unlikely (tab->size))
 	{
-	  assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
+	  assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
 	  goto success;
 	}
 #endif
@@ -375,7 +375,7 @@
 	continue;
 
       /* Print some debugging info if wanted.  */
-      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS))
+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS))
 	_dl_debug_printf ("symbol=%s;  lookup in file=%s [%lu]\n",
 			  undef_name, DSO_FILENAME (map->l_name),
 			  map->l_ns);
@@ -698,7 +698,7 @@
 	}
 
       /* Display information if we are debugging.  */
-      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
 	_dl_debug_printf ("\
 \nfile=%s [%lu];  needed by %s [%lu] (relocation dependency)\n\n",
 			  DSO_FILENAME (map->l_name),
@@ -802,7 +802,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 : "";
@@ -873,7 +873,7 @@
   if (__glibc_unlikely (current_value.m->l_used == 0))
     current_value.m->l_used = 1;
 
-  if (__glibc_unlikely (GLRO(dl_debug_mask)
+  if (__glibc_unlikely (GLRO_dl_debug_mask
 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK)))
     _dl_debug_bindings (undef_name, undef_map, ref,
 			&current_value, version, type_class, protected);
@@ -938,7 +938,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'",
 			DSO_FILENAME (reference_name),
@@ -952,7 +952,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: git/elf/get-dynamic-info.h
===================================================================
--- git.orig/elf/get-dynamic-info.h	2014-08-27 05:03:59.732070587 +0000
+++ git/elf/get-dynamic-info.h	2014-08-27 05:03:59.728070587 +0000
@@ -157,7 +157,7 @@
 	 them. Therefore to avoid breaking existing applications the
 	 best we can do is add a warning during debugging with the
 	 intent of notifying the user of the problem.  */
-      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
+      if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)
 	  && l->l_flags_1 & ~DT_1_SUPPORTED_MASK)
 	_dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n",
 			  l->l_flags_1 & ~DT_1_SUPPORTED_MASK);
Index: git/csu/libc-start.c
===================================================================
--- git.orig/csu/libc-start.c	2014-08-27 04:59:01.412070587 +0000
+++ git/csu/libc-start.c	2014-08-27 05:09:28.936070587 +0000
@@ -238,7 +238,7 @@
 
   /* Call the initializer of the program, if any.  */
 #ifdef SHARED
-  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
+  if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
     GLRO(dl_debug_printf) ("\ninitialize program: %s\n\n", argv[0]);
 #endif
   if (init)
@@ -261,7 +261,7 @@
 #endif
 
 #ifdef SHARED
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
     GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
 #endif
 
Index: git/elf/dl-cache.c
===================================================================
--- git.orig/elf/dl-cache.c	2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-cache.c	2014-08-27 05:10:14.384070587 +0000
@@ -187,7 +187,7 @@
   const char *best;
 
   /* Print a message if the loading of libs is traced.  */
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
     _dl_debug_printf (" search cache=%s\n", LD_SO_CACHE);
 
   if (cache == NULL)
@@ -285,7 +285,7 @@
     }
 
   /* Print our result if wanted.  */
-  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0)
+  if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0)
       && best != NULL)
     _dl_debug_printf ("  trying file=%s\n", best);
 
Index: git/elf/dl-close.c
===================================================================
--- git.orig/elf/dl-close.c	2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-close.c	2014-08-27 05:10:26.456070587 +0000
@@ -125,7 +125,7 @@
 	dl_close_state = rerun;
 
       /* There are still references to this object.  Do nothing more.  */
-      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
 	_dl_debug_printf ("\nclosing file=%s; direct_opencount=%u\n",
 			  map->l_name, map->l_direct_opencount);
 
@@ -257,7 +257,7 @@
 	  if (imap->l_init_called)
 	    {
 	      /* When debugging print a message first.  */
-	      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS,
+	      if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS,
 				    0))
 		_dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
 				  imap->l_name, nsid);
@@ -664,7 +664,7 @@
 	  free (imap->l_reldeps);
 
 	  /* Print debugging message.  */
-	  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+	  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
 	    _dl_debug_printf ("\nfile=%s [%lu];  destroying link map\n",
 			      imap->l_name, imap->l_ns);
 
Index: git/elf/dl-conflict.c
===================================================================
--- git.orig/elf/dl-conflict.c	2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-conflict.c	2014-08-27 05:10:37.652070587 +0000
@@ -32,7 +32,7 @@
 		       ElfW(Rela) *conflictend)
 {
 #if ! ELF_MACHINE_NO_RELA
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_RELOC))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_RELOC))
     _dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name));
 
   {
Index: git/elf/dl-deps.c
===================================================================
--- git.orig/elf/dl-deps.c	2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-deps.c	2014-08-27 05:10:48.260070587 +0000
@@ -127,7 +127,7 @@
 	    else							      \
 	      {								      \
 		/* This is for DT_AUXILIARY.  */			      \
-		if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))   \
+		if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))   \
 		  _dl_debug_printf (N_("\
 cannot load auxiliary `%s' because of empty dynamic string token "	      \
 					    "substitution\n"), __str);	      \
@@ -303,7 +303,7 @@
 		args.name = name;
 
 		/* Say that we are about to load an auxiliary library.  */
-		if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS,
+		if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS,
 				      0))
 		  _dl_debug_printf ("load auxiliary object=%s"
 				    " requested by file=%s\n",
@@ -520,7 +520,7 @@
       runp->map->l_reserved = 0;
     }
 
-  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK, 0) != 0
+  if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_PRELINK, 0) != 0
       && map == GL(dl_ns)[LM_ID_BASE]._ns_loaded)
     {
       /* If we are to compute conflicts, we have to build local scope
Index: git/elf/dl-error.c
===================================================================
--- git.orig/elf/dl-error.c	2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-error.c	2014-08-27 05:11:06.752070587 +0000
@@ -139,7 +139,7 @@
 _dl_signal_cerror (int errcode, const char *objname, const char *occation,
 		   const char *errstring)
 {
-  if (__builtin_expect (GLRO(dl_debug_mask)
+  if (__builtin_expect (GLRO_dl_debug_mask
 			& ~(DL_DEBUG_STATISTICS|DL_DEBUG_PRELINK), 0))
     _dl_debug_printf ("%s: error: %s: %s (%s)\n", objname, occation,
 		      errstring, receiver ? "continued" : "fatal");
Index: git/elf/dl-fini.c
===================================================================
--- git.orig/elf/dl-fini.c	2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-fini.c	2014-08-27 05:11:17.544070587 +0000
@@ -234,7 +234,7 @@
 		  || l->l_info[DT_FINI] != NULL)
 		{
 		  /* When debugging print a message first.  */
-		  if (__builtin_expect (GLRO(dl_debug_mask)
+		  if (__builtin_expect (GLRO_dl_debug_mask
 					& DL_DEBUG_IMPCALLS, 0))
 		    _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
 				      DSO_FILENAME (l->l_name),
@@ -286,7 +286,7 @@
       goto again;
     }
 
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS))
     _dl_debug_printf ("\nruntime linker statistics:\n"
 		      "           final number of relocations: %lu\n"
 		      "final number of relocations from cache: %lu\n",
Index: git/elf/dl-init.c
===================================================================
--- git.orig/elf/dl-init.c	2014-08-27 04:59:01.568070587 +0000
+++ git/elf/dl-init.c	2014-08-27 05:11:28.372070587 +0000
@@ -52,7 +52,7 @@
     return;
 
   /* Print a debug message if wanted.  */
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
     _dl_debug_printf ("\ncalling init: %s\n\n",
 		      DSO_FILENAME (l->l_name));
 
@@ -102,7 +102,7 @@
       ElfW(Addr) *addrs;
       unsigned int cnt;
 
-      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
 	_dl_debug_printf ("\ncalling preinit: %s\n\n",
 			  DSO_FILENAME (main_map->l_name));
 
Index: git/elf/dl-load.c
===================================================================
--- git.orig/elf/dl-load.c	2014-08-27 04:59:01.572070587 +0000
+++ git/elf/dl-load.c	2014-08-27 05:11:41.156070587 +0000
@@ -957,7 +957,7 @@
     }
 
   /* Print debugging message.  */
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
     _dl_debug_printf ("file=%s [%lu];  generating link map\n", name, nsid);
 
   /* This is the ELF header.  We read it in `open_verify'.  */
@@ -1361,7 +1361,7 @@
 
   l->l_entry += l->l_addr;
 
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
     _dl_debug_printf ("\
   dynamic: 0x%0*lx  base: 0x%0*lx   size: 0x%0*Zx\n\
     entry: 0x%0*lx  phdr: 0x%0*lx  phnum:   %*u\n\n",
@@ -1787,7 +1787,7 @@
 
       /* If we are debugging the search for libraries print the path
 	 now if it hasn't happened now.  */
-      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)
+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)
 	  && current_what != this_dir->what)
 	{
 	  current_what = this_dir->what;
@@ -1808,7 +1808,7 @@
 	     - buf);
 
 	  /* Print name we try if this is wanted.  */
-	  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
+	  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
 	    _dl_debug_printf ("  trying file=%s\n", buf);
 
 	  fd = open_verify (buf, fbp, loader, whatcode, mode,
@@ -1953,7 +1953,7 @@
     }
 
   /* Display information if we are debugging.  */
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES)
       && loader != NULL)
     _dl_debug_printf ((mode & __RTLD_CALLMAP) == 0
 		      ? "\nfile=%s [%lu];  needed by %s [%lu]\n"
@@ -1995,7 +1995,7 @@
 
       size_t namelen = strlen (name) + 1;
 
-      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
 	_dl_debug_printf ("find library=%s [%lu]; searching\n", name, nsid);
 
       fd = -1;
@@ -2122,7 +2122,7 @@
 			&realname, &fb, l, LA_SER_DEFAULT, &found_other_class);
 
       /* Add another newline when we are tracing the library loading.  */
-      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
 	_dl_debug_printf ("\n");
     }
   else
@@ -2155,7 +2155,7 @@
   if (__glibc_unlikely (fd == -1))
     {
       if (trace_mode
-	  && __glibc_likely ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) == 0))
+	  && __glibc_likely ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK) == 0))
 	{
 	  /* We haven't found an appropriate library.  But since we
 	     are only interested in the list of libraries this isn't
Index: git/elf/dl-object.c
===================================================================
--- git.orig/elf/dl-object.c	2014-08-27 04:59:01.572070587 +0000
+++ git/elf/dl-object.c	2014-08-27 05:11:51.756070587 +0000
@@ -98,7 +98,7 @@
   new->l_type = type;
   /* If we set the bit now since we know it is never used we avoid
      dirtying the cache line later.  */
-  if ((GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) == 0)
+  if ((GLRO_dl_debug_mask & DL_DEBUG_UNUSED) == 0)
     new->l_used = 1;
   new->l_loader = loader;
 #if NO_TLS_OFFSET != 0
Index: git/elf/dl-reloc.c
===================================================================
--- git.orig/elf/dl-reloc.c	2014-08-27 04:59:01.572070587 +0000
+++ git/elf/dl-reloc.c	2014-08-27 05:12:07.056070587 +0000
@@ -183,7 +183,7 @@
       && __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0))
     lazy = 0;
 
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_RELOC))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_RELOC))
     _dl_debug_printf ("\nrelocation processing: %s%s\n",
 		      DSO_FILENAME (l->l_name), lazy ? " (lazy)" : "");
 
Index: git/elf/dl-version.c
===================================================================
--- git.orig/elf/dl-version.c	2014-08-27 04:59:01.608070587 +0000
+++ git/elf/dl-version.c	2014-08-27 05:12:19.568070587 +0000
@@ -82,7 +82,7 @@
   int result = 0;
 
   /* Display information about what we are doing while debugging.  */
-  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_VERSIONS))
+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_VERSIONS))
     _dl_debug_printf ("\
 checking for version `%s' in file %s [%lu] required by file %s [%lu]\n",
 		      string, DSO_FILENAME (map->l_name),