]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blob - binutils/patches/binutils-2.23.51.0.5-pt-pax-flags-20121112.patch
9b476c3c21092d598e6bcf8c7fd2abed1e6ce783
[people/amarx/ipfire-3.x.git] / binutils / patches / binutils-2.23.51.0.5-pt-pax-flags-20121112.patch
1 --- binutils-2.23.51.0.5/bfd/elf-bfd.h
2 +++ binutils-2.23.51.0.5/bfd/elf-bfd.h
3 @@ -1577,6 +1577,9 @@ struct elf_obj_tdata
4 /* Segment flags for the PT_GNU_STACK segment. */
5 unsigned int stack_flags;
6
7 + /* Segment flags for the PT_PAX_FLAGS segment. */
8 + unsigned int pax_flags;
9 +
10 /* Symbol version definitions in external objects. */
11 Elf_Internal_Verdef *verdef;
12
13 --- binutils-2.23.51.0.5/bfd/elf.c
14 +++ binutils-2.23.51.0.5/bfd/elf.c
15 @@ -1158,6 +1158,7 @@ get_segment_type (unsigned int p_type)
16 case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
17 case PT_GNU_STACK: pt = "STACK"; break;
18 case PT_GNU_RELRO: pt = "RELRO"; break;
19 + case PT_PAX_FLAGS: pt = "PAX_FLAGS"; break;
20 default: pt = NULL; break;
21 }
22 return pt;
23 @@ -2477,6 +2478,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index)
24 case PT_GNU_RELRO:
25 return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "relro");
26
27 + case PT_PAX_FLAGS:
28 + return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "pax_flags");
29 +
30 default:
31 /* Check for any processor-specific program segment types. */
32 bed = get_elf_backend_data (abfd);
33 @@ -3551,6 +3555,11 @@ get_program_header_size (bfd *abfd, struct bfd_link_info *info)
34 ++segs;
35 }
36
37 + {
38 + /* We need a PT_PAX_FLAGS segment. */
39 + ++segs;
40 + }
41 +
42 for (s = abfd->sections; s != NULL; s = s->next)
43 {
44 if ((s->flags & SEC_LOAD) != 0
45 @@ -4153,6 +4162,20 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
46 }
47 }
48
49 + {
50 + amt = sizeof (struct elf_segment_map);
51 + m = bfd_zalloc (abfd, amt);
52 + if (m == NULL)
53 + goto error_return;
54 + m->next = NULL;
55 + m->p_type = PT_PAX_FLAGS;
56 + m->p_flags = elf_tdata (abfd)->pax_flags;
57 + m->p_flags_valid = 1;
58 +
59 + *pm = m;
60 + pm = &m->next;
61 + }
62 +
63 free (sections);
64 elf_tdata (abfd)->segment_map = mfirst;
65 }
66 @@ -5417,7 +5440,8 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
67 6. PT_TLS segment includes only SHF_TLS sections.
68 7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.
69 8. PT_DYNAMIC should not contain empty sections at the beginning
70 - (with the possible exception of .dynamic). */
71 + (with the possible exception of .dynamic).
72 + 9. PT_PAX_FLAGS segments do not include any sections. */
73 #define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed) \
74 ((((segment->p_paddr \
75 ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
76 @@ -5425,6 +5449,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
77 && (section->flags & SEC_ALLOC) != 0) \
78 || IS_NOTE (segment, section)) \
79 && segment->p_type != PT_GNU_STACK \
80 + && segment->p_type != PT_PAX_FLAGS \
81 && (segment->p_type != PT_TLS \
82 || (section->flags & SEC_THREAD_LOCAL)) \
83 && (segment->p_type == PT_LOAD \
84 --- binutils-2.23.51.0.5/bfd/elflink.c
85 +++ binutils-2.23.51.0.5/bfd/elflink.c
86 @@ -5545,17 +5545,30 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
87 && ! (*bed->elf_backend_always_size_sections) (output_bfd, info))
88 return FALSE;
89
90 + elf_tdata (output_bfd)->pax_flags = PF_NORANDEXEC;
91 + if (info->execheap)
92 + elf_tdata (output_bfd)->pax_flags |= PF_NOMPROTECT;
93 + else if (info->noexecheap)
94 + elf_tdata (output_bfd)->pax_flags |= PF_MPROTECT;
95 +
96 /* Determine any GNU_STACK segment requirements, after the backend
97 has had a chance to set a default segment size. */
98 if (info->execstack)
99 - elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
100 + {
101 + elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
102 + elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
103 + }
104 else if (info->noexecstack)
105 - elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
106 + {
107 + elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
108 + elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
109 + }
110 else
111 {
112 bfd *inputobj;
113 asection *notesec = NULL;
114 int exec = 0;
115
116 + elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
117 for (inputobj = info->input_bfds;
118 inputobj;
119 inputobj = inputobj->link_next)
120 @@ -5567,7 +5581,11 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
121 if (s)
122 {
123 if (s->flags & SEC_CODE)
124 - exec = PF_X;
125 + {
126 + elf_tdata (output_bfd)->pax_flags &= ~PF_NOEMUTRAMP;
127 + elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
128 + exec = PF_X;
129 + }
130 notesec = s;
131 }
132 else if (bed->default_execstack)
133 --- binutils-2.23.51.0.5/binutils/readelf.c
134 +++ binutils-2.23.51.0.5/binutils/readelf.c
135 @@ -2740,6 +2740,7 @@ get_segment_type (unsigned long p_type)
136 return "GNU_EH_FRAME";
137 case PT_GNU_STACK: return "GNU_STACK";
138 case PT_GNU_RELRO: return "GNU_RELRO";
139 + case PT_PAX_FLAGS: return "PAX_FLAGS";
140
141 default:
142 if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
143 --- binutils-2.23.51.0.5/include/bfdlink.h
144 +++ binutils-2.23.51.0.5/include/bfdlink.h
145 @@ -322,6 +322,14 @@ struct bfd_link_info
146 /* TRUE if PT_GNU_RELRO segment should be created. */
147 unsigned int relro: 1;
148
149 + /* TRUE if PT_PAX_FLAGS segment should be created with PF_NOMPROTECT
150 + flags. */
151 + unsigned int execheap: 1;
152 +
153 + /* TRUE if PT_PAX_FLAGS segment should be created with PF_MPROTECT
154 + flags. */
155 + unsigned int noexecheap: 1;
156 +
157 /* TRUE if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
158 should be created. */
159 unsigned int eh_frame_hdr: 1;
160 --- binutils-2.23.51.0.5/include/elf/common.h
161 +++ binutils-2.23.51.0.5/include/elf/common.h
162 @@ -429,6 +429,7 @@
163 #define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */
164 #define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
165 #define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
166 +#define PT_PAX_FLAGS (PT_LOOS + 0x5041580) /* PaX flags */
167 #define PT_GNU_SHR (PT_LOOS + 0x474e554) /* Sharable segment */
168
169 /* Program segment permissions, in program header p_flags field. */
170 @@ -439,6 +440,21 @@
171 #define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
172 #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
173
174 +/* Flags to control PaX behavior. */
175 +
176 +#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
177 +#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
178 +#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
179 +#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
180 +#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
181 +#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
182 +#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
183 +#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
184 +#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
185 +#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
186 +#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
187 +#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
188 +
189 /* Values for section header, sh_type field. */
190
191 #define SHT_NULL 0 /* Section header table entry unused */
192 --- binutils-2.23.51.0.5/ld/emultempl/elf32.em
193 +++ binutils-2.23.51.0.5/ld/emultempl/elf32.em
194 @@ -2285,6 +2285,16 @@ fragment <<EOF
195 link_info.noexecstack = TRUE;
196 link_info.execstack = FALSE;
197 }
198 + else if (strcmp (optarg, "execheap") == 0)
199 + {
200 + link_info.execheap = TRUE;
201 + link_info.noexecheap = FALSE;
202 + }
203 + else if (strcmp (optarg, "noexecheap") == 0)
204 + {
205 + link_info.noexecheap = TRUE;
206 + link_info.execheap = FALSE;
207 + }
208 EOF
209 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
210 fragment <<EOF
211 @@ -2368,6 +2378,8 @@ fragment <<EOF
212 -z defs Report unresolved symbols in object files.\n"));
213 fprintf (file, _("\
214 -z execstack Mark executable as requiring executable stack\n"));
215 + fprintf (file, _("\
216 + -z execheap Mark executable as requiring executable heap\n"));
217 EOF
218
219 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
220 @@ -2391,6 +2403,8 @@ fragment <<EOF
221 fragment <<EOF
222 fprintf (file, _("\
223 -z noexecstack Mark executable as not requiring executable stack\n"));
224 + fprintf (file, _("\
225 + -z noexecheap Mark executable as not requiring executable heap\n"));
226 EOF
227 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
228 fragment <<EOF
229 --- binutils-2.23.51.0.5/ld/ldgram.y
230 +++ binutils-2.23.51.0.5/ld/ldgram.y
231 @@ -1119,6 +1119,8 @@ phdr_type:
232 $$ = exp_intop (0x6474e550);
233 else if (strcmp (s, "PT_GNU_STACK") == 0)
234 $$ = exp_intop (0x6474e551);
235 + else if (strcmp (s, "PT_PAX_FLAGS") == 0)
236 + $$ = exp_intop (0x65041580);
237 else
238 {
239 einfo (_("\
240 --- binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlsbin.rd
241 +++ binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlsbin.rd
242 @@ -35,13 +35,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
243
244 Program Headers:
245 Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
246 - PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+150 R E 0x8
247 + PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+188 R E 0x8
248 INTERP +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
249 .*Requesting program interpreter.*
250 LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x10000
251 LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
252 DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
253 TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4
254 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
255 #...
256
257 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 3 entries:
258 --- binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlsbinr.rd
259 +++ binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlsbinr.rd
260 @@ -42,6 +42,7 @@ Program Headers:
261 +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
262 +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
263 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4
264 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
265 #...
266
267 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
268 --- binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlspic.rd
269 +++ binutils-2.23.51.0.5/ld/testsuite/ld-alpha/tlspic.rd
270 @@ -38,6 +38,7 @@ Program Headers:
271 +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
272 +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
273 +TLS +0x0+10e0 0x0+110e0 0x0+110e0 0x0+60 0x0+80 R +0x4
274 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
275 #...
276
277 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 7 entries:
278 --- binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh1.d
279 +++ binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh1.d
280 @@ -22,11 +22,11 @@ Contents of the .eh_frame section:
281 DW_CFA_nop
282 DW_CFA_nop
283
284 -00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
285 - DW_CFA_advance_loc: 0 to 00400078
286 +00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
287 + DW_CFA_advance_loc: 0 to [0-9a-f]+
288 DW_CFA_def_cfa_offset: 16
289 DW_CFA_offset: r6 \(rbp\) at cfa-16
290 - DW_CFA_advance_loc: 0 to 00400078
291 + DW_CFA_advance_loc: 0 to [0-9a-f]+
292 DW_CFA_def_cfa_register: r6 \(rbp\)
293
294 00000038 ZERO terminator
295 --- binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh2.d
296 +++ binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh2.d
297 @@ -22,11 +22,11 @@ Contents of the .eh_frame section:
298 DW_CFA_nop
299 DW_CFA_nop
300
301 -00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
302 - DW_CFA_advance_loc: 0 to 00400078
303 +00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
304 + DW_CFA_advance_loc: 0 to [0-9a-f]+
305 DW_CFA_def_cfa_offset: 16
306 DW_CFA_offset: r6 \(rbp\) at cfa-16
307 - DW_CFA_advance_loc: 0 to 00400078
308 + DW_CFA_advance_loc: 0 to [0-9a-f]+
309 DW_CFA_def_cfa_register: r6 \(rbp\)
310
311 00000038 ZERO terminator
312 --- binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh3.d
313 +++ binutils-2.23.51.0.5/ld/testsuite/ld-elf/eh3.d
314 @@ -22,11 +22,11 @@ Contents of the .eh_frame section:
315 DW_CFA_nop
316 DW_CFA_nop
317
318 -00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
319 - DW_CFA_advance_loc: 0 to 00400078
320 +00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
321 + DW_CFA_advance_loc: 0 to [0-9a-f]+
322 DW_CFA_def_cfa_offset: 16
323 DW_CFA_offset: r6 \(rbp\) at cfa-16
324 - DW_CFA_advance_loc: 0 to 00400078
325 + DW_CFA_advance_loc: 0 to [0-9a-f]+
326 DW_CFA_def_cfa_register: r6 \(rbp\)
327
328 00000038 ZERO terminator
329 --- binutils-2.23.51.0.5/ld/testsuite/ld-elf/orphan-region.d
330 +++ binutils-2.23.51.0.5/ld/testsuite/ld-elf/orphan-region.d
331 @@ -15,7 +15,9 @@
332 Program Headers:
333 Type.*
334 LOAD[ \t]+0x[0-9a-f]+ 0x0*40000000 0x0*40000000 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x[0-9a-f]+
335 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
336
337 Section to Segment mapping:
338 Segment Sections...
339 00 .text .rodata .moredata *
340 + 01 +
341 --- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsbin.rd
342 +++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsbin.rd
343 @@ -44,6 +44,7 @@ Program Headers:
344 +LOAD.*
345 +DYNAMIC.*
346 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
347 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
348
349 Section to Segment mapping:
350 +Segment Sections...
351 @@ -53,6 +54,7 @@ Program Headers:
352 +03 +.tdata .dynamic .got .got.plt *
353 +04 +.dynamic *
354 +05 +.tdata .tbss *
355 + +06 +
356
357 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
358 Offset +Info +Type +Sym.Value +Sym. Name
359 --- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsbindesc.rd
360 +++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsbindesc.rd
361 @@ -42,6 +42,7 @@ Program Headers:
362 +LOAD.*
363 +DYNAMIC.*
364 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
365 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
366
367 Section to Segment mapping:
368 +Segment Sections...
369 @@ -51,6 +52,7 @@ Program Headers:
370 +03 +.tdata .dynamic .got .got.plt *
371 +04 +.dynamic *
372 +05 +.tdata .tbss *
373 + +06 +
374
375 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
376 Offset +Info +Type +Sym.Value +Sym. Name
377 --- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsdesc.rd
378 +++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsdesc.rd
379 @@ -39,6 +39,7 @@ Program Headers:
380 +LOAD.*
381 +DYNAMIC.*
382 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
383 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
384
385 Section to Segment mapping:
386 +Segment Sections...
387 @@ -46,6 +47,7 @@ Program Headers:
388 +01 +.tdata .dynamic .got .got.plt *
389 +02 +.dynamic *
390 +03 +.tdata .tbss *
391 + +04 +
392
393 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
394 Offset +Info +Type +Sym.Value +Sym. Name
395 --- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsgdesc.rd
396 +++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsgdesc.rd
397 @@ -36,12 +36,14 @@ Program Headers:
398 +LOAD.*
399 +LOAD.*
400 +DYNAMIC.*
401 + +PAX_FLAGS.*
402
403 Section to Segment mapping:
404 +Segment Sections...
405 +00 +.hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text *
406 +01 +.dynamic .got .got.plt *
407 +02 +.dynamic *
408 + +03 +
409
410 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
411 Offset +Info +Type +Sym.Value +Sym. Name
412 --- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsnopic.rd
413 +++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlsnopic.rd
414 @@ -37,6 +37,7 @@ Program Headers:
415 +LOAD.*
416 +DYNAMIC.*
417 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+ 0x0+24 R +0x1
418 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
419
420 Section to Segment mapping:
421 +Segment Sections...
422 @@ -44,6 +45,7 @@ Program Headers:
423 +01 +.dynamic .got .got.plt *
424 +02 +.dynamic *
425 +03 +.tbss *
426 + +04 +
427
428 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
429 Offset +Info +Type +Sym.Value +Sym. Name
430 --- binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlspic.rd
431 +++ binutils-2.23.51.0.5/ld/testsuite/ld-i386/tlspic.rd
432 @@ -40,6 +40,7 @@ Program Headers:
433 +LOAD.*
434 +DYNAMIC.*
435 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
436 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
437
438 Section to Segment mapping:
439 +Segment Sections...
440 @@ -47,6 +48,7 @@ Program Headers:
441 +01 +.tdata .dynamic .got .got.plt *
442 +02 +.dynamic *
443 +03 +.tdata .tbss *
444 + +04 +
445
446 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 26 entries:
447 Offset +Info +Type +Sym.Value +Sym. Name
448 --- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge1.d
449 +++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge1.d
450 @@ -4,7 +4,7 @@
451 #objdump: -d
452
453 #...
454 -0+1e0 <.text>:
455 +[a-f0-9]+ <.text>:
456 [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
457 [ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1
458 [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
459 --- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge2.d
460 +++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge2.d
461 @@ -4,7 +4,7 @@
462 #objdump: -d
463
464 #...
465 -0+1e0 <.text>:
466 +[a-f0-9]+ <.text>:
467 [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
468 [ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1
469 [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
470 --- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge3.d
471 +++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge3.d
472 @@ -4,7 +4,7 @@
473 #objdump: -d
474
475 #...
476 -0+210 <.text>:
477 +[a-f0-9]+ <.text>:
478 [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
479 [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
480 [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
481 --- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge4.d
482 +++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge4.d
483 @@ -4,7 +4,7 @@
484 #objdump: -d
485
486 #...
487 -0+240 <.text>:
488 +[a-f0-9]+ <.text>:
489 [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
490 [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
491 [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
492 --- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge5.d
493 +++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/merge5.d
494 @@ -4,7 +4,7 @@
495 #objdump: -d
496
497 #...
498 -0+270 <.text>:
499 +[a-f0-9]+ <.text>:
500 [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
501 [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
502 [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
503 --- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/tlsbin.rd
504 +++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/tlsbin.rd
505 @@ -36,13 +36,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
506
507 Program Headers:
508 +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
509 - +PHDR +0x0+40 0x40+40 0x40+40 0x0+188 0x0+188 R E 0x8
510 - +INTERP +0x0+1c8 0x40+1c8 0x40+1c8 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
511 + +PHDR +0x0+40 0x40+40 0x40+40 (0x[0-9a-f]+) \1 R E 0x8
512 + +INTERP +0x0+([0-9a-f]+) (0x40+\1) \2 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
513 .*Requesting program interpreter.*
514 +LOAD +0x0+ 0x40+ 0x40+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ R E 0x10000
515 +LOAD +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+0[0-9a-f]+ 0x0+0[0-9a-f]+ RW +0x10000
516 +DYNAMIC +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+150 0x0+150 RW +0x8
517 +TLS +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+60 0x0+a0 R +0x4
518 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
519 +IA_64_UNWIND .* R +0x8
520 #...
521
522 --- binutils-2.23.51.0.5/ld/testsuite/ld-ia64/tlspic.rd
523 +++ binutils-2.23.51.0.5/ld/testsuite/ld-ia64/tlspic.rd
524 @@ -40,6 +40,7 @@ Program Headers:
525 +LOAD +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+0[0-9a-f]+ 0x0+0[0-9a-f]+ RW +0x10000
526 +DYNAMIC +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+140 0x0+140 RW +0x8
527 +TLS +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+60 0x0+80 R +0x4
528 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
529 +IA_64_UNWIND +0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+18 0x0+18 R +0x8
530 #...
531
532 --- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
533 +++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
534 @@ -8,9 +8,9 @@
535 .*: +file format.*
536
537 Disassembly of section \.text:
538 -004000b0 <[^>]*> 3c1c0043 lui gp,0x43
539 -004000b4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
540 -004000b8 <[^>]*> afbc0008 sw gp,8\(sp\)
541 +004000d0 <[^>]*> 3c1c0043 lui gp,0x43
542 +004000d4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
543 +004000d8 <[^>]*> afbc0008 sw gp,8\(sp\)
544 #...
545 00408d60 <[^>]*> 3c1c0043 lui gp,0x43
546 00408d64 <[^>]*> 279c2c98 addiu gp,gp,11416
547 --- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd
548 +++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd
549 @@ -1,7 +1,7 @@
550
551 Elf file type is DYN \(Shared object file\)
552 Entry point .*
553 -There are 5 program headers, starting at offset .*
554 +There are [0-9] program headers, starting at offset .*
555
556 Program Headers:
557 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
558 @@ -9,6 +9,7 @@ Program Headers:
559 * LOAD * [^ ]+ * 0x0+00000 * 0x0+00000 [^ ]+ * [^ ]+ * R E * 0x.*
560 * LOAD * [^ ]+ * 0x0+10000 * 0x0+10000 [^ ]+ * [^ ]+ * RW * 0x.*
561 * DYNAMIC * [^ ]+ * 0x0+00400 * 0x0+00400 .*
562 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
563 * NULL * .*
564
565 *Section to Segment mapping:
566 @@ -18,3 +19,4 @@ Program Headers:
567 *0*2 * \.data \.got *
568 *0*3 * \.dynamic *
569 *0*4 *
570 + *0*5 *
571 --- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd
572 +++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd
573 @@ -1,7 +1,7 @@
574
575 Elf file type is EXEC \(Executable file\)
576 Entry point 0x44000
577 -There are 8 program headers, starting at offset .*
578 +There are [0-9] program headers, starting at offset .*
579
580 Program Headers:
581 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
582 @@ -13,6 +13,7 @@ Program Headers:
583 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
584 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
585 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
586 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
587 * NULL * .*
588
589 *Section to Segment mapping:
590 @@ -25,3 +26,4 @@ Program Headers:
591 *0*5 *\.got \.data *
592 *0*6 *\.dynamic *
593 *0*7 *
594 + *0*8 *
595 --- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd
596 +++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd
597 @@ -1,7 +1,7 @@
598
599 Elf file type is EXEC \(Executable file\)
600 Entry point 0x44000
601 -There are 8 program headers, starting at offset .*
602 +There are [0-9] program headers, starting at offset .*
603
604 Program Headers:
605 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
606 @@ -13,6 +13,7 @@ Program Headers:
607 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
608 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
609 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
610 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
611 * NULL * .*
612
613 *Section to Segment mapping:
614 @@ -25,3 +26,4 @@ Program Headers:
615 *0*5 * \.got \.data \.bss *
616 *0*6 * \.dynamic *
617 *0*7 *
618 + *0*8 *
619 --- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd
620 +++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd
621 @@ -1,7 +1,7 @@
622
623 Elf file type is EXEC \(Executable file\)
624 Entry point 0x44000
625 -There are 8 program headers, starting at offset .*
626 +There are [0-9] program headers, starting at offset .*
627
628 Program Headers:
629 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
630 @@ -13,6 +13,7 @@ Program Headers:
631 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
632 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
633 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
634 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
635 * NULL * .*
636
637 *Section to Segment mapping:
638 @@ -25,3 +26,4 @@ Program Headers:
639 *0*5 * \.got \.data \.bss *
640 *0*6 * \.dynamic *
641 *0*7 *
642 + *0*8 *
643 --- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd
644 +++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd
645 @@ -1,7 +1,7 @@
646
647 Elf file type is EXEC \(Executable file\)
648 Entry point 0x44000
649 -There are 8 program headers, starting at offset .*
650 +There are [0-9] program headers, starting at offset .*
651
652 Program Headers:
653 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
654 @@ -13,6 +13,7 @@ Program Headers:
655 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
656 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
657 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
658 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
659 * NULL * .*
660
661 *Section to Segment mapping:
662 @@ -25,3 +26,4 @@ Program Headers:
663 *0*5 * \.got \.data \.bss *
664 *0*6 * \.dynamic *
665 *0*7 *
666 + *0*8 *
667 --- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd
668 +++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd
669 @@ -1,7 +1,7 @@
670
671 Elf file type is EXEC \(Executable file\)
672 Entry point 0x44000
673 -There are 7 program headers, starting at offset .*
674 +There are [0-9] program headers, starting at offset .*
675
676 Program Headers:
677 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
678 @@ -12,6 +12,7 @@ Program Headers:
679 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
680 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
681 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
682 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
683 * NULL * .*
684
685 *Section to Segment mapping:
686 @@ -23,3 +24,4 @@ Program Headers:
687 *0*4 * \.got \.data \.bss *
688 *0*5 * \.dynamic *
689 *0*6 *
690 + *0*7 *
691 --- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd
692 +++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd
693 @@ -1,7 +1,7 @@
694
695 Elf file type is EXEC \(Executable file\)
696 Entry point 0x44000
697 -There are 8 program headers, starting at offset .*
698 +There are [0-9] program headers, starting at offset .*
699
700 Program Headers:
701 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
702 @@ -13,6 +13,7 @@ Program Headers:
703 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
704 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
705 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
706 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
707 * NULL * .*
708
709 *Section to Segment mapping:
710 @@ -25,3 +26,4 @@ Program Headers:
711 *0*5 * \.got \.data \.bss *
712 *0*6 * \.dynamic *
713 *0*7 *
714 + *0*8 *
715 --- binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/tlsbin-o32.d
716 +++ binutils-2.23.51.0.5/ld/testsuite/ld-mips-elf/tlsbin-o32.d
717 @@ -2,42 +2,42 @@
718
719 Disassembly of section .text:
720
721 -004000d0 <__start>:
722 - 4000d0: 3c1c0fc0 lui gp,0xfc0
723 - 4000d4: 279c7f30 addiu gp,gp,32560
724 - 4000d8: 0399e021 addu gp,gp,t9
725 - 4000dc: 27bdfff0 addiu sp,sp,-16
726 - 4000e0: afbe0008 sw s8,8\(sp\)
727 - 4000e4: 03a0f021 move s8,sp
728 - 4000e8: afbc0000 sw gp,0\(sp\)
729 - 4000ec: 8f998018 lw t9,-32744\(gp\)
730 - 4000f0: 27848028 addiu a0,gp,-32728
731 - 4000f4: 0320f809 jalr t9
732 - 4000f8: 00000000 nop
733 - 4000fc: 8fdc0000 lw gp,0\(s8\)
734 - 400100: 00000000 nop
735 - 400104: 8f998018 lw t9,-32744\(gp\)
736 - 400108: 27848020 addiu a0,gp,-32736
737 - 40010c: 0320f809 jalr t9
738 - 400110: 00000000 nop
739 - 400114: 8fdc0000 lw gp,0\(s8\)
740 - 400118: 00401021 move v0,v0
741 - 40011c: 3c030000 lui v1,0x0
742 - 400120: 24638000 addiu v1,v1,-32768
743 - 400124: 00621821 addu v1,v1,v0
744 - 400128: 7c02283b rdhwr v0,\$5
745 - 40012c: 8f83801c lw v1,-32740\(gp\)
746 - 400130: 00000000 nop
747 - 400134: 00621821 addu v1,v1,v0
748 - 400138: 7c02283b rdhwr v0,\$5
749 - 40013c: 3c030000 lui v1,0x0
750 - 400140: 24639004 addiu v1,v1,-28668
751 - 400144: 00621821 addu v1,v1,v0
752 - 400148: 03c0e821 move sp,s8
753 - 40014c: 8fbe0008 lw s8,8\(sp\)
754 - 400150: 03e00008 jr ra
755 - 400154: 27bd0010 addiu sp,sp,16
756 +00400[0-9a-f]{3} <__start>:
757 + 400[0-9a-f]{3}: 3c1c0fc0 lui gp,0xfc0
758 + 400[0-9a-f]{3}: 279c7f30 addiu gp,gp,32560
759 + 400[0-9a-f]{3}: 0399e021 addu gp,gp,t9
760 + 400[0-9a-f]{3}: 27bdfff0 addiu sp,sp,-16
761 + 400[0-9a-f]{3}: afbe0008 sw s8,8\(sp\)
762 + 400[0-9a-f]{3}: 03a0f021 move s8,sp
763 + 400[0-9a-f]{3}: afbc0000 sw gp,0\(sp\)
764 + 400[0-9a-f]{3}: 8f998018 lw t9,-32744\(gp\)
765 + 400[0-9a-f]{3}: 27848028 addiu a0,gp,-32728
766 + 400[0-9a-f]{3}: 0320f809 jalr t9
767 + 400[0-9a-f]{3}: 00000000 nop
768 + 400[0-9a-f]{3}: 8fdc0000 lw gp,0\(s8\)
769 + 400[0-9a-f]{3}: 00000000 nop
770 + 400[0-9a-f]{3}: 8f998018 lw t9,-32744\(gp\)
771 + 400[0-9a-f]{3}: 27848020 addiu a0,gp,-32736
772 + 400[0-9a-f]{3}: 0320f809 jalr t9
773 + 400[0-9a-f]{3}: 00000000 nop
774 + 400[0-9a-f]{3}: 8fdc0000 lw gp,0\(s8\)
775 + 400[0-9a-f]{3}: 00401021 move v0,v0
776 + 400[0-9a-f]{3}: 3c030000 lui v1,0x0
777 + 400[0-9a-f]{3}: 24638000 addiu v1,v1,-32768
778 + 400[0-9a-f]{3}: 00621821 addu v1,v1,v0
779 + 400[0-9a-f]{3}: 7c02283b rdhwr v0,\$5
780 + 400[0-9a-f]{3}: 8f83801c lw v1,-32740\(gp\)
781 + 400[0-9a-f]{3}: 00000000 nop
782 + 400[0-9a-f]{3}: 00621821 addu v1,v1,v0
783 + 400[0-9a-f]{3}: 7c02283b rdhwr v0,\$5
784 + 400[0-9a-f]{3}: 3c030000 lui v1,0x0
785 + 400[0-9a-f]{3}: 24639004 addiu v1,v1,-28668
786 + 400[0-9a-f]{3}: 00621821 addu v1,v1,v0
787 + 400[0-9a-f]{3}: 03c0e821 move sp,s8
788 + 400[0-9a-f]{3}: 8fbe0008 lw s8,8\(sp\)
789 + 400[0-9a-f]{3}: 03e00008 jr ra
790 + 400[0-9a-f]{3}: 27bd0010 addiu sp,sp,16
791
792 -00400158 <__tls_get_addr>:
793 - 400158: 03e00008 jr ra
794 - 40015c: 00000000 nop
795 +00400[0-9a-f]{3} <__tls_get_addr>:
796 + 400[0-9a-f]{3}: 03e00008 jr ra
797 + 400[0-9a-f]{3}: 00000000 nop
798 --- binutils-2.23.51.0.5/ld/testsuite/ld-powerpc/tlsexe32.r
799 +++ binutils-2.23.51.0.5/ld/testsuite/ld-powerpc/tlsexe32.r
800 @@ -33,13 +33,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
801
802 Program Headers:
803 +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
804 - +PHDR +0x000034 0x01800034 0x01800034 0x000c0 0x000c0 R E 0x4
805 - +INTERP +0x0000f4 0x018000f4 0x018000f4 0x00011 0x00011 R +0x1
806 + +PHDR +0x000034 0x01800034 0x01800034 (0x000[0-9a-f]{2}) \1 R E 0x4
807 + +INTERP +0x000([0-9a-f]{3}) 0x01800\1 0x01800\1 0x00011 0x00011 R +0x1
808 +\[Requesting program interpreter: .*\]
809 +LOAD .* R E 0x10000
810 +LOAD .* RWE 0x10000
811 +DYNAMIC .* RW +0x4
812 +TLS .* 0x0001c 0x00038 R +0x4
813 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
814
815 Section to Segment mapping:
816 +Segment Sections\.\.\.
817 @@ -49,6 +50,7 @@ Program Headers:
818 +03 +\.tdata \.dynamic \.got \.plt
819 +04 +\.dynamic
820 +05 +\.tdata \.tbss
821 + +06 +
822
823 Relocation section '\.rela\.dyn' at offset .* contains 2 entries:
824 Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
825 --- binutils-2.23.51.0.5/ld/testsuite/ld-powerpc/tlsso32.r
826 +++ binutils-2.23.51.0.5/ld/testsuite/ld-powerpc/tlsso32.r
827 @@ -35,6 +35,7 @@ Program Headers:
828 +LOAD .* RWE 0x10000
829 +DYNAMIC .* RW +0x4
830 +TLS .* 0x0+1c 0x0+38 R +0x4
831 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
832
833 Section to Segment mapping:
834 +Segment Sections\.\.\.
835 @@ -42,6 +43,7 @@ Program Headers:
836 +01 +\.tdata \.dynamic \.got \.plt
837 +02 +\.dynamic
838 +03 +\.tdata \.tbss
839 + +04 +
840
841 Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
842 Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
843 @@ -52,9 +54,9 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
844 [0-9a-f ]+R_PPC_TPREL16 +0+30 +le0 \+ 0
845 [0-9a-f ]+R_PPC_TPREL16_HA +0+34 +le1 \+ 0
846 [0-9a-f ]+R_PPC_TPREL16_LO +0+34 +le1 \+ 0
847 -[0-9a-f ]+R_PPC_TPREL16 +0+103d0 +\.tdata \+ 103e4
848 -[0-9a-f ]+R_PPC_TPREL16_HA +0+103d0 +\.tdata \+ 103e8
849 -[0-9a-f ]+R_PPC_TPREL16_LO +0+103d0 +\.tdata \+ 103e8
850 +[0-9a-f ]+R_PPC_TPREL16 +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
851 +[0-9a-f ]+R_PPC_TPREL16_HA +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
852 +[0-9a-f ]+R_PPC_TPREL16_LO +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
853 [0-9a-f ]+R_PPC_DTPMOD32 +0
854 [0-9a-f ]+R_PPC_DTPREL32 +0
855 [0-9a-f ]+R_PPC_DTPMOD32 +0
856 --- binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlsbin.rd
857 +++ binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlsbin.rd
858 @@ -36,6 +36,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+
859 +LOAD .* RW +0x1000
860 +DYNAMIC .* RW +0x4
861 +TLS .* 0x0+60 0x0+a0 R +0x20
862 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
863
864 Section to Segment mapping:
865 +Segment Sections...
866 @@ -52,6 +53,7 @@ Program Headers:
867 +03 +.tdata .dynamic .got *
868 +04 +.dynamic *
869 +05 +.tdata .tbss *
870 + +06 +
871
872 Relocation section '.rela.dyn' at offset .* contains 4 entries:
873 Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
874 --- binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlsbin_64.rd
875 +++ binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlsbin_64.rd
876 @@ -36,6 +36,7 @@ There are [0-9]+ program headers, starting at offset [0-9]+
877 +LOAD .* RW +0x1000
878 +DYNAMIC .* RW +0x8
879 +TLS .* 0x0+60 0x0+a0 R +0x20
880 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
881
882 Section to Segment mapping:
883 +Segment Sections...
884 @@ -52,6 +53,7 @@ Program Headers:
885 +03 +.tdata .dynamic .got *
886 +04 +.dynamic *
887 +05 +.tdata .tbss *
888 + +06 +
889
890 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
891 +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
892 --- binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlspic.rd
893 +++ binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlspic.rd
894 @@ -39,6 +39,7 @@ Program Headers:
895 +LOAD .* RW +0x1000
896 +DYNAMIC .* RW +0x4
897 +TLS .* 0x0+60 0x0+80 R +0x20
898 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
899
900 Section to Segment mapping:
901 +Segment Sections...
902 @@ -46,6 +47,7 @@ Program Headers:
903 +01 +.tdata .dynamic .got
904 +02 +.dynamic
905 +03 +.tdata .tbss
906 + +04 +
907
908 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
909 Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
910 --- binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlspic_64.rd
911 +++ binutils-2.23.51.0.5/ld/testsuite/ld-s390/tlspic_64.rd
912 @@ -39,6 +39,7 @@ Program Headers:
913 +LOAD .* RW +0x1000
914 +DYNAMIC .* RW +0x8
915 +TLS .* 0x0+60 0x0+80 R +0x20
916 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
917
918 Section to Segment mapping:
919 +Segment Sections...
920 @@ -46,6 +47,7 @@ Program Headers:
921 +01 +.tdata .dynamic .got *
922 +02 +.dynamic *
923 +03 +.tdata .tbss *
924 + +04 +
925
926 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
927 +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
928 --- binutils-2.23.51.0.5/ld/testsuite/ld-sh/tlsbin-2.d
929 +++ binutils-2.23.51.0.5/ld/testsuite/ld-sh/tlsbin-2.d
930 @@ -44,6 +44,7 @@ Program Headers:
931 +LOAD.*
932 +DYNAMIC.*
933 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+18 0x0+28 R +0x4
934 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
935
936 Section to Segment mapping:
937 +Segment Sections\.\.\.
938 @@ -53,6 +54,7 @@ Program Headers:
939 +03 +\.tdata \.dynamic \.got *
940 +04 +\.dynamic *
941 +05 +\.tdata \.tbss *
942 + +06 +
943
944 Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
945 Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend
946 --- binutils-2.23.51.0.5/ld/testsuite/ld-sh/tlspic-2.d
947 +++ binutils-2.23.51.0.5/ld/testsuite/ld-sh/tlspic-2.d
948 @@ -32,7 +32,7 @@ Key to Flags:
949
950 Elf file type is DYN \(Shared object file\)
951 Entry point 0x[0-9a-f]+
952 -There are 4 program headers, starting at offset [0-9]+
953 +There are [0-9] program headers, starting at offset [0-9]+
954
955 Program Headers:
956 +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
957 @@ -40,6 +40,7 @@ Program Headers:
958 +LOAD.*
959 +DYNAMIC.*
960 +TLS .* 0x0+18 0x0+20 R +0x4
961 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
962
963 Section to Segment mapping:
964 +Segment Sections\.\.\.
965 @@ -47,6 +48,7 @@ Program Headers:
966 +01 +\.tdata \.dynamic \.got *
967 +02 +\.dynamic *
968 +03 +\.tdata \.tbss *
969 + +04 +
970
971 Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 10 entries:
972 Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend
973 --- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/gotop32.rd
974 +++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/gotop32.rd
975 @@ -31,6 +31,7 @@ Program Headers:
976 +LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x10000
977 +LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+2000 0x0+2000 RW +0x10000
978 +DYNAMIC +0x0+2000 0x0+12000 0x0+12000 0x0+70 0x0+70 RW +0x4
979 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
980 #...
981
982 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
983 --- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/gotop64.rd
984 +++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/gotop64.rd
985 @@ -31,6 +31,7 @@ Program Headers:
986 +LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x100000
987 +LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+2000 0x0+2000 RW +0x100000
988 +DYNAMIC +0x0+2000 0x0+102000 0x0+102000 0x0+e0 0x0+e0 RW +0x8
989 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
990 #...
991
992 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
993 --- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunbin32.rd
994 +++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunbin32.rd
995 @@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
996
997 Program Headers:
998 +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
999 - +PHDR +0x0+34 0x0+10034 0x0+10034 0x0+c0 0x0+c0 R E 0x4
1000 - +INTERP +0x0+f4 0x0+100f4 0x0+100f4 0x0+11 0x0+11 R +0x1
1001 + +PHDR +0x0+34 0x0+10034 0x0+10034 (0x[0-9a-f]+) \1 R E 0x4
1002 + +INTERP +(0x[0-9a-f]+ ){3}0x0+11 0x0+11 R +0x1
1003 .*Requesting program interpreter.*
1004 +LOAD .* R E 0x10000
1005 +LOAD .* RW +0x10000
1006 +DYNAMIC .* RW +0x4
1007 +TLS .* 0x0+1060 0x0+10a0 R +0x4
1008 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1009 #...
1010
1011 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
1012 --- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunbin64.rd
1013 +++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunbin64.rd
1014 @@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
1015
1016 Program Headers:
1017 +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
1018 - +PHDR +0x0+40 0x0+100040 0x0+100040 0x0+150 0x0+150 R E 0x8
1019 - +INTERP +0x0+190 0x0+100190 0x0+100190 0x0+19 0x0+19 R +0x1
1020 + +PHDR +0x0+40 0x0+100040 0x0+100040 (0x[0-9a-f]+) \1 R E 0x8
1021 + +INTERP +0x0+([0-9a-f]+) (0x0+10+\1) \2 0x0+19 0x0+19 R +0x1
1022 .*Requesting program interpreter.*
1023 +LOAD .* R E 0x100000
1024 +LOAD .* RW +0x100000
1025 +DYNAMIC .* RW +0x8
1026 +TLS .* 0x0+60 0x0+a0 R +0x4
1027 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1028 #...
1029
1030 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
1031 --- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunnopic32.rd
1032 +++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunnopic32.rd
1033 @@ -32,6 +32,7 @@ Program Headers:
1034 +LOAD .* RW +0x10000
1035 +DYNAMIC .* RW +0x4
1036 +TLS .* 0x0+ 0x0+24 R +0x4
1037 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1038 #...
1039
1040 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 12 entries:
1041 --- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunnopic64.rd
1042 +++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunnopic64.rd
1043 @@ -32,6 +32,7 @@ Program Headers:
1044 +LOAD .* RW +0x100000
1045 +DYNAMIC .* RW +0x8
1046 +TLS .* 0x0+ 0x0+24 R +0x4
1047 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1048 #...
1049
1050 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
1051 --- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunpic32.rd
1052 +++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunpic32.rd
1053 @@ -36,6 +36,7 @@ Program Headers:
1054 +LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+184 0x0+184 RWE 0x10000
1055 +DYNAMIC +0x0+2060 0x0+12060 0x0+12060 0x0+98 0x0+98 RW +0x4
1056 +TLS +0x0+2000 0x0+12000 0x0+12000 0x0+60 0x0+80 R +0x4
1057 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1058 #...
1059
1060 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
1061 --- binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunpic64.rd
1062 +++ binutils-2.23.51.0.5/ld/testsuite/ld-sparc/tlssunpic64.rd
1063 @@ -36,6 +36,7 @@ Program Headers:
1064 +LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+3a0 0x0+3a0 RWE 0x100000
1065 +DYNAMIC +0x0+2060 0x0+102060 0x0+102060 0x0+130 0x0+130 RW +0x8
1066 +TLS +0x0+2000 0x0+102000 0x0+102000 0x0+60 0x0+80 R +0x4
1067 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1068 #...
1069
1070 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
1071 --- binutils-2.23.51.0.5/ld/testsuite/ld-x86-64/tlsgdesc.rd
1072 +++ binutils-2.23.51.0.5/ld/testsuite/ld-x86-64/tlsgdesc.rd
1073 @@ -36,12 +36,14 @@ Program Headers:
1074 +LOAD.*
1075 +LOAD.*
1076 +DYNAMIC.*
1077 + +PAX_FLAGS.*
1078
1079 Section to Segment mapping:
1080 +Segment Sections...
1081 +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
1082 +01 +.dynamic .got .got.plt *
1083 +02 +.dynamic *
1084 + +03 +
1085
1086 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
1087 +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
1088 --- binutils-2.23.51.0.5/ld/testsuite/ld-x86-64/tlspic.rd
1089 +++ binutils-2.23.51.0.5/ld/testsuite/ld-x86-64/tlspic.rd
1090 @@ -40,6 +40,7 @@ Program Headers:
1091 +LOAD +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+244 0x0+244 RW +0x200000
1092 +DYNAMIC +0x0+1210 0x0+201210 0x0+201210 0x0+130 0x0+130 RW +0x8
1093 +TLS +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+60 0x0+80 R +0x1
1094 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1095
1096 Section to Segment mapping:
1097 +Segment Sections...
1098 @@ -47,6 +48,7 @@ Program Headers:
1099 +01 +.tdata .dynamic .got .got.plt *
1100 +02 +.dynamic *
1101 +03 +.tdata .tbss *
1102 + +04 +
1103
1104 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
1105 +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend