aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch
blob: 6b611dbde7c6513e2182edd432db3615314e00bd (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
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
From ba069b3107f5ad200c4ab95e69cf368e2353b00a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:46:50 +0000
Subject: [PATCH 26/27] eglibc: dl_debug_mask is controlled by
 __OPTION_EGLIBC_RTLD_DEBUG

use GLRO_dl_debug_mask

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

Upstream-Status: Pending
---
 csu/libc-start.c       |  4 ++--
 elf/dl-cache.c         |  4 ++--
 elf/dl-close.c         |  6 +++---
 elf/dl-conflict.c      |  2 +-
 elf/dl-deps.c          |  6 +++---
 elf/dl-error.c         |  2 +-
 elf/dl-fini.c          |  4 ++--
 elf/dl-init.c          |  4 ++--
 elf/dl-load.c          | 16 ++++++++--------
 elf/dl-lookup.c        | 14 +++++++-------
 elf/dl-object.c        |  2 +-
 elf/dl-open.c          | 10 +++++-----
 elf/dl-reloc.c         |  2 +-
 elf/dl-version.c       |  2 +-
 elf/get-dynamic-info.h |  2 +-
 elf/rtld.c             | 22 +++++++++++-----------
 16 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/csu/libc-start.c b/csu/libc-start.c
index 0afa7c0..2151fb6 100644
--- a/csu/libc-start.c
+++ b/csu/libc-start.c
@@ -238,7 +238,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
 
   /* 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 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
 #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
 
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index 862f1d8..dab9c51 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -194,7 +194,7 @@ _dl_load_cache_lookup (const char *name)
   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)
@@ -292,7 +292,7 @@ _dl_load_cache_lookup (const char *name)
     }
 
   /* 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);
 
diff --git a/elf/dl-close.c b/elf/dl-close.c
index c897247..b1b4bd5 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -125,7 +125,7 @@ _dl_close_worker (struct link_map *map, bool force)
 	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);
 
@@ -269,7 +269,7 @@ _dl_close_worker (struct link_map *map, bool force)
 	  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);
@@ -711,7 +711,7 @@ _dl_close_worker (struct link_map *map, bool force)
 	  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);
 
diff --git a/elf/dl-conflict.c b/elf/dl-conflict.c
index 47a946e..e6a3f21 100644
--- a/elf/dl-conflict.c
+++ b/elf/dl-conflict.c
@@ -32,7 +32,7 @@ _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
 		       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));
 
   {
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index eee146a..1a4b004 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -127,7 +127,7 @@ empty dynamic string token substitution"));				      \
 	    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 @@ _dl_map_object_deps (struct link_map *map,
 		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 @@ _dl_map_object_deps (struct link_map *map,
       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
diff --git a/elf/dl-error.c b/elf/dl-error.c
index 0fc3fd8..ea82f4d 100644
--- a/elf/dl-error.c
+++ b/elf/dl-error.c
@@ -139,7 +139,7 @@ internal_function
 _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");
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
index 6cfe651..f59f7fe 100644
--- a/elf/dl-fini.c
+++ b/elf/dl-fini.c
@@ -234,7 +234,7 @@ _dl_fini (void)
 		  || 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 @@ _dl_fini (void)
       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",
diff --git a/elf/dl-init.c b/elf/dl-init.c
index 2f85731..e46e8b6 100644
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -46,7 +46,7 @@ call_init (struct link_map *l, int argc, char **argv, char **env)
     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));
 
@@ -96,7 +96,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
       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));
 
diff --git a/elf/dl-load.c b/elf/dl-load.c
index f664f50..8c28744 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -943,7 +943,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
     }
 
   /* 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'.  */
@@ -1347,7 +1347,7 @@ cannot enable executable stack as shared object requires");
 
   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",
@@ -1789,7 +1789,7 @@ open_path (const char *name, size_t namelen, int mode,
 
       /* 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;
@@ -1810,7 +1810,7 @@ open_path (const char *name, size_t namelen, int mode,
 	     - 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,
@@ -1955,7 +1955,7 @@ _dl_map_object (struct link_map *loader, const char *name,
     }
 
   /* 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"
@@ -1997,7 +1997,7 @@ _dl_map_object (struct link_map *loader, const char *name,
 
       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;
@@ -2119,7 +2119,7 @@ _dl_map_object (struct link_map *loader, const char *name,
 #endif
 
       /* 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
@@ -2152,7 +2152,7 @@ _dl_map_object (struct link_map *loader, const char *name,
   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
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 11cb44b..588c3e4 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -302,7 +302,7 @@ do_lookup_unique (const char *undef_name, uint_fast32_t new_hash,
 	 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
@@ -378,7 +378,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
 	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);
@@ -755,7 +755,7 @@ add_dependency (struct link_map *undef_map, struct link_map *map, int flags)
 	}
 
       /* 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),
@@ -859,7 +859,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
     {
       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 : "";
@@ -935,7 +935,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
   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);
@@ -1000,7 +1000,7 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
 {
   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),
@@ -1014,7 +1014,7 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
 	_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 };
diff --git a/elf/dl-object.c b/elf/dl-object.c
index 1d58bbc..938a257 100644
--- a/elf/dl-object.c
+++ b/elf/dl-object.c
@@ -98,7 +98,7 @@ _dl_new_object (char *realname, const char *libname, int type,
   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
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 2db1c02..1288604 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -147,7 +147,7 @@ add_to_global (struct link_map *new)
 	  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);
 	}
@@ -251,7 +251,7 @@ dl_open_worker (void *a)
   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);
 
@@ -302,7 +302,7 @@ dl_open_worker (void *a)
   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.  */
@@ -519,7 +519,7 @@ dl_open_worker (void *a)
 	}
 
       /* 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);
     }
 
@@ -577,7 +577,7 @@ TLS generation counter wrapped!  Please report this."));
 #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);
 }
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 61252d7..4c83815 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -178,7 +178,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
       && __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)" : "");
 
diff --git a/elf/dl-version.c b/elf/dl-version.c
index f6e5cd9..320628c 100644
--- a/elf/dl-version.c
+++ b/elf/dl-version.c
@@ -82,7 +82,7 @@ match_symbol (const char *name, Lmid_t ns, ElfW(Word) hash, const char *string,
   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),
diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h
index dc8359d..7774fda 100644
--- a/elf/get-dynamic-info.h
+++ b/elf/get-dynamic-info.h
@@ -166,7 +166,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
 	 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);
diff --git a/elf/rtld.c b/elf/rtld.c
index fc3a2db..59c4637 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -323,7 +323,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
     }
 #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);
@@ -1701,7 +1701,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
 	 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;
 
@@ -1731,7 +1731,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
 		_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
@@ -1839,7 +1839,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
 		    }
 		}
 
-	      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.  */
@@ -1972,7 +1972,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
       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");
     }
