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