@@ -1990,7 +1990,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
   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");
 
@@ -2265,7 +2265,7 @@ process_dl_debug (const char *dl_debug)
 	    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;
 	      }
@@ -2286,7 +2286,7 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy);
       ++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
@@ -2294,7 +2294,7 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy);
       GLRO(dl_lazy) = 0;
     }
 
-  if (GLRO(dl_debug_mask) & DL_DEBUG_HELP)
+  if (GLRO_dl_debug_mask & DL_DEBUG_HELP)
     {
       size_t cnt;
 
@@ -2499,7 +2499,7 @@ process_envvars (enum mode *modep)
 	      mode = trace;
 	      GLRO(dl_verbose) = 1;
 #if __OPTION_EGLIBC_RTLD_DEBUG
-	      GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK;
+	      GLRO_dl_debug_mask |= DL_DEBUG_PRELINK;
 #endif
 	      GLRO(dl_trace_prelink) = &envline[17];
 	    }
@@ -2548,7 +2548,7 @@ process_envvars (enum mode *modep)
 	{
 	  unsetenv ("MALLOC_CHECK_");
 #if __OPTION_EGLIBC_RTLD_DEBUG
-	  GLRO(dl_debug_mask) = 0;
+	  GLRO_dl_debug_mask = 0;
 #endif
 	}
 
-- 
2.1.4