Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/binutils/2.22.52.0.1: 03_all_binutils-2.15.92.0.2-ppc64-pie.patch 08_all_binutils-RPATH_ENVVAR-smack.patch 12_all_sh-targets.patch 20_all_ld-sysroot.patch 30_all_binutils-2.22-flexible-tests.patch 62_all_binutils-2.22-hardened-crtbegin.patch 63_all_binutils-2.22.52.0.1-pt-pax-flags-20120204.patch 65_all_binutils-2.20-amd64-32bit-path.patch 66_all_binutils-2.22.52.0.1-warn-textrel.patch 75_all_binutils-default-test-flags.patch 76_all_only-use-new-ld-dtags.patch.disabled 76_all_use-new-ld-dtags.patch 77_all_generate-gnu-hash.patch 78_all_use-relro.patch 91_all_libiberty-pic.patch README.history
Date: Sun, 05 Feb 2012 02:57:50
Message-Id: 20120205025739.703622004C@flycatcher.gentoo.org
1 vapier 12/02/05 02:57:39
2
3 Added: 03_all_binutils-2.15.92.0.2-ppc64-pie.patch
4 08_all_binutils-RPATH_ENVVAR-smack.patch
5 12_all_sh-targets.patch 20_all_ld-sysroot.patch
6 30_all_binutils-2.22-flexible-tests.patch
7 62_all_binutils-2.22-hardened-crtbegin.patch
8 63_all_binutils-2.22.52.0.1-pt-pax-flags-20120204.patch
9 65_all_binutils-2.20-amd64-32bit-path.patch
10 66_all_binutils-2.22.52.0.1-warn-textrel.patch
11 75_all_binutils-default-test-flags.patch
12 76_all_only-use-new-ld-dtags.patch.disabled
13 76_all_use-new-ld-dtags.patch
14 77_all_generate-gnu-hash.patch
15 78_all_use-relro.patch 91_all_libiberty-pic.patch
16 README.history
17 Log:
18 initial 2.22.52.0.1 patchset based on last 2.22 patchset
19
20 Revision Changes Path
21 1.1 src/patchsets/binutils/2.22.52.0.1/03_all_binutils-2.15.92.0.2-ppc64-pie.patch
22
23 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/03_all_binutils-2.15.92.0.2-ppc64-pie.patch?rev=1.1&view=markup
24 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/03_all_binutils-2.15.92.0.2-ppc64-pie.patch?rev=1.1&content-type=text/plain
25
26 Index: 03_all_binutils-2.15.92.0.2-ppc64-pie.patch
27 ===================================================================
28 --- bfd/elf64-ppc.c.jj 2004-09-27 16:46:06.000000000 -0400
29 +++ bfd/elf64-ppc.c 2004-10-04 09:09:50.000000000 -0400
30 @@ -9681,7 +9681,12 @@ ppc64_elf_relocate_section (bfd *output_
31 else if (!SYMBOL_REFERENCES_LOCAL (info, &h->elf)
32 && !is_opd
33 && r_type != R_PPC64_TOC)
34 - outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
35 + {
36 + outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
37 + if (h->elf.dynindx == -1
38 + && h->elf.root.type == bfd_link_hash_undefweak)
39 + memset (&outrel, 0, sizeof outrel);
40 + }
41 else
42 {
43 /* This symbol is local, or marked to become local,
44
45
46
47 1.1 src/patchsets/binutils/2.22.52.0.1/08_all_binutils-RPATH_ENVVAR-smack.patch
48
49 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/08_all_binutils-RPATH_ENVVAR-smack.patch?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/08_all_binutils-RPATH_ENVVAR-smack.patch?rev=1.1&content-type=text/plain
51
52 Index: 08_all_binutils-RPATH_ENVVAR-smack.patch
53 ===================================================================
54 http://sourceware.org/ml/binutils/2007-07/msg00401.html
55 http://sourceware.org/bugzilla/show_bug.cgi?id=4970
56
57 --- configure
58 +++ configure
59 @@ -5601,6 +5601,7 @@ case "${host}" in
60 *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
61 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
62 esac
63 +RPATH_ENVVAR="cant_touch_this_nah_nah_nah"
64
65 # On systems where the dynamic library environment variable is PATH,
66 if test "$RPATH_ENVVAR" = PATH; then
67
68
69
70 1.1 src/patchsets/binutils/2.22.52.0.1/12_all_sh-targets.patch
71
72 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/12_all_sh-targets.patch?rev=1.1&view=markup
73 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/12_all_sh-targets.patch?rev=1.1&content-type=text/plain
74
75 Index: 12_all_sh-targets.patch
76 ===================================================================
77 r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
78
79 Likewise, binutils has no idea about any of these new targets either, so we
80 fix that up too.. now we're able to actually build a real toolchain for
81 sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
82 inept targets than that one, really. Go look, I promise).
83
84 --- a/configure
85 +++ b/configure
86 @@ -1495,7 +1495,7 @@
87 mips*-*-*)
88 noconfigdirs="$noconfigdirs gprof"
89 ;;
90 - sh-*-* | sh64-*-*)
91 + sh*-*-* | sh64-*-*)
92 case "${target}" in
93 sh*-*-elf)
94 ;;
95 --- a/configure.ac
96 +++ b/configure.ac
97 @@ -712,7 +712,7 @@
98 mips*-*-*)
99 noconfigdirs="$noconfigdirs gprof"
100 ;;
101 - sh-*-* | sh64-*-*)
102 + sh*-*-* | sh64-*-*)
103 case "${target}" in
104 sh*-*-elf)
105 ;;
106
107
108
109 1.1 src/patchsets/binutils/2.22.52.0.1/20_all_ld-sysroot.patch
110
111 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/20_all_ld-sysroot.patch?rev=1.1&view=markup
112 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/20_all_ld-sysroot.patch?rev=1.1&content-type=text/plain
113
114 Index: 20_all_ld-sysroot.patch
115 ===================================================================
116 Signed-off-by: Sven Rebhan <odinshorse@××××××××××.com>
117
118 Always try to prepend the sysroot prefix to absolute filenames first.
119
120 http://bugs.gentoo.org/275666
121 http://sourceware.org/bugzilla/show_bug.cgi?id=10340
122
123 --- ld/ldfile.c
124 +++ ld/ldfile.c
125 @@ -308,18 +308,24 @@
126 directory first. */
127 if (! entry->is_archive)
128 {
129 - if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename))
130 + /* For absolute pathnames, try to always open the file in the
131 + sysroot first. If this fails, try to open the file at the
132 + given location. */
133 + entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE);
134 + if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted)
135 {
136 char *name = concat (ld_sysroot, entry->filename,
137 (const char *) NULL);
138 if (ldfile_try_open_bfd (name, entry))
139 {
140 entry->filename = name;
141 + entry->sysrooted = TRUE;
142 return TRUE;
143 }
144 free (name);
145 }
146 - else if (ldfile_try_open_bfd (entry->filename, entry))
147 +
148 + if (ldfile_try_open_bfd (entry->filename, entry))
149 {
150 entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename)
151 && is_sysrooted_pathname (entry->filename, TRUE);
152
153
154
155 1.1 src/patchsets/binutils/2.22.52.0.1/30_all_binutils-2.22-flexible-tests.patch
156
157 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/30_all_binutils-2.22-flexible-tests.patch?rev=1.1&view=markup
158 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/30_all_binutils-2.22-flexible-tests.patch?rev=1.1&content-type=text/plain
159
160 Index: 30_all_binutils-2.22-flexible-tests.patch
161 ===================================================================
162 making some of the address matches more flexible fixes tests when using
163 pax/relro/hash patches
164
165 --- binutils/ld/testsuite/ld-i386/hidden2.d
166 +++ binutils/ld/testsuite/ld-i386/hidden2.d
167 @@ -8,6 +8,6 @@
168 Disassembly of section .text:
169
170 [a-f0-9]+ <bar>:
171 -[ ]*[a-f0-9]+: e8 cf fe ff ff call 0 .*
172 +[ ]*[a-f0-9]+: e8 ([a-f0-9]{2} ){2}ff ff call 0 .*
173 [ ]*[a-f0-9]+: c3 ret
174 #pass
175 --- binutils/ld/testsuite/ld-x86-64/hidden2.d
176 +++ binutils/ld/testsuite/ld-x86-64/hidden2.d
177 @@ -8,6 +8,6 @@
178 Disassembly of section .text:
179
180 [a-f0-9]+ <bar>:
181 -[ ]*[a-f0-9]+: e8 33 fe ff ff callq 0 .*
182 +[ ]*[a-f0-9]+: e8 ([a-f0-9]{2} ){2}ff ff callq 0 .*
183 [ ]*[a-f0-9]+: c3 retq
184 #pass
185 --- binutils/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d
186 +++ binutils/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d
187 @@ -4,6 +4,6 @@
188 #target: x86_64-*-*
189
190 #...
191 -[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
192 -[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
193 +[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt>
194 +[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt>
195 #pass
196 --- binutils/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
197 +++ binutils/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
198 @@ -4,6 +4,6 @@
199 #target: x86_64-*-*
200
201 #...
202 -[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
203 -[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x220@plt>
204 +[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt>
205 +[ \t0-9a-f]+:[ \t0-9a-f]+lea[ \t]+.*\(%rip\),%rax.*[ \t0-9a-fq]+<\*ABS\*\+0x[a-f0-9]+@plt>
206 #pass
207
208
209
210 1.1 src/patchsets/binutils/2.22.52.0.1/62_all_binutils-2.22-hardened-crtbegin.patch
211
212 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/62_all_binutils-2.22-hardened-crtbegin.patch?rev=1.1&view=markup
213 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/62_all_binutils-2.22-hardened-crtbegin.patch?rev=1.1&content-type=text/plain
214
215 Index: 62_all_binutils-2.22-hardened-crtbegin.patch
216 ===================================================================
217 https://bugs.gentoo.org/391899
218 https://bugs.gentoo.org/393321
219
220 Make sure the default ELF linker script does the right thing with our customer
221 PIE+PIC gcc objects (until we get a chance to rename them).
222
223 2011-12-05 Magnus Granberg <zorry@g.o>, Alphat-PC <AlphatPC@×××××.com>
224
225 * scripttempl/elf.sc: Add support for crtbeginTS.o
226
227 --- a/ld/scripttempl/elf.sc
228 +++ b/ld/scripttempl/elf.sc
229 @@ -225,8 +225,8 @@
230 if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
231 SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
232 SORT_FINI_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))"
233 - CTORS_IN_INIT_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))"
234 - DTORS_IN_FINI_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))"
235 + CTORS_IN_INIT_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtbeginTS.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))"
236 + DTORS_IN_FINI_ARRAY="KEEP (*(EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtbeginTS.o *crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))"
237 else
238 SORT_INIT_ARRAY="KEEP (*(SORT(.init_array.*)))"
239 SORT_FINI_ARRAY="KEEP (*(SORT(.fini_array.*)))"
240 @@ -264,6 +264,7 @@
241
242 KEEP (*crtbegin.o(.ctors))
243 KEEP (*crtbegin?.o(.ctors))
244 + KEEP (*crtbeginTS.o(.ctors))
245
246 /* We don't want to include the .ctor section from
247 the crtend.o file until after the sorted ctors.
248 @@ -280,6 +281,7 @@
249 ${CONSTRUCTING+${DTOR_START}}
250 KEEP (*crtbegin.o(.dtors))
251 KEEP (*crtbegin?.o(.dtors))
252 + KEEP (*crtbeginTS.o(.dtors))
253 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
254 KEEP (*(SORT(.dtors.*)))
255 KEEP (*(.dtors))
256
257
258
259 1.1 src/patchsets/binutils/2.22.52.0.1/63_all_binutils-2.22.52.0.1-pt-pax-flags-20120204.patch
260
261 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/63_all_binutils-2.22.52.0.1-pt-pax-flags-20120204.patch?rev=1.1&view=markup
262 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/63_all_binutils-2.22.52.0.1-pt-pax-flags-20120204.patch?rev=1.1&content-type=text/plain
263
264 Index: 63_all_binutils-2.22.52.0.1-pt-pax-flags-20120204.patch
265 ===================================================================
266 --- binutils-2.22/bfd/elf-bfd.h
267 +++ binutils-2.22/bfd/elf-bfd.h
268 @@ -1577,6 +1577,9 @@ struct elf_obj_tdata
269 /* Segment flags for the PT_GNU_STACK segment. */
270 unsigned int stack_flags;
271
272 + /* Segment flags for the PT_PAX_FLAGS segment. */
273 + unsigned int pax_flags;
274 +
275 /* Symbol version definitions in external objects. */
276 Elf_Internal_Verdef *verdef;
277
278 --- binutils-2.22/bfd/elf.c
279 +++ binutils-2.22/bfd/elf.c
280 @@ -1158,6 +1158,7 @@ get_segment_type (unsigned int p_type)
281 case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
282 case PT_GNU_STACK: pt = "STACK"; break;
283 case PT_GNU_RELRO: pt = "RELRO"; break;
284 + case PT_PAX_FLAGS: pt = "PAX_FLAGS"; break;
285 default: pt = NULL; break;
286 }
287 return pt;
288 @@ -2477,6 +2478,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index)
289 case PT_GNU_RELRO:
290 return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "relro");
291
292 + case PT_PAX_FLAGS:
293 + return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "pax_flags");
294 +
295 default:
296 /* Check for any processor-specific program segment types. */
297 bed = get_elf_backend_data (abfd);
298 @@ -3551,6 +3555,11 @@ get_program_header_size (bfd *abfd, struct bfd_link_info *info)
299 ++segs;
300 }
301
302 + {
303 + /* We need a PT_PAX_FLAGS segment. */
304 + ++segs;
305 + }
306 +
307 for (s = abfd->sections; s != NULL; s = s->next)
308 {
309 if ((s->flags & SEC_LOAD) != 0
310 @@ -4153,6 +4162,20 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
311 }
312 }
313
314 + {
315 + amt = sizeof (struct elf_segment_map);
316 + m = bfd_zalloc (abfd, amt);
317 + if (m == NULL)
318 + goto error_return;
319 + m->next = NULL;
320 + m->p_type = PT_PAX_FLAGS;
321 + m->p_flags = elf_tdata (abfd)->pax_flags;
322 + m->p_flags_valid = 1;
323 +
324 + *pm = m;
325 + pm = &m->next;
326 + }
327 +
328 free (sections);
329 elf_tdata (abfd)->segment_map = mfirst;
330 }
331 @@ -5417,7 +5440,8 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
332 6. PT_TLS segment includes only SHF_TLS sections.
333 7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.
334 8. PT_DYNAMIC should not contain empty sections at the beginning
335 - (with the possible exception of .dynamic). */
336 + (with the possible exception of .dynamic).
337 + 9. PT_PAX_FLAGS segments do not include any sections. */
338 #define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed) \
339 ((((segment->p_paddr \
340 ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
341 @@ -5425,6 +5449,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
342 && (section->flags & SEC_ALLOC) != 0) \
343 || IS_NOTE (segment, section)) \
344 && segment->p_type != PT_GNU_STACK \
345 + && segment->p_type != PT_PAX_FLAGS \
346 && (segment->p_type != PT_TLS \
347 || (section->flags & SEC_THREAD_LOCAL)) \
348 && (segment->p_type == PT_LOAD \
349 --- binutils-2.22/bfd/elflink.c
350 +++ binutils-2.22/bfd/elflink.c
351 @@ -5545,16 +5545,30 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
352 return TRUE;
353
354 bed = get_elf_backend_data (output_bfd);
355 +
356 + elf_tdata (output_bfd)->pax_flags = PF_NORANDEXEC;
357 + if (info->execheap)
358 + elf_tdata (output_bfd)->pax_flags |= PF_NOMPROTECT;
359 + else if (info->noexecheap)
360 + elf_tdata (output_bfd)->pax_flags |= PF_MPROTECT;
361 +
362 if (info->execstack)
363 - elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
364 + {
365 + elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
366 + elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
367 + }
368 else if (info->noexecstack)
369 - elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
370 + {
371 + elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
372 + elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
373 + }
374 else
375 {
376 bfd *inputobj;
377 asection *notesec = NULL;
378 int exec = 0;
379
380 + elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
381 for (inputobj = info->input_bfds;
382 inputobj;
383 inputobj = inputobj->link_next)
384 @@ -5567,7 +5581,11 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
385 if (s)
386 {
387 if (s->flags & SEC_CODE)
388 - exec = PF_X;
389 + {
390 + elf_tdata (output_bfd)->pax_flags &= ~PF_NOEMUTRAMP;
391 + elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
392 + exec = PF_X;
393 + }
394 notesec = s;
395 }
396 else if (bed->default_execstack)
397 --- binutils-2.22/binutils/readelf.c
398 +++ binutils-2.22/binutils/readelf.c
399 @@ -2740,6 +2740,7 @@ get_segment_type (unsigned long p_type)
400 return "GNU_EH_FRAME";
401 case PT_GNU_STACK: return "GNU_STACK";
402 case PT_GNU_RELRO: return "GNU_RELRO";
403 + case PT_PAX_FLAGS: return "PAX_FLAGS";
404
405 default:
406 if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
407 --- binutils-2.22/include/bfdlink.h
408 +++ binutils-2.22/include/bfdlink.h
409 @@ -322,6 +322,14 @@ struct bfd_link_info
410 /* TRUE if PT_GNU_RELRO segment should be created. */
411 unsigned int relro: 1;
412
413 + /* TRUE if PT_PAX_FLAGS segment should be created with PF_NOMPROTECT
414 + flags. */
415 + unsigned int execheap: 1;
416 +
417 + /* TRUE if PT_PAX_FLAGS segment should be created with PF_MPROTECT
418 + flags. */
419 + unsigned int noexecheap: 1;
420 +
421 /* TRUE if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
422 should be created. */
423 unsigned int eh_frame_hdr: 1;
424 --- binutils-2.22/include/elf/common.h
425 +++ binutils-2.22/include/elf/common.h
426 @@ -429,6 +429,7 @@
427 #define PT_SUNW_EH_FRAME PT_GNU_EH_FRAME /* Solaris uses the same value */
428 #define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
429 #define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
430 +#define PT_PAX_FLAGS (PT_LOOS + 0x5041580) /* PaX flags */
431 #define PT_GNU_SHR (PT_LOOS + 0x474e554) /* Sharable segment */
432
433 /* Program segment permissions, in program header p_flags field. */
434 @@ -439,6 +440,21 @@
435 #define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
436 #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
437
438 +/* Flags to control PaX behavior. */
439 +
440 +#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
441 +#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
442 +#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
443 +#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
444 +#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
445 +#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
446 +#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
447 +#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
448 +#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
449 +#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
450 +#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
451 +#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
452 +
453 /* Values for section header, sh_type field. */
454
455 #define SHT_NULL 0 /* Section header table entry unused */
456 --- binutils-2.22/ld/emultempl/elf32.em
457 +++ binutils-2.22/ld/emultempl/elf32.em
458 @@ -2285,6 +2285,16 @@ fragment <<EOF
459 link_info.noexecstack = TRUE;
460 link_info.execstack = FALSE;
461 }
462 + else if (strcmp (optarg, "execheap") == 0)
463 + {
464 + link_info.execheap = TRUE;
465 + link_info.noexecheap = FALSE;
466 + }
467 + else if (strcmp (optarg, "noexecheap") == 0)
468 + {
469 + link_info.noexecheap = TRUE;
470 + link_info.execheap = FALSE;
471 + }
472 EOF
473 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
474 fragment <<EOF
475 @@ -2368,6 +2378,8 @@ fragment <<EOF
476 -z defs Report unresolved symbols in object files.\n"));
477 fprintf (file, _("\
478 -z execstack Mark executable as requiring executable stack\n"));
479 + fprintf (file, _("\
480 + -z execheap Mark executable as requiring executable heap\n"));
481 EOF
482
483 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
484 @@ -2391,6 +2403,8 @@ fragment <<EOF
485 fragment <<EOF
486 fprintf (file, _("\
487 -z noexecstack Mark executable as not requiring executable stack\n"));
488 + fprintf (file, _("\
489 + -z noexecheap Mark executable as not requiring executable heap\n"));
490 EOF
491 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
492 fragment <<EOF
493 --- binutils-2.22/ld/ldgram.y
494 +++ binutils-2.22/ld/ldgram.y
495 @@ -1119,6 +1119,8 @@ phdr_type:
496 $$ = exp_intop (0x6474e550);
497 else if (strcmp (s, "PT_GNU_STACK") == 0)
498 $$ = exp_intop (0x6474e551);
499 + else if (strcmp (s, "PT_PAX_FLAGS") == 0)
500 + $$ = exp_intop (0x65041580);
501 else
502 {
503 einfo (_("\
504 --- binutils-2.22/ld/testsuite/ld-alpha/tlsbin.rd
505 +++ binutils-2.22/ld/testsuite/ld-alpha/tlsbin.rd
506 @@ -35,13 +35,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
507
508 Program Headers:
509 Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
510 - PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+150 R E 0x8
511 + PHDR +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+188 R E 0x8
512 INTERP +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
513 .*Requesting program interpreter.*
514 LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x10000
515 LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
516 DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
517 TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4
518 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
519 #...
520
521 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 3 entries:
522 --- binutils-2.22/ld/testsuite/ld-alpha/tlsbinr.rd
523 +++ binutils-2.22/ld/testsuite/ld-alpha/tlsbinr.rd
524 @@ -42,6 +42,7 @@ Program Headers:
525 +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
526 +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
527 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x4
528 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
529 #...
530
531 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 2 entries:
532 --- binutils-2.22/ld/testsuite/ld-alpha/tlspic.rd
533 +++ binutils-2.22/ld/testsuite/ld-alpha/tlspic.rd
534 @@ -38,6 +38,7 @@ Program Headers:
535 +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x10000
536 +DYNAMIC +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ RW +0x8
537 +TLS +0x0+10e0 0x0+110e0 0x0+110e0 0x0+60 0x0+80 R +0x4
538 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
539 #...
540
541 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 7 entries:
542 --- binutils-2.22/ld/testsuite/ld-elf/eh1.d
543 +++ binutils-2.22/ld/testsuite/ld-elf/eh1.d
544 @@ -22,11 +22,11 @@ Contents of the .eh_frame section:
545 DW_CFA_nop
546 DW_CFA_nop
547
548 -00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
549 - DW_CFA_advance_loc: 0 to 00400078
550 +00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
551 + DW_CFA_advance_loc: 0 to [0-9a-f]+
552 DW_CFA_def_cfa_offset: 16
553 DW_CFA_offset: r6 \(rbp\) at cfa-16
554 - DW_CFA_advance_loc: 0 to 00400078
555 + DW_CFA_advance_loc: 0 to [0-9a-f]+
556 DW_CFA_def_cfa_register: r6 \(rbp\)
557
558 00000038 ZERO terminator
559 --- binutils-2.22/ld/testsuite/ld-elf/eh2.d
560 +++ binutils-2.22/ld/testsuite/ld-elf/eh2.d
561 @@ -22,11 +22,11 @@ Contents of the .eh_frame section:
562 DW_CFA_nop
563 DW_CFA_nop
564
565 -00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
566 - DW_CFA_advance_loc: 0 to 00400078
567 +00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
568 + DW_CFA_advance_loc: 0 to [0-9a-f]+
569 DW_CFA_def_cfa_offset: 16
570 DW_CFA_offset: r6 \(rbp\) at cfa-16
571 - DW_CFA_advance_loc: 0 to 00400078
572 + DW_CFA_advance_loc: 0 to [0-9a-f]+
573 DW_CFA_def_cfa_register: r6 \(rbp\)
574
575 00000038 ZERO terminator
576 --- binutils-2.22/ld/testsuite/ld-elf/eh3.d
577 +++ binutils-2.22/ld/testsuite/ld-elf/eh3.d
578 @@ -22,11 +22,11 @@ Contents of the .eh_frame section:
579 DW_CFA_nop
580 DW_CFA_nop
581
582 -00000018 0000001c 0000001c FDE cie=00000000 pc=00400078..00400078
583 - DW_CFA_advance_loc: 0 to 00400078
584 +00000018 0000001c 0000001c FDE cie=00000000 pc=([0-9a-f]+)..\1
585 + DW_CFA_advance_loc: 0 to [0-9a-f]+
586 DW_CFA_def_cfa_offset: 16
587 DW_CFA_offset: r6 \(rbp\) at cfa-16
588 - DW_CFA_advance_loc: 0 to 00400078
589 + DW_CFA_advance_loc: 0 to [0-9a-f]+
590 DW_CFA_def_cfa_register: r6 \(rbp\)
591
592 00000038 ZERO terminator
593 --- binutils-2.22/ld/testsuite/ld-elf/orphan-region.d
594 +++ binutils-2.22/ld/testsuite/ld-elf/orphan-region.d
595 @@ -15,7 +15,9 @@
596 Program Headers:
597 Type.*
598 LOAD[ \t]+0x[0-9a-f]+ 0x0*40000000 0x0*40000000 0x[0-9a-f]+ 0x[0-9a-f]+ RWE 0x[0-9a-f]+
599 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
600
601 Section to Segment mapping:
602 Segment Sections...
603 00 .text .rodata .moredata *
604 + 01 +
605 --- binutils-2.22/ld/testsuite/ld-i386/tlsbin.rd
606 +++ binutils-2.22/ld/testsuite/ld-i386/tlsbin.rd
607 @@ -44,6 +44,7 @@ Program Headers:
608 +LOAD.*
609 +DYNAMIC.*
610 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
611 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
612
613 Section to Segment mapping:
614 +Segment Sections...
615 @@ -53,6 +54,7 @@ Program Headers:
616 +03 +.tdata .dynamic .got .got.plt *
617 +04 +.dynamic *
618 +05 +.tdata .tbss *
619 + +06 +
620
621 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
622 Offset +Info +Type +Sym.Value +Sym. Name
623 --- binutils-2.22/ld/testsuite/ld-i386/tlsbindesc.rd
624 +++ binutils-2.22/ld/testsuite/ld-i386/tlsbindesc.rd
625 @@ -42,6 +42,7 @@ Program Headers:
626 +LOAD.*
627 +DYNAMIC.*
628 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+a0 R +0x1000
629 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
630
631 Section to Segment mapping:
632 +Segment Sections...
633 @@ -51,6 +52,7 @@ Program Headers:
634 +03 +.tdata .dynamic .got .got.plt *
635 +04 +.dynamic *
636 +05 +.tdata .tbss *
637 + +06 +
638
639 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 9 entries:
640 Offset +Info +Type +Sym.Value +Sym. Name
641 --- binutils-2.22/ld/testsuite/ld-i386/tlsdesc.rd
642 +++ binutils-2.22/ld/testsuite/ld-i386/tlsdesc.rd
643 @@ -39,6 +39,7 @@ Program Headers:
644 +LOAD.*
645 +DYNAMIC.*
646 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
647 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
648
649 Section to Segment mapping:
650 +Segment Sections...
651 @@ -46,6 +47,7 @@ Program Headers:
652 +01 +.tdata .dynamic .got .got.plt *
653 +02 +.dynamic *
654 +03 +.tdata .tbss *
655 + +04 +
656
657 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
658 Offset +Info +Type +Sym.Value +Sym. Name
659 --- binutils-2.22/ld/testsuite/ld-i386/tlsdesc.sd
660 +++ binutils-2.22/ld/testsuite/ld-i386/tlsdesc.sd
661 @@ -14,7 +14,7 @@ Contents of section \.got:
662 [0-9a-f]+ 6c000000 b4ffffff 4c000000 68000000 .*
663 [0-9a-f]+ 50000000 70000000 00000000 bcffffff .*
664 Contents of section \.got\.plt:
665 - [0-9a-f]+ b0150000 00000000 00000000 00000000 .*
666 + [0-9a-f]+ [a-f]0150000 00000000 00000000 00000000 .*
667 [0-9a-f]+ 20000000 00000000 60000000 00000000 .*
668 [0-9a-f]+ 00000000 00000000 00000000 00000000 .*
669 [0-9a-f]+ 40000000 +.*
670 --- binutils-2.22/ld/testsuite/ld-i386/tlsgdesc.rd
671 +++ binutils-2.22/ld/testsuite/ld-i386/tlsgdesc.rd
672 @@ -36,12 +36,14 @@ Program Headers:
673 +LOAD.*
674 +LOAD.*
675 +DYNAMIC.*
676 + +PAX_FLAGS.*
677
678 Section to Segment mapping:
679 +Segment Sections...
680 +00 +.hash .dynsym .dynstr .rel.dyn .rel.plt .plt .text *
681 +01 +.dynamic .got .got.plt *
682 +02 +.dynamic *
683 + +03 +
684
685 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
686 Offset +Info +Type +Sym.Value +Sym. Name
687 --- binutils-2.22/ld/testsuite/ld-i386/tlsnopic.rd
688 +++ binutils-2.22/ld/testsuite/ld-i386/tlsnopic.rd
689 @@ -37,6 +37,7 @@ Program Headers:
690 +LOAD.*
691 +DYNAMIC.*
692 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+ 0x0+24 R +0x1
693 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
694
695 Section to Segment mapping:
696 +Segment Sections...
697 @@ -44,6 +45,7 @@ Program Headers:
698 +01 +.dynamic .got .got.plt *
699 +02 +.dynamic *
700 +03 +.tbss *
701 + +04 +
702
703 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 20 entries:
704 Offset +Info +Type +Sym.Value +Sym. Name
705 --- binutils-2.22/ld/testsuite/ld-i386/tlspic.rd
706 +++ binutils-2.22/ld/testsuite/ld-i386/tlspic.rd
707 @@ -40,6 +40,7 @@ Program Headers:
708 +LOAD.*
709 +DYNAMIC.*
710 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+60 0x0+80 R +0x1
711 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
712
713 Section to Segment mapping:
714 +Segment Sections...
715 @@ -47,6 +48,7 @@ Program Headers:
716 +01 +.tdata .dynamic .got .got.plt *
717 +02 +.dynamic *
718 +03 +.tdata .tbss *
719 + +04 +
720
721 Relocation section '.rel.dyn' at offset 0x[0-9a-f]+ contains 26 entries:
722 Offset +Info +Type +Sym.Value +Sym. Name
723 --- binutils-2.22/ld/testsuite/ld-ia64/merge1.d
724 +++ binutils-2.22/ld/testsuite/ld-ia64/merge1.d
725 @@ -4,7 +4,7 @@
726 #objdump: -d
727
728 #...
729 -0+1e0 <.text>:
730 +[a-f0-9]+ <.text>:
731 [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
732 [ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1
733 [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
734 --- binutils-2.22/ld/testsuite/ld-ia64/merge2.d
735 +++ binutils-2.22/ld/testsuite/ld-ia64/merge2.d
736 @@ -4,7 +4,7 @@
737 #objdump: -d
738
739 #...
740 -0+1e0 <.text>:
741 +[a-f0-9]+ <.text>:
742 [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
743 [ ]*[a-f0-9]+: c0 c0 04 00 48 00 addl r12=24,r1
744 [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
745 --- binutils-2.22/ld/testsuite/ld-ia64/merge3.d
746 +++ binutils-2.22/ld/testsuite/ld-ia64/merge3.d
747 @@ -4,7 +4,7 @@
748 #objdump: -d
749
750 #...
751 -0+210 <.text>:
752 +[a-f0-9]+ <.text>:
753 [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
754 [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
755 [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
756 --- binutils-2.22/ld/testsuite/ld-ia64/merge4.d
757 +++ binutils-2.22/ld/testsuite/ld-ia64/merge4.d
758 @@ -4,7 +4,7 @@
759 #objdump: -d
760
761 #...
762 -0+240 <.text>:
763 +[a-f0-9]+ <.text>:
764 [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
765 [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
766 [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
767 --- binutils-2.22/ld/testsuite/ld-ia64/merge5.d
768 +++ binutils-2.22/ld/testsuite/ld-ia64/merge5.d
769 @@ -4,7 +4,7 @@
770 #objdump: -d
771
772 #...
773 -0+270 <.text>:
774 +[a-f0-9]+ <.text>:
775 [ ]*[a-f0-9]+: 0b 60 80 02 00 24 \[MMI\] addl r12=32,r1;;
776 [ ]*[a-f0-9]+: c0 40 05 00 48 00 addl r12=40,r1
777 [ ]*[a-f0-9]+: 00 00 04 00 nop.i 0x0;;
778 --- binutils-2.22/ld/testsuite/ld-ia64/tlsbin.rd
779 +++ binutils-2.22/ld/testsuite/ld-ia64/tlsbin.rd
780 @@ -36,13 +36,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
781
782 Program Headers:
783 +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
784 - +PHDR +0x0+40 0x40+40 0x40+40 0x0+188 0x0+188 R E 0x8
785 - +INTERP +0x0+1c8 0x40+1c8 0x40+1c8 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
786 + +PHDR +0x0+40 0x40+40 0x40+40 (0x[0-9a-f]+) \1 R E 0x8
787 + +INTERP +0x0+([0-9a-f]+) (0x40+\1) \2 0x[0-9a-f]+ 0x[0-9a-f]+ R +0x1
788 .*Requesting program interpreter.*
789 +LOAD +0x0+ 0x40+ 0x40+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ R E 0x10000
790 +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
791 +DYNAMIC +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+150 0x0+150 RW +0x8
792 +TLS +0x0+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x60+1[0-9a-f]+ 0x0+60 0x0+a0 R +0x4
793 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
794 +IA_64_UNWIND .* R +0x8
795 #...
796
797 --- binutils-2.22/ld/testsuite/ld-ia64/tlspic.rd
798 +++ binutils-2.22/ld/testsuite/ld-ia64/tlspic.rd
799 @@ -40,6 +40,7 @@ Program Headers:
800 +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
801 +DYNAMIC +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+140 0x0+140 RW +0x8
802 +TLS +0x0+1[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+11[0-9a-f]+ 0x0+60 0x0+80 R +0x4
803 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
804 +IA_64_UNWIND +0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+1[0-9a-f]+ 0x0+18 0x0+18 R +0x8
805 #...
806
807 --- binutils-2.22/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
808 +++ binutils-2.22/ld/testsuite/ld-mips-elf/multi-got-no-shared.d
809 @@ -8,9 +8,9 @@
810 .*: +file format.*
811
812 Disassembly of section \.text:
813 -004000b0 <[^>]*> 3c1c0043 lui gp,0x43
814 -004000b4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
815 -004000b8 <[^>]*> afbc0008 sw gp,8\(sp\)
816 +004000d0 <[^>]*> 3c1c0043 lui gp,0x43
817 +004000d4 <[^>]*> 279c9ff0 addiu gp,gp,-24592
818 +004000d8 <[^>]*> afbc0008 sw gp,8\(sp\)
819 #...
820 00408d60 <[^>]*> 3c1c0043 lui gp,0x43
821 00408d64 <[^>]*> 279c2c98 addiu gp,gp,11416
822 --- binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd
823 +++ binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-3a.sd
824 @@ -1,7 +1,7 @@
825
826 Elf file type is DYN \(Shared object file\)
827 Entry point .*
828 -There are 5 program headers, starting at offset .*
829 +There are [0-9] program headers, starting at offset .*
830
831 Program Headers:
832 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
833 @@ -9,6 +9,7 @@ Program Headers:
834 * LOAD * [^ ]+ * 0x0+00000 * 0x0+00000 [^ ]+ * [^ ]+ * R E * 0x.*
835 * LOAD * [^ ]+ * 0x0+10000 * 0x0+10000 [^ ]+ * [^ ]+ * RW * 0x.*
836 * DYNAMIC * [^ ]+ * 0x0+00400 * 0x0+00400 .*
837 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
838 * NULL * .*
839
840 *Section to Segment mapping:
841 @@ -18,3 +19,4 @@ Program Headers:
842 *0*2 * \.data \.got *
843 *0*3 * \.dynamic *
844 *0*4 *
845 + *0*5 *
846 --- binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd
847 +++ binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-3b.sd
848 @@ -1,7 +1,7 @@
849
850 Elf file type is EXEC \(Executable file\)
851 Entry point 0x44000
852 -There are 8 program headers, starting at offset .*
853 +There are [0-9] program headers, starting at offset .*
854
855 Program Headers:
856 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
857 @@ -13,6 +13,7 @@ Program Headers:
858 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
859 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
860 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
861 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
862 * NULL * .*
863
864 *Section to Segment mapping:
865 @@ -25,3 +26,4 @@ Program Headers:
866 *0*5 *\.got \.data *
867 *0*6 *\.dynamic *
868 *0*7 *
869 + *0*8 *
870 --- binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd
871 +++ binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-4b.sd
872 @@ -1,7 +1,7 @@
873
874 Elf file type is EXEC \(Executable file\)
875 Entry point 0x44000
876 -There are 8 program headers, starting at offset .*
877 +There are [0-9] program headers, starting at offset .*
878
879 Program Headers:
880 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
881 @@ -13,6 +13,7 @@ Program Headers:
882 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
883 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
884 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
885 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
886 * NULL * .*
887
888 *Section to Segment mapping:
889 @@ -25,3 +26,4 @@ Program Headers:
890 *0*5 * \.got \.data \.bss *
891 *0*6 * \.dynamic *
892 *0*7 *
893 + *0*8 *
894 --- binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd
895 +++ binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-5b.sd
896 @@ -1,7 +1,7 @@
897
898 Elf file type is EXEC \(Executable file\)
899 Entry point 0x44000
900 -There are 8 program headers, starting at offset .*
901 +There are [0-9] program headers, starting at offset .*
902
903 Program Headers:
904 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
905 @@ -13,6 +13,7 @@ Program Headers:
906 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
907 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
908 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
909 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
910 * NULL * .*
911
912 *Section to Segment mapping:
913 @@ -25,3 +26,4 @@ Program Headers:
914 *0*5 * \.got \.data \.bss *
915 *0*6 * \.dynamic *
916 *0*7 *
917 + *0*8 *
918 --- binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd
919 +++ binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n32.sd
920 @@ -1,7 +1,7 @@
921
922 Elf file type is EXEC \(Executable file\)
923 Entry point 0x44000
924 -There are 8 program headers, starting at offset .*
925 +There are [0-9] program headers, starting at offset .*
926
927 Program Headers:
928 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
929 @@ -13,6 +13,7 @@ Program Headers:
930 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
931 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
932 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
933 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
934 * NULL * .*
935
936 *Section to Segment mapping:
937 @@ -25,3 +26,4 @@ Program Headers:
938 *0*5 * \.got \.data \.bss *
939 *0*6 * \.dynamic *
940 *0*7 *
941 + *0*8 *
942 --- binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd
943 +++ binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-n64.sd
944 @@ -1,7 +1,7 @@
945
946 Elf file type is EXEC \(Executable file\)
947 Entry point 0x44000
948 -There are 7 program headers, starting at offset .*
949 +There are [0-9] program headers, starting at offset .*
950
951 Program Headers:
952 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
953 @@ -12,6 +12,7 @@ Program Headers:
954 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
955 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
956 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
957 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
958 * NULL * .*
959
960 *Section to Segment mapping:
961 @@ -23,3 +24,4 @@ Program Headers:
962 *0*4 * \.got \.data \.bss *
963 *0*5 * \.dynamic *
964 *0*6 *
965 + *0*7 *
966 --- binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd
967 +++ binutils-2.22/ld/testsuite/ld-mips-elf/pic-and-nonpic-6-o32.sd
968 @@ -1,7 +1,7 @@
969
970 Elf file type is EXEC \(Executable file\)
971 Entry point 0x44000
972 -There are 8 program headers, starting at offset .*
973 +There are [0-9] program headers, starting at offset .*
974
975 Program Headers:
976 * Type * Offset * VirtAddr * PhysAddr * FileSiz * MemSiz * Flg * Align
977 @@ -13,6 +13,7 @@ Program Headers:
978 * LOAD * [^ ]+ * 0x0+80000 * 0x0+80000 [^ ]+ * [^ ]+ * RW * 0x.*
979 * LOAD * [^ ]+ * 0x0+a0000 * 0x0+a0000 [^ ]+ * [^ ]+ * RW * 0x.*
980 * DYNAMIC * [^ ]+ * 0x0+42000 * 0x0+42000 .*
981 + * PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
982 * NULL * .*
983
984 *Section to Segment mapping:
985 @@ -25,3 +26,4 @@ Program Headers:
986 *0*5 * \.got \.data \.bss *
987 *0*6 * \.dynamic *
988 *0*7 *
989 + *0*8 *
990 --- binutils-2.22/ld/testsuite/ld-mips-elf/rel32-n32.d
991 +++ binutils-2.22/ld/testsuite/ld-mips-elf/rel32-n32.d
992 @@ -10,6 +10,6 @@ Relocation section '.rel.dyn' at offset .* contains 2 entries:
993 [0-9a-f ]+R_MIPS_REL32
994
995 Hex dump of section '.text':
996 - 0x000002e0 00000000 00000000 00000000 00000000 ................
997 - 0x000002f0 000002f0 00000000 00000000 00000000 ................
998 0x00000300 00000000 00000000 00000000 00000000 ................
999 + 0x00000310 00000310 00000000 00000000 00000000 ................
1000 + 0x00000320 00000000 00000000 00000000 00000000 ................
1001 --- binutils-2.22/ld/testsuite/ld-mips-elf/rel32-o32.d
1002 +++ binutils-2.22/ld/testsuite/ld-mips-elf/rel32-o32.d
1003 @@ -10,6 +10,6 @@ Relocation section '.rel.dyn' at offset .* contains 2 entries:
1004 [0-9a-f ]+R_MIPS_REL32
1005
1006 Hex dump of section '.text':
1007 - 0x000002e0 00000000 00000000 00000000 00000000 ................
1008 - 0x000002f0 000002f0 00000000 00000000 00000000 ................
1009 0x00000300 00000000 00000000 00000000 00000000 ................
1010 + 0x00000310 00000310 00000000 00000000 00000000 ................
1011 + 0x00000320 00000000 00000000 00000000 00000000 ................
1012 --- binutils-2.22/ld/testsuite/ld-mips-elf/rel64.d
1013 +++ binutils-2.22/ld/testsuite/ld-mips-elf/rel64.d
1014 @@ -14,6 +14,6 @@ Relocation section '.rel.dyn' at offset .* contains 2 entries:
1015 +Type3: R_MIPS_NONE
1016
1017 Hex dump of section '.text':
1018 - 0x00000450 00000000 00000000 00000000 00000000 ................
1019 - 0x00000460 00000000 00000460 00000000 00000000 ................
1020 - 0x00000470 00000000 00000000 00000000 00000000 ................
1021 + 0x00000490 00000000 00000000 00000000 00000000 ................
1022 + 0x000004a0 00000000 000004a0 00000000 00000000 ................
1023 + 0x000004b0 00000000 00000000 00000000 00000000 ................
1024 --- binutils-2.22/ld/testsuite/ld-mips-elf/tlsbin-o32.d
1025 +++ binutils-2.22/ld/testsuite/ld-mips-elf/tlsbin-o32.d
1026 @@ -2,42 +2,42 @@
1027
1028 Disassembly of section .text:
1029
1030 -004000d0 <__start>:
1031 - 4000d0: 3c1c0fc0 lui gp,0xfc0
1032 - 4000d4: 279c7f30 addiu gp,gp,32560
1033 - 4000d8: 0399e021 addu gp,gp,t9
1034 - 4000dc: 27bdfff0 addiu sp,sp,-16
1035 - 4000e0: afbe0008 sw s8,8\(sp\)
1036 - 4000e4: 03a0f021 move s8,sp
1037 - 4000e8: afbc0000 sw gp,0\(sp\)
1038 - 4000ec: 8f998018 lw t9,-32744\(gp\)
1039 - 4000f0: 27848028 addiu a0,gp,-32728
1040 - 4000f4: 0320f809 jalr t9
1041 - 4000f8: 00000000 nop
1042 - 4000fc: 8fdc0000 lw gp,0\(s8\)
1043 - 400100: 00000000 nop
1044 - 400104: 8f998018 lw t9,-32744\(gp\)
1045 - 400108: 27848020 addiu a0,gp,-32736
1046 - 40010c: 0320f809 jalr t9
1047 - 400110: 00000000 nop
1048 - 400114: 8fdc0000 lw gp,0\(s8\)
1049 - 400118: 00401021 move v0,v0
1050 - 40011c: 3c030000 lui v1,0x0
1051 - 400120: 24638000 addiu v1,v1,-32768
1052 - 400124: 00621821 addu v1,v1,v0
1053 - 400128: 7c02283b rdhwr v0,\$5
1054 - 40012c: 8f83801c lw v1,-32740\(gp\)
1055 - 400130: 00000000 nop
1056 - 400134: 00621821 addu v1,v1,v0
1057 - 400138: 7c02283b rdhwr v0,\$5
1058 - 40013c: 3c030000 lui v1,0x0
1059 - 400140: 24639004 addiu v1,v1,-28668
1060 - 400144: 00621821 addu v1,v1,v0
1061 - 400148: 03c0e821 move sp,s8
1062 - 40014c: 8fbe0008 lw s8,8\(sp\)
1063 - 400150: 03e00008 jr ra
1064 - 400154: 27bd0010 addiu sp,sp,16
1065 +00400[0-9a-f]{3} <__start>:
1066 + 400[0-9a-f]{3}: 3c1c0fc0 lui gp,0xfc0
1067 + 400[0-9a-f]{3}: 279c7f30 addiu gp,gp,32560
1068 + 400[0-9a-f]{3}: 0399e021 addu gp,gp,t9
1069 + 400[0-9a-f]{3}: 27bdfff0 addiu sp,sp,-16
1070 + 400[0-9a-f]{3}: afbe0008 sw s8,8\(sp\)
1071 + 400[0-9a-f]{3}: 03a0f021 move s8,sp
1072 + 400[0-9a-f]{3}: afbc0000 sw gp,0\(sp\)
1073 + 400[0-9a-f]{3}: 8f998018 lw t9,-32744\(gp\)
1074 + 400[0-9a-f]{3}: 27848028 addiu a0,gp,-32728
1075 + 400[0-9a-f]{3}: 0320f809 jalr t9
1076 + 400[0-9a-f]{3}: 00000000 nop
1077 + 400[0-9a-f]{3}: 8fdc0000 lw gp,0\(s8\)
1078 + 400[0-9a-f]{3}: 00000000 nop
1079 + 400[0-9a-f]{3}: 8f998018 lw t9,-32744\(gp\)
1080 + 400[0-9a-f]{3}: 27848020 addiu a0,gp,-32736
1081 + 400[0-9a-f]{3}: 0320f809 jalr t9
1082 + 400[0-9a-f]{3}: 00000000 nop
1083 + 400[0-9a-f]{3}: 8fdc0000 lw gp,0\(s8\)
1084 + 400[0-9a-f]{3}: 00401021 move v0,v0
1085 + 400[0-9a-f]{3}: 3c030000 lui v1,0x0
1086 + 400[0-9a-f]{3}: 24638000 addiu v1,v1,-32768
1087 + 400[0-9a-f]{3}: 00621821 addu v1,v1,v0
1088 + 400[0-9a-f]{3}: 7c02283b rdhwr v0,\$5
1089 + 400[0-9a-f]{3}: 8f83801c lw v1,-32740\(gp\)
1090 + 400[0-9a-f]{3}: 00000000 nop
1091 + 400[0-9a-f]{3}: 00621821 addu v1,v1,v0
1092 + 400[0-9a-f]{3}: 7c02283b rdhwr v0,\$5
1093 + 400[0-9a-f]{3}: 3c030000 lui v1,0x0
1094 + 400[0-9a-f]{3}: 24639004 addiu v1,v1,-28668
1095 + 400[0-9a-f]{3}: 00621821 addu v1,v1,v0
1096 + 400[0-9a-f]{3}: 03c0e821 move sp,s8
1097 + 400[0-9a-f]{3}: 8fbe0008 lw s8,8\(sp\)
1098 + 400[0-9a-f]{3}: 03e00008 jr ra
1099 + 400[0-9a-f]{3}: 27bd0010 addiu sp,sp,16
1100
1101 -00400158 <__tls_get_addr>:
1102 - 400158: 03e00008 jr ra
1103 - 40015c: 00000000 nop
1104 +00400[0-9a-f]{3} <__tls_get_addr>:
1105 + 400[0-9a-f]{3}: 03e00008 jr ra
1106 + 400[0-9a-f]{3}: 00000000 nop
1107 --- binutils-2.22/ld/testsuite/ld-powerpc/tls.d
1108 +++ binutils-2.22/ld/testsuite/ld-powerpc/tls.d
1109 @@ -9,45 +9,45 @@
1110
1111 Disassembly of section \.text:
1112
1113 -0+100000e8 <_start>:
1114 - 100000e8: 3c 6d 00 00 addis r3,r13,0
1115 - 100000ec: 60 00 00 00 nop
1116 - 100000f0: 38 63 90 78 addi r3,r3,-28552
1117 - 100000f4: 3c 6d 00 00 addis r3,r13,0
1118 - 100000f8: 60 00 00 00 nop
1119 - 100000fc: 38 63 10 00 addi r3,r3,4096
1120 - 10000100: 3c 6d 00 00 addis r3,r13,0
1121 - 10000104: 60 00 00 00 nop
1122 - 10000108: 38 63 90 40 addi r3,r3,-28608
1123 - 1000010c: 3c 6d 00 00 addis r3,r13,0
1124 - 10000110: 60 00 00 00 nop
1125 - 10000114: 38 63 10 00 addi r3,r3,4096
1126 - 10000118: 39 23 80 48 addi r9,r3,-32696
1127 - 1000011c: 3d 23 00 00 addis r9,r3,0
1128 - 10000120: 81 49 80 50 lwz r10,-32688\(r9\)
1129 - 10000124: e9 22 80 10 ld r9,-32752\(r2\)
1130 - 10000128: 7d 49 18 2a ldx r10,r9,r3
1131 - 1000012c: 3d 2d 00 00 addis r9,r13,0
1132 - 10000130: a1 49 90 60 lhz r10,-28576\(r9\)
1133 - 10000134: 89 4d 90 68 lbz r10,-28568\(r13\)
1134 - 10000138: 3d 2d 00 00 addis r9,r13,0
1135 - 1000013c: 99 49 90 70 stb r10,-28560\(r9\)
1136 - 10000140: 3c 6d 00 00 addis r3,r13,0
1137 - 10000144: 60 00 00 00 nop
1138 - 10000148: 38 63 90 00 addi r3,r3,-28672
1139 - 1000014c: 3c 6d 00 00 addis r3,r13,0
1140 - 10000150: 60 00 00 00 nop
1141 - 10000154: 38 63 10 00 addi r3,r3,4096
1142 - 10000158: f9 43 80 08 std r10,-32760\(r3\)
1143 - 1000015c: 3d 23 00 00 addis r9,r3,0
1144 - 10000160: 91 49 80 10 stw r10,-32752\(r9\)
1145 - 10000164: e9 22 80 08 ld r9,-32760\(r2\)
1146 - 10000168: 7d 49 19 2a stdx r10,r9,r3
1147 - 1000016c: 3d 2d 00 00 addis r9,r13,0
1148 - 10000170: b1 49 90 60 sth r10,-28576\(r9\)
1149 - 10000174: e9 4d 90 2a lwa r10,-28632\(r13\)
1150 - 10000178: 3d 2d 00 00 addis r9,r13,0
1151 - 1000017c: a9 49 90 30 lha r10,-28624\(r9\)
1152 +0+10000[0-9a-f]{3} <_start>:
1153 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1154 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1155 + 10000[0-9a-f]{3}: 38 63 90 78 addi r3,r3,-28552
1156 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1157 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1158 + 10000[0-9a-f]{3}: 38 63 10 00 addi r3,r3,4096
1159 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1160 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1161 + 10000[0-9a-f]{3}: 38 63 90 40 addi r3,r3,-28608
1162 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1163 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1164 + 10000[0-9a-f]{3}: 38 63 10 00 addi r3,r3,4096
1165 + 10000[0-9a-f]{3}: 39 23 80 48 addi r9,r3,-32696
1166 + 10000[0-9a-f]{3}: 3d 23 00 00 addis r9,r3,0
1167 + 10000[0-9a-f]{3}: 81 49 80 50 lwz r10,-32688\(r9\)
1168 + 10000[0-9a-f]{3}: e9 22 80 10 ld r9,-32752\(r2\)
1169 + 10000[0-9a-f]{3}: 7d 49 18 2a ldx r10,r9,r3
1170 + 10000[0-9a-f]{3}: 3d 2d 00 00 addis r9,r13,0
1171 + 10000[0-9a-f]{3}: a1 49 90 60 lhz r10,-28576\(r9\)
1172 + 10000[0-9a-f]{3}: 89 4d 90 68 lbz r10,-28568\(r13\)
1173 + 10000[0-9a-f]{3}: 3d 2d 00 00 addis r9,r13,0
1174 + 10000[0-9a-f]{3}: 99 49 90 70 stb r10,-28560\(r9\)
1175 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1176 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1177 + 10000[0-9a-f]{3}: 38 63 90 00 addi r3,r3,-28672
1178 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1179 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1180 + 10000[0-9a-f]{3}: 38 63 10 00 addi r3,r3,4096
1181 + 10000[0-9a-f]{3}: f9 43 80 08 std r10,-32760\(r3\)
1182 + 10000[0-9a-f]{3}: 3d 23 00 00 addis r9,r3,0
1183 + 10000[0-9a-f]{3}: 91 49 80 10 stw r10,-32752\(r9\)
1184 + 10000[0-9a-f]{3}: e9 22 80 08 ld r9,-32760\(r2\)
1185 + 10000[0-9a-f]{3}: 7d 49 19 2a stdx r10,r9,r3
1186 + 10000[0-9a-f]{3}: 3d 2d 00 00 addis r9,r13,0
1187 + 10000[0-9a-f]{3}: b1 49 90 60 sth r10,-28576\(r9\)
1188 + 10000[0-9a-f]{3}: e9 4d 90 2a lwa r10,-28632\(r13\)
1189 + 10000[0-9a-f]{3}: 3d 2d 00 00 addis r9,r13,0
1190 + 10000[0-9a-f]{3}: a9 49 90 30 lha r10,-28624\(r9\)
1191
1192 -0+10000180 <\.__tls_get_addr>:
1193 - 10000180: 4e 80 00 20 blr
1194 +0+10000[0-9a-f]{3} <\.__tls_get_addr>:
1195 + 10000[0-9a-f]{3}: 4e 80 00 20 blr
1196 --- binutils-2.22/ld/testsuite/ld-powerpc/tls.g
1197 +++ binutils-2.22/ld/testsuite/ld-powerpc/tls.g
1198 @@ -8,5 +8,5 @@
1199 .*: +file format elf64-powerpc
1200
1201 Contents of section \.got:
1202 - 100101e0 00000000 100181e0 ffffffff ffff8018 .*
1203 - 100101f0 ffffffff ffff8058 .*
1204 + 10010([0-9a-f]{3}) 00000000 10018\1 ffffffff ffff8018 .*
1205 + 10010[0-9a-f]{3} ffffffff ffff8058 .*
1206 --- binutils-2.22/ld/testsuite/ld-powerpc/tls32.d
1207 +++ binutils-2.22/ld/testsuite/ld-powerpc/tls32.d
1208 @@ -9,42 +9,42 @@
1209
1210 Disassembly of section \.text:
1211
1212 -0+1800094 <_start>:
1213 - 1800094: 3c 62 00 00 addis r3,r2,0
1214 - 1800098: 38 63 90 3c addi r3,r3,-28612
1215 - 180009c: 3c 62 00 00 addis r3,r2,0
1216 - 18000a0: 38 63 10 00 addi r3,r3,4096
1217 - 18000a4: 3c 62 00 00 addis r3,r2,0
1218 - 18000a8: 38 63 90 20 addi r3,r3,-28640
1219 - 18000ac: 3c 62 00 00 addis r3,r2,0
1220 - 18000b0: 38 63 10 00 addi r3,r3,4096
1221 - 18000b4: 39 23 80 24 addi r9,r3,-32732
1222 - 18000b8: 3d 23 00 00 addis r9,r3,0
1223 - 18000bc: 81 49 80 28 lwz r10,-32728\(r9\)
1224 - 18000c0: 3d 22 00 00 addis r9,r2,0
1225 - 18000c4: a1 49 90 30 lhz r10,-28624\(r9\)
1226 - 18000c8: 89 42 90 34 lbz r10,-28620\(r2\)
1227 - 18000cc: 3d 22 00 00 addis r9,r2,0
1228 - 18000d0: 99 49 90 38 stb r10,-28616\(r9\)
1229 - 18000d4: 3c 62 00 00 addis r3,r2,0
1230 - 18000d8: 38 63 90 00 addi r3,r3,-28672
1231 - 18000dc: 3c 62 00 00 addis r3,r2,0
1232 - 18000e0: 38 63 10 00 addi r3,r3,4096
1233 - 18000e4: 91 43 80 04 stw r10,-32764\(r3\)
1234 - 18000e8: 3d 23 00 00 addis r9,r3,0
1235 - 18000ec: 91 49 80 08 stw r10,-32760\(r9\)
1236 - 18000f0: 3d 22 00 00 addis r9,r2,0
1237 - 18000f4: b1 49 90 30 sth r10,-28624\(r9\)
1238 - 18000f8: a1 42 90 14 lhz r10,-28652\(r2\)
1239 - 18000fc: 3d 22 00 00 addis r9,r2,0
1240 - 1800100: a9 49 90 18 lha r10,-28648\(r9\)
1241 +0+1800[0-9a-f]{3} <_start>:
1242 + 1800[0-9a-f]{3}: 3c 62 00 00 addis r3,r2,0
1243 + 1800[0-9a-f]{3}: 38 63 90 3c addi r3,r3,-28612
1244 + 1800[0-9a-f]{3}: 3c 62 00 00 addis r3,r2,0
1245 + 1800[0-9a-f]{3}: 38 63 10 00 addi r3,r3,4096
1246 + 1800[0-9a-f]{3}: 3c 62 00 00 addis r3,r2,0
1247 + 1800[0-9a-f]{3}: 38 63 90 20 addi r3,r3,-28640
1248 + 1800[0-9a-f]{3}: 3c 62 00 00 addis r3,r2,0
1249 + 1800[0-9a-f]{3}: 38 63 10 00 addi r3,r3,4096
1250 + 1800[0-9a-f]{3}: 39 23 80 24 addi r9,r3,-32732
1251 + 1800[0-9a-f]{3}: 3d 23 00 00 addis r9,r3,0
1252 + 1800[0-9a-f]{3}: 81 49 80 28 lwz r10,-32728\(r9\)
1253 + 1800[0-9a-f]{3}: 3d 22 00 00 addis r9,r2,0
1254 + 1800[0-9a-f]{3}: a1 49 90 30 lhz r10,-28624\(r9\)
1255 + 1800[0-9a-f]{3}: 89 42 90 34 lbz r10,-28620\(r2\)
1256 + 1800[0-9a-f]{3}: 3d 22 00 00 addis r9,r2,0
1257 + 1800[0-9a-f]{3}: 99 49 90 38 stb r10,-28616\(r9\)
1258 + 1800[0-9a-f]{3}: 3c 62 00 00 addis r3,r2,0
1259 + 1800[0-9a-f]{3}: 38 63 90 00 addi r3,r3,-28672
1260 + 1800[0-9a-f]{3}: 3c 62 00 00 addis r3,r2,0
1261 + 1800[0-9a-f]{3}: 38 63 10 00 addi r3,r3,4096
1262 + 1800[0-9a-f]{3}: 91 43 80 04 stw r10,-32764\(r3\)
1263 + 1800[0-9a-f]{3}: 3d 23 00 00 addis r9,r3,0
1264 + 1800[0-9a-f]{3}: 91 49 80 08 stw r10,-32760\(r9\)
1265 + 1800[0-9a-f]{3}: 3d 22 00 00 addis r9,r2,0
1266 + 1800[0-9a-f]{3}: b1 49 90 30 sth r10,-28624\(r9\)
1267 + 1800[0-9a-f]{3}: a1 42 90 14 lhz r10,-28652\(r2\)
1268 + 1800[0-9a-f]{3}: 3d 22 00 00 addis r9,r2,0
1269 + 1800[0-9a-f]{3}: a9 49 90 18 lha r10,-28648\(r9\)
1270
1271 -0+1800104 <__tls_get_addr>:
1272 - 1800104: 4e 80 00 20 blr
1273 +0+1800[0-9a-f]{3} <__tls_get_addr>:
1274 + 1800[0-9a-f]{3}: 4e 80 00 20 blr
1275 Disassembly of section \.got:
1276
1277 -0+1810128 <_GLOBAL_OFFSET_TABLE_-0x4>:
1278 - 1810128: 4e 80 00 21 blrl
1279 +0+1810[0-9a-f]{3} <_GLOBAL_OFFSET_TABLE_-0x4>:
1280 + 1810[0-9a-f]{3}: 4e 80 00 21 blrl
1281
1282 -0+181012c <_GLOBAL_OFFSET_TABLE_>:
1283 +0+1810[0-9a-f]{3} <_GLOBAL_OFFSET_TABLE_>:
1284 \.\.\.
1285 --- binutils-2.22/ld/testsuite/ld-powerpc/tls32.g
1286 +++ binutils-2.22/ld/testsuite/ld-powerpc/tls32.g
1287 @@ -8,4 +8,4 @@
1288 .*: +file format elf32-powerpc
1289
1290 Contents of section \.got:
1291 - 1810128 4e800021 00000000 00000000 00000000 .*
1292 + 18101[0-9a-f]{2} 4e800021 00000000 00000000 00000000 .*
1293 --- binutils-2.22/ld/testsuite/ld-powerpc/tls32.t
1294 +++ binutils-2.22/ld/testsuite/ld-powerpc/tls32.t
1295 @@ -8,5 +8,5 @@
1296 .*: +file format elf32-powerpc
1297
1298 Contents of section \.tdata:
1299 - 1810108 12345678 23456789 3456789a 456789ab .*
1300 - 1810118 56789abc 6789abcd 789abcde 00c0ffee .*
1301 + 18101[0-9a-f]{2} 12345678 23456789 3456789a 456789ab .*
1302 + 18101[0-9a-f]{2} 56789abc 6789abcd 789abcde 00c0ffee .*
1303 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsexe32.d
1304 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsexe32.d
1305 @@ -44,4 +44,4 @@ Disassembly of section \.got:
1306 .*: 4e 80 00 21 blrl
1307
1308 .* <_GLOBAL_OFFSET_TABLE_>:
1309 -.*: 01 81 02 b8 00 00 00 00 00 00 00 00 .*
1310 +.*: 01 81 02 [bd]8 00 00 00 00 00 00 00 00 .*
1311 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsexe32.g
1312 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsexe32.g
1313 @@ -8,4 +8,4 @@
1314
1315 Contents of section \.got:
1316 .* 00000000 00000000 00000000 4e800021 .*
1317 -.* 018102b8 00000000 00000000 .*
1318 +.* 018102[bd]8 00000000 00000000 .*
1319 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsexe32.r
1320 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsexe32.r
1321 @@ -33,13 +33,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
1322
1323 Program Headers:
1324 +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
1325 - +PHDR +0x000034 0x01800034 0x01800034 0x000c0 0x000c0 R E 0x4
1326 - +INTERP +0x0000f4 0x018000f4 0x018000f4 0x00011 0x00011 R +0x1
1327 + +PHDR +0x000034 0x01800034 0x01800034 (0x000[0-9a-f]{2}) \1 R E 0x4
1328 + +INTERP +0x000([0-9a-f]{3}) 0x01800\1 0x01800\1 0x00011 0x00011 R +0x1
1329 +\[Requesting program interpreter: .*\]
1330 +LOAD .* R E 0x10000
1331 +LOAD .* RWE 0x10000
1332 +DYNAMIC .* RW +0x4
1333 +TLS .* 0x0001c 0x00038 R +0x4
1334 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1335
1336 Section to Segment mapping:
1337 +Segment Sections\.\.\.
1338 @@ -49,6 +50,7 @@ Program Headers:
1339 +03 +\.tdata \.dynamic \.got \.plt
1340 +04 +\.dynamic
1341 +05 +\.tdata \.tbss
1342 + +06 +
1343
1344 Relocation section '\.rela\.dyn' at offset .* contains 2 entries:
1345 Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
1346 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsmark.d
1347 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsmark.d
1348 @@ -9,29 +9,29 @@
1349
1350 Disassembly of section \.text:
1351
1352 -0+100000e8 <_start>:
1353 - 100000e8: 48 00 00 18 b 10000100 <_start\+0x18>
1354 - 100000ec: 60 00 00 00 nop
1355 - 100000f0: 38 63 90 00 addi r3,r3,-28672
1356 - 100000f4: e8 83 00 00 ld r4,0\(r3\)
1357 - 100000f8: 3c 6d 00 00 addis r3,r13,0
1358 - 100000fc: 48 00 00 0c b 10000108 <_start\+0x20>
1359 - 10000100: 3c 6d 00 00 addis r3,r13,0
1360 - 10000104: 4b ff ff e8 b 100000ec <_start\+0x4>
1361 - 10000108: 60 00 00 00 nop
1362 - 1000010c: 38 63 10 00 addi r3,r3,4096
1363 - 10000110: e8 83 80 00 ld r4,-32768\(r3\)
1364 - 10000114: 3c 6d 00 00 addis r3,r13,0
1365 - 10000118: 48 00 00 0c b 10000124 <_start\+0x3c>
1366 - 1000011c: 3c 6d 00 00 addis r3,r13,0
1367 - 10000120: 48 00 00 14 b 10000134 <_start\+0x4c>
1368 - 10000124: 60 00 00 00 nop
1369 - 10000128: 38 63 90 04 addi r3,r3,-28668
1370 - 1000012c: e8 a3 00 00 ld r5,0\(r3\)
1371 - 10000130: 4b ff ff ec b 1000011c <_start\+0x34>
1372 - 10000134: 60 00 00 00 nop
1373 - 10000138: 38 63 10 00 addi r3,r3,4096
1374 - 1000013c: e8 a3 80 04 ld r5,-32764\(r3\)
1375 +0+10000[0-9a-f]{3} <_start>:
1376 + 10000[0-9a-f]{3}: 48 00 00 18 b 10000[0-9a-f]{3} <_start\+0x18>
1377 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1378 + 10000[0-9a-f]{3}: 38 63 90 00 addi r3,r3,-28672
1379 + 10000[0-9a-f]{3}: e8 83 00 00 ld r4,0\(r3\)
1380 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1381 + 10000[0-9a-f]{3}: 48 00 00 0c b 10000[0-9a-f]{3} <_start\+0x20>
1382 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1383 + 10000[0-9a-f]{3}: 4b ff ff e8 b 10000[0-9a-f]{3} <_start\+0x4>
1384 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1385 + 10000[0-9a-f]{3}: 38 63 10 00 addi r3,r3,4096
1386 + 10000[0-9a-f]{3}: e8 83 80 00 ld r4,-32768\(r3\)
1387 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1388 + 10000[0-9a-f]{3}: 48 00 00 0c b 10000[0-9a-f]{3} <_start\+0x3c>
1389 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1390 + 10000[0-9a-f]{3}: 48 00 00 14 b 10000[0-9a-f]{3} <_start\+0x4c>
1391 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1392 + 10000[0-9a-f]{3}: 38 63 90 04 addi r3,r3,-28668
1393 + 10000[0-9a-f]{3}: e8 a3 00 00 ld r5,0\(r3\)
1394 + 10000[0-9a-f]{3}: 4b ff ff ec b 10000[0-9a-f]{3} <_start\+0x34>
1395 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1396 + 10000[0-9a-f]{3}: 38 63 10 00 addi r3,r3,4096
1397 + 10000[0-9a-f]{3}: e8 a3 80 04 ld r5,-32764\(r3\)
1398
1399 -0+10000140 <\.__tls_get_addr>:
1400 - 10000140: 4e 80 00 20 blr
1401 +0+10000[0-9a-f]{3} <\.__tls_get_addr>:
1402 + 10000[0-9a-f]{3}: 4e 80 00 20 blr
1403 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsmark32.d
1404 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsmark32.d
1405 @@ -9,17 +9,17 @@
1406
1407 Disassembly of section \.text:
1408
1409 -0+1800094 <_start>:
1410 - 1800094: 48 00 00 14 b 18000a8 <_start\+0x14>
1411 - 1800098: 38 63 90 00 addi r3,r3,-28672
1412 - 180009c: 80 83 00 00 lwz r4,0\(r3\)
1413 - 18000a0: 3c 62 00 00 addis r3,r2,0
1414 - 18000a4: 48 00 00 0c b 18000b0 <_start\+0x1c>
1415 - 18000a8: 3c 62 00 00 addis r3,r2,0
1416 - 18000ac: 4b ff ff ec b 1800098 <_start\+0x4>
1417 - 18000b0: 38 63 10 00 addi r3,r3,4096
1418 - 18000b4: 80 83 80 00 lwz r4,-32768\(r3\)
1419 +0+18000[0-9a-f]{2} <_start>:
1420 + 18000[0-9a-f]{2}: 48 00 00 14 b 18000[0-9a-f]{2} <_start\+0x14>
1421 + 18000[0-9a-f]{2}: 38 63 90 00 addi r3,r3,-28672
1422 + 18000[0-9a-f]{2}: 80 83 00 00 lwz r4,0\(r3\)
1423 + 18000[0-9a-f]{2}: 3c 62 00 00 addis r3,r2,0
1424 + 18000[0-9a-f]{2}: 48 00 00 0c b 18000[0-9a-f]{2} <_start\+0x1c>
1425 + 18000[0-9a-f]{2}: 3c 62 00 00 addis r3,r2,0
1426 + 18000[0-9a-f]{2}: 4b ff ff ec b 18000[0-9a-f]{2} <_start\+0x4>
1427 + 18000[0-9a-f]{2}: 38 63 10 00 addi r3,r3,4096
1428 + 18000[0-9a-f]{2}: 80 83 80 00 lwz r4,-32768\(r3\)
1429
1430 -0+18000b8 <__tls_get_addr>:
1431 - 18000b8: 4e 80 00 20 blr
1432 -#pass
1433 \ No newline at end of file
1434 +0+18000[0-9a-f]{2} <__tls_get_addr>:
1435 + 18000[0-9a-f]{2}: 4e 80 00 20 blr
1436 +#pass
1437 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsopt1.d
1438 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsopt1.d
1439 @@ -9,17 +9,17 @@
1440
1441 Disassembly of section \.text:
1442
1443 -0+100000e8 <\.__tls_get_addr>:
1444 - 100000e8: 4e 80 00 20 blr
1445 +0+10000[0-9a-f]{3} <\.__tls_get_addr>:
1446 + 10000[0-9a-f]{3}: 4e 80 00 20 blr
1447
1448 Disassembly of section \.no_opt1:
1449
1450 -0+100000ec <\.no_opt1>:
1451 - 100000ec: 38 62 80 08 addi r3,r2,-32760
1452 - 100000f0: 2c 24 00 00 cmpdi r4,0
1453 - 100000f4: 41 82 00 10 beq- .*
1454 - 100000f8: 4b ff ff f1 bl 100000e8 <\.__tls_get_addr>
1455 - 100000fc: 60 00 00 00 nop
1456 - 10000100: 48 00 00 0c b .*
1457 - 10000104: 4b ff ff e5 bl 100000e8 <\.__tls_get_addr>
1458 - 10000108: 60 00 00 00 nop
1459 +0+10000[0-9a-f]{3} <\.no_opt1>:
1460 + 10000[0-9a-f]{3}: 38 62 80 08 addi r3,r2,-32760
1461 + 10000[0-9a-f]{3}: 2c 24 00 00 cmpdi r4,0
1462 + 10000[0-9a-f]{3}: 41 82 00 10 beq- .*
1463 + 10000[0-9a-f]{3}: 4b ff ff f1 bl 10000[0-9a-f]{3} <\.__tls_get_addr>
1464 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1465 + 10000[0-9a-f]{3}: 48 00 00 0c b .*
1466 + 10000[0-9a-f]{3}: 4b ff ff e5 bl 10000[0-9a-f]{3} <\.__tls_get_addr>
1467 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1468 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsopt1_32.d
1469 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsopt1_32.d
1470 @@ -9,16 +9,16 @@
1471
1472 Disassembly of section \.text:
1473
1474 -0+1800094 <__tls_get_addr>:
1475 - 1800094: 4e 80 00 20 blr
1476 +0+18000[0-9a-f]{2} <__tls_get_addr>:
1477 + 18000[0-9a-f]{2}: 4e 80 00 20 blr
1478
1479 Disassembly of section \.no_opt1:
1480
1481 -0+1800098 <\.no_opt1>:
1482 - 1800098: 38 6d ff f4 addi r3,r13,-12
1483 - 180009c: 2c 04 00 00 cmpwi r4,0
1484 - 18000a0: 41 82 00 0c beq- .*
1485 - 18000a4: 4b ff ff f1 bl 1800094 <__tls_get_addr>
1486 - 18000a8: 48 00 00 08 b .*
1487 - 18000ac: 4b ff ff e9 bl 1800094 <__tls_get_addr>
1488 +0+18000[0-9a-f]{2} <\.no_opt1>:
1489 + 18000[0-9a-f]{2}: 38 6d ff f4 addi r3,r13,-12
1490 + 18000[0-9a-f]{2}: 2c 04 00 00 cmpwi r4,0
1491 + 18000[0-9a-f]{2}: 41 82 00 0c beq- .*
1492 + 18000[0-9a-f]{2}: 4b ff ff f1 bl 18000[0-9a-f]{2} <__tls_get_addr>
1493 + 18000[0-9a-f]{2}: 48 00 00 08 b .*
1494 + 18000[0-9a-f]{2}: 4b ff ff e9 bl 18000[0-9a-f]{2} <__tls_get_addr>
1495 #pass
1496 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsopt2.d
1497 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsopt2.d
1498 @@ -9,15 +9,15 @@
1499
1500 Disassembly of section \.text:
1501
1502 -0+100000e8 <\.__tls_get_addr>:
1503 - 100000e8: 4e 80 00 20 blr
1504 +0+10000[0-9a-f]{3} <\.__tls_get_addr>:
1505 + 10000[0-9a-f]{3}: 4e 80 00 20 blr
1506
1507 Disassembly of section \.no_opt2:
1508
1509 -0+100000ec <\.no_opt2>:
1510 - 100000ec: 38 62 80 08 addi r3,r2,-32760
1511 - 100000f0: 2c 24 00 00 cmpdi r4,0
1512 - 100000f4: 41 82 00 08 beq- .*
1513 - 100000f8: 38 62 80 08 addi r3,r2,-32760
1514 - 100000fc: 4b ff ff ed bl 100000e8 <\.__tls_get_addr>
1515 - 10000100: 60 00 00 00 nop
1516 +0+10000[0-9a-f]{3} <\.no_opt2>:
1517 + 10000[0-9a-f]{3}: 38 62 80 08 addi r3,r2,-32760
1518 + 10000[0-9a-f]{3}: 2c 24 00 00 cmpdi r4,0
1519 + 10000[0-9a-f]{3}: 41 82 00 08 beq- .*
1520 + 10000[0-9a-f]{3}: 38 62 80 08 addi r3,r2,-32760
1521 + 10000[0-9a-f]{3}: 4b ff ff ed bl 10000[0-9a-f]{3} <\.__tls_get_addr>
1522 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1523 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsopt2_32.d
1524 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsopt2_32.d
1525 @@ -9,15 +9,15 @@
1526
1527 Disassembly of section \.text:
1528
1529 -0+1800094 <__tls_get_addr>:
1530 - 1800094: 4e 80 00 20 blr
1531 +0+18000[0-9a-f]{2} <__tls_get_addr>:
1532 + 18000[0-9a-f]{2}: 4e 80 00 20 blr
1533
1534 Disassembly of section \.no_opt2:
1535
1536 -0+1800098 <\.no_opt2>:
1537 - 1800098: 38 6d ff f4 addi r3,r13,-12
1538 - 180009c: 2c 04 00 00 cmpwi r4,0
1539 - 18000a0: 41 82 00 08 beq- .*
1540 - 18000a4: 38 6d ff f4 addi r3,r13,-12
1541 - 18000a8: 4b ff ff ed bl 1800094 <__tls_get_addr>
1542 +0+18000[0-9a-f]{2} <\.no_opt2>:
1543 + 18000[0-9a-f]{2}: 38 6d ff f4 addi r3,r13,-12
1544 + 18000[0-9a-f]{2}: 2c 04 00 00 cmpwi r4,0
1545 + 18000[0-9a-f]{2}: 41 82 00 08 beq- .*
1546 + 18000[0-9a-f]{2}: 38 6d ff f4 addi r3,r13,-12
1547 + 18000[0-9a-f]{2}: 4b ff ff ed bl 18000[0-9a-f]{2} <__tls_get_addr>
1548 #pass
1549 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsopt3.d
1550 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsopt3.d
1551 @@ -9,18 +9,18 @@
1552
1553 Disassembly of section \.text:
1554
1555 -00000000100000e8 <\.__tls_get_addr>:
1556 - 100000e8: 4e 80 00 20 blr
1557 +0000000010000[0-9a-f]{3} <\.__tls_get_addr>:
1558 + 10000[0-9a-f]{3}: 4e 80 00 20 blr
1559
1560 Disassembly of section \.no_opt3:
1561
1562 -00000000100000ec <\.no_opt3>:
1563 - 100000ec: 38 62 80 08 addi r3,r2,-32760
1564 - 100000f0: 48 00 00 0c b .*
1565 - 100000f4: 38 62 80 18 addi r3,r2,-32744
1566 - 100000f8: 48 00 00 10 b .*
1567 - 100000fc: 4b ff ff ed bl 100000e8 <\.__tls_get_addr>
1568 - 10000100: 60 00 00 00 nop
1569 - 10000104: 48 00 00 0c b .*
1570 - 10000108: 4b ff ff e1 bl 100000e8 <\.__tls_get_addr>
1571 - 1000010c: 60 00 00 00 nop
1572 +0000000010000[0-9a-f]{3} <\.no_opt3>:
1573 + 10000[0-9a-f]{3}: 38 62 80 08 addi r3,r2,-32760
1574 + 10000[0-9a-f]{3}: 48 00 00 0c b .*
1575 + 10000[0-9a-f]{3}: 38 62 80 18 addi r3,r2,-32744
1576 + 10000[0-9a-f]{3}: 48 00 00 10 b .*
1577 + 10000[0-9a-f]{3}: 4b ff ff ed bl 10000[0-9a-f]{3} <\.__tls_get_addr>
1578 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1579 + 10000[0-9a-f]{3}: 48 00 00 0c b .*
1580 + 10000[0-9a-f]{3}: 4b ff ff e1 bl 10000[0-9a-f]{3} <\.__tls_get_addr>
1581 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1582 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsopt3_32.d
1583 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsopt3_32.d
1584 @@ -9,17 +9,17 @@
1585
1586 Disassembly of section \.text:
1587
1588 -0+1800094 <__tls_get_addr>:
1589 - 1800094: 4e 80 00 20 blr
1590 +0+18000[0-9a-f]{2} <__tls_get_addr>:
1591 + 18000[0-9a-f]{2}: 4e 80 00 20 blr
1592
1593 Disassembly of section \.no_opt3:
1594
1595 -0+1800098 <\.no_opt3>:
1596 - 1800098: 38 6d ff ec addi r3,r13,-20
1597 - 180009c: 48 00 00 0c b .*
1598 - 18000a0: 38 6d ff f4 addi r3,r13,-12
1599 - 18000a4: 48 00 00 0c b .*
1600 - 18000a8: 4b ff ff ed bl 1800094 <__tls_get_addr>
1601 - 18000ac: 48 00 00 08 b .*
1602 - 18000b0: 4b ff ff e5 bl 1800094 <__tls_get_addr>
1603 +0+18000[0-9a-f]{2} <\.no_opt3>:
1604 + 18000[0-9a-f]{2}: 38 6d ff ec addi r3,r13,-20
1605 + 18000[0-9a-f]{2}: 48 00 00 0c b .*
1606 + 18000[0-9a-f]{2}: 38 6d ff f4 addi r3,r13,-12
1607 + 18000[0-9a-f]{2}: 48 00 00 0c b .*
1608 + 18000[0-9a-f]{2}: 4b ff ff ed bl 18000[0-9a-f]{2} <__tls_get_addr>
1609 + 18000[0-9a-f]{2}: 48 00 00 08 b .*
1610 + 18000[0-9a-f]{2}: 4b ff ff e5 bl 18000[0-9a-f]{2} <__tls_get_addr>
1611 #pass
1612 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsopt4.d
1613 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsopt4.d
1614 @@ -9,40 +9,40 @@
1615
1616 Disassembly of section \.text:
1617
1618 -0+100000e8 <\.__tls_get_addr>:
1619 - 100000e8: 4e 80 00 20 blr
1620 +0+10000[0-9a-f]{3} <\.__tls_get_addr>:
1621 + 10000[0-9a-f]{3}: 4e 80 00 20 blr
1622
1623 Disassembly of section \.opt1:
1624
1625 -0+100000ec <\.opt1>:
1626 - 100000ec: 3c 6d 00 00 addis r3,r13,0
1627 - 100000f0: 2c 24 00 00 cmpdi r4,0
1628 - 100000f4: 41 82 00 10 beq- .*
1629 - 100000f8: 60 00 00 00 nop
1630 - 100000fc: 38 63 90 10 addi r3,r3,-28656
1631 - 10000100: 48 00 00 0c b .*
1632 - 10000104: 60 00 00 00 nop
1633 - 10000108: 38 63 90 10 addi r3,r3,-28656
1634 +0+10000[0-9a-f]{3} <\.opt1>:
1635 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1636 + 10000[0-9a-f]{3}: 2c 24 00 00 cmpdi r4,0
1637 + 10000[0-9a-f]{3}: 41 82 00 10 beq- .*
1638 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1639 + 10000[0-9a-f]{3}: 38 63 90 10 addi r3,r3,-28656
1640 + 10000[0-9a-f]{3}: 48 00 00 0c b .*
1641 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1642 + 10000[0-9a-f]{3}: 38 63 90 10 addi r3,r3,-28656
1643
1644 Disassembly of section \.opt2:
1645
1646 -0+1000010c <\.opt2>:
1647 - 1000010c: 3c 6d 00 00 addis r3,r13,0
1648 - 10000110: 2c 24 00 00 cmpdi r4,0
1649 - 10000114: 41 82 00 08 beq- .*
1650 - 10000118: 3c 6d 00 00 addis r3,r13,0
1651 - 1000011c: 60 00 00 00 nop
1652 - 10000120: 38 63 90 10 addi r3,r3,-28656
1653 +0+10000[0-9a-f]{3} <\.opt2>:
1654 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1655 + 10000[0-9a-f]{3}: 2c 24 00 00 cmpdi r4,0
1656 + 10000[0-9a-f]{3}: 41 82 00 08 beq- .*
1657 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1658 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1659 + 10000[0-9a-f]{3}: 38 63 90 10 addi r3,r3,-28656
1660
1661 Disassembly of section \.opt3:
1662
1663 -0+10000124 <\.opt3>:
1664 - 10000124: 3c 6d 00 00 addis r3,r13,0
1665 - 10000128: 48 00 00 0c b .*
1666 - 1000012c: 3c 6d 00 00 addis r3,r13,0
1667 - 10000130: 48 00 00 10 b .*
1668 - 10000134: 60 00 00 00 nop
1669 - 10000138: 38 63 90 10 addi r3,r3,-28656
1670 - 1000013c: 48 00 00 0c b .*
1671 - 10000140: 60 00 00 00 nop
1672 - 10000144: 38 63 90 08 addi r3,r3,-28664
1673 +0+10000[0-9a-f]{3} <\.opt3>:
1674 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1675 + 10000[0-9a-f]{3}: 48 00 00 0c b .*
1676 + 10000[0-9a-f]{3}: 3c 6d 00 00 addis r3,r13,0
1677 + 10000[0-9a-f]{3}: 48 00 00 10 b .*
1678 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1679 + 10000[0-9a-f]{3}: 38 63 90 10 addi r3,r3,-28656
1680 + 10000[0-9a-f]{3}: 48 00 00 0c b .*
1681 + 10000[0-9a-f]{3}: 60 00 00 00 nop
1682 + 10000[0-9a-f]{3}: 38 63 90 08 addi r3,r3,-28664
1683 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsopt4_32.d
1684 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsopt4_32.d
1685 @@ -9,36 +9,36 @@
1686
1687 Disassembly of section \.text:
1688
1689 -0+1800094 <__tls_get_addr>:
1690 - 1800094: 4e 80 00 20 blr
1691 +0+18000[0-9a-f]{2} <__tls_get_addr>:
1692 + 18000[0-9a-f]{2}: 4e 80 00 20 blr
1693
1694 Disassembly of section \.opt1:
1695
1696 -0+1800098 <\.opt1>:
1697 - 1800098: 3c 62 00 00 addis r3,r2,0
1698 - 180009c: 2c 04 00 00 cmpwi r4,0
1699 - 18000a0: 41 82 00 0c beq- .*
1700 - 18000a4: 38 63 90 10 addi r3,r3,-28656
1701 - 18000a8: 48 00 00 08 b .*
1702 - 18000ac: 38 63 90 10 addi r3,r3,-28656
1703 +0+18000[0-9a-f]{2} <\.opt1>:
1704 + 18000[0-9a-f]{2}: 3c 62 00 00 addis r3,r2,0
1705 + 18000[0-9a-f]{2}: 2c 04 00 00 cmpwi r4,0
1706 + 18000[0-9a-f]{2}: 41 82 00 0c beq- .*
1707 + 18000[0-9a-f]{2}: 38 63 90 10 addi r3,r3,-28656
1708 + 18000[0-9a-f]{2}: 48 00 00 08 b .*
1709 + 18000[0-9a-f]{2}: 38 63 90 10 addi r3,r3,-28656
1710
1711 Disassembly of section \.opt2:
1712
1713 -0+18000b0 <\.opt2>:
1714 - 18000b0: 3c 62 00 00 addis r3,r2,0
1715 - 18000b4: 2c 04 00 00 cmpwi r4,0
1716 - 18000b8: 41 82 00 08 beq- .*
1717 - 18000bc: 3c 62 00 00 addis r3,r2,0
1718 - 18000c0: 38 63 90 10 addi r3,r3,-28656
1719 +0+18000[0-9a-f]{2} <\.opt2>:
1720 + 18000[0-9a-f]{2}: 3c 62 00 00 addis r3,r2,0
1721 + 18000[0-9a-f]{2}: 2c 04 00 00 cmpwi r4,0
1722 + 18000[0-9a-f]{2}: 41 82 00 08 beq- .*
1723 + 18000[0-9a-f]{2}: 3c 62 00 00 addis r3,r2,0
1724 + 18000[0-9a-f]{2}: 38 63 90 10 addi r3,r3,-28656
1725
1726 Disassembly of section \.opt3:
1727
1728 -0+18000c4 <\.opt3>:
1729 - 18000c4: 3c 62 00 00 addis r3,r2,0
1730 - 18000c8: 48 00 00 0c b .*
1731 - 18000cc: 3c 62 00 00 addis r3,r2,0
1732 - 18000d0: 48 00 00 0c b .*
1733 - 18000d4: 38 63 90 10 addi r3,r3,-28656
1734 - 18000d8: 48 00 00 08 b .*
1735 - 18000dc: 38 63 90 08 addi r3,r3,-28664
1736 +0+18000[0-9a-f]{2} <\.opt3>:
1737 + 18000[0-9a-f]{2}: 3c 62 00 00 addis r3,r2,0
1738 + 18000[0-9a-f]{2}: 48 00 00 0c b .*
1739 + 18000[0-9a-f]{2}: 3c 62 00 00 addis r3,r2,0
1740 + 18000[0-9a-f]{2}: 48 00 00 0c b .*
1741 + 18000[0-9a-f]{2}: 38 63 90 10 addi r3,r3,-28656
1742 + 18000[0-9a-f]{2}: 48 00 00 08 b .*
1743 + 18000[0-9a-f]{2}: 38 63 90 08 addi r3,r3,-28664
1744 #pass
1745 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsso32.d
1746 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsso32.d
1747 @@ -42,5 +42,5 @@ Disassembly of section \.got:
1748 .* <\.got>:
1749 \.\.\.
1750 .*: 4e 80 00 21 blrl
1751 -.*: 00 01 03 ec .*
1752 +.*: 00 01 [0-9a-f]{2} [0-9a-f]{2} .*
1753 \.\.\.
1754 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsso32.g
1755 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsso32.g
1756 @@ -9,5 +9,5 @@
1757 Contents of section \.got:
1758 .* 00000000 00000000 00000000 00000000 .*
1759 .* 00000000 00000000 00000000 00000000 .*
1760 -.* 00000000 4e800021 000103ec 00000000 .*
1761 +.* 00000000 4e800021 00010[0-9a-f]{3} 00000000 .*
1762 .* 00000000 .*
1763 --- binutils-2.22/ld/testsuite/ld-powerpc/tlsso32.r
1764 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlsso32.r
1765 @@ -35,6 +35,7 @@ Program Headers:
1766 +LOAD .* RWE 0x10000
1767 +DYNAMIC .* RW +0x4
1768 +TLS .* 0x0+1c 0x0+38 R +0x4
1769 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1770
1771 Section to Segment mapping:
1772 +Segment Sections\.\.\.
1773 @@ -42,6 +43,7 @@ Program Headers:
1774 +01 +\.tdata \.dynamic \.got \.plt
1775 +02 +\.dynamic
1776 +03 +\.tdata \.tbss
1777 + +04 +
1778
1779 Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
1780 Offset +Info +Type +Sym\. Value +Symbol's Name \+ Addend
1781 @@ -52,9 +54,9 @@ Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 18 entries:
1782 [0-9a-f ]+R_PPC_TPREL16 +0+30 +le0 \+ 0
1783 [0-9a-f ]+R_PPC_TPREL16_HA +0+34 +le1 \+ 0
1784 [0-9a-f ]+R_PPC_TPREL16_LO +0+34 +le1 \+ 0
1785 -[0-9a-f ]+R_PPC_TPREL16 +0+103d0 +\.tdata \+ 103e4
1786 -[0-9a-f ]+R_PPC_TPREL16_HA +0+103d0 +\.tdata \+ 103e8
1787 -[0-9a-f ]+R_PPC_TPREL16_LO +0+103d0 +\.tdata \+ 103e8
1788 +[0-9a-f ]+R_PPC_TPREL16 +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
1789 +[0-9a-f ]+R_PPC_TPREL16_HA +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
1790 +[0-9a-f ]+R_PPC_TPREL16_LO +0+103[df]0 +\.tdata \+ 10[0-9a-f]{3}
1791 [0-9a-f ]+R_PPC_DTPMOD32 +0+
1792 [0-9a-f ]+R_PPC_DTPREL32 +0+
1793 [0-9a-f ]+R_PPC_DTPMOD32 +0+
1794 --- binutils-2.22/ld/testsuite/ld-powerpc/tlstoc.g
1795 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlstoc.g
1796 @@ -8,8 +8,8 @@
1797 .*: +file format elf64-powerpc
1798
1799 Contents of section \.got:
1800 - 100101a0 00000000 00000001 00000000 00000000 .*
1801 - 100101b0 00000000 00000001 00000000 00000000 .*
1802 - 100101c0 00000000 00000001 00000000 00000000 .*
1803 - 100101d0 00000000 00000001 00000000 00000000 .*
1804 - 100101e0 ffffffff ffff8060 00000000 00000000 .*
1805 + 10010[0-9a-f]{3} 00000000 00000001 00000000 00000000 .*
1806 + 10010[0-9a-f]{3} 00000000 00000001 00000000 00000000 .*
1807 + 10010[0-9a-f]{3} 00000000 00000001 00000000 00000000 .*
1808 + 10010[0-9a-f]{3} 00000000 00000001 00000000 00000000 .*
1809 + 10010[0-9a-f]{3} ffffffff ffff8060 00000000 00000000 .*
1810 --- binutils-2.22/ld/testsuite/ld-powerpc/tlstoc.t
1811 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlstoc.t
1812 @@ -8,7 +8,7 @@
1813 .*: +file format elf64-powerpc
1814
1815 Contents of section \.tdata:
1816 - 10010148 00c0ffee 00000000 12345678 9abcdef0 .*
1817 - 10010158 23456789 abcdef01 3456789a bcdef012 .*
1818 - 10010168 456789ab cdef0123 56789abc def01234 .*
1819 - 10010178 6789abcd ef012345 789abcde f0123456 .*
1820 + 10010180 00c0ffee 00000000 12345678 9abcdef0 .*
1821 + 10010190 23456789 abcdef01 3456789a bcdef012 .*
1822 + 100101a0 456789ab cdef0123 56789abc def01234 .*
1823 + 100101b0 6789abcd ef012345 789abcde f0123456 .*
1824 --- binutils-2.22/ld/testsuite/ld-powerpc/tlstocso.g
1825 +++ binutils-2.22/ld/testsuite/ld-powerpc/tlstocso.g
1826 @@ -7,7 +7,7 @@
1827 .*: +file format elf64-powerpc
1828
1829 Contents of section \.got:
1830 -.* 00000000 000186c0 00000000 00000000 .*
1831 +.* 00000000 000186f8 00000000 00000000 .*
1832 .* 00000000 00000000 00000000 00000000 .*
1833 .* 00000000 00000000 00000000 00000000 .*
1834 .* 00000000 00000000 00000000 00000000 .*
1835 --- binutils-2.22/ld/testsuite/ld-s390/tlsbin.rd
1836 +++ binutils-2.22/ld/testsuite/ld-s390/tlsbin.rd
1837 @@ -36,13 +36,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
1838
1839 Program Headers:
1840 +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
1841 - +PHDR +0x0+34 0x0+400034 0x0+400034 0x0+c0 0x0+c0 R E 0x4
1842 - +INTERP +0x0+f4 0x0+4000f4 0x0+4000f4 0x0+11 0x0+11 R +0x1
1843 + +PHDR +0x0+34 0x0+400034 0x0+400034 0x0+e0 0x0+e0 R E 0x4
1844 + +INTERP +0x0+114 0x0+400114 0x0+400114 0x0+11 0x0+11 R +0x1
1845 .*Requesting program interpreter.*
1846 +LOAD .* R E 0x1000
1847 +LOAD .* RW +0x1000
1848 +DYNAMIC .* RW +0x4
1849 +TLS .* 0x0+60 0x0+a0 R +0x20
1850 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1851
1852 Section to Segment mapping:
1853 +Segment Sections...
1854 @@ -52,6 +53,7 @@ Program Headers:
1855 +03 +.tdata .dynamic .got *
1856 +04 +.dynamic *
1857 +05 +.tdata .tbss *
1858 + +06 +
1859
1860 Relocation section '.rela.dyn' at offset .* contains 4 entries:
1861 Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
1862 --- binutils-2.22/ld/testsuite/ld-s390/tlsbin_64.rd
1863 +++ binutils-2.22/ld/testsuite/ld-s390/tlsbin_64.rd
1864 @@ -36,13 +36,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
1865
1866 Program Headers:
1867 +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
1868 - +PHDR +0x0+40 0x0+80000040 0x0+80000040 0x0+150 0x0+150 R E 0x8
1869 - +INTERP +0x0+190 0x0+80000190 0x0+80000190 0x0+11 0x0+11 R +0x1
1870 + +PHDR +0x0+40 0x0+80000040 0x0+80000040 0x0+188 0x0+188 R E 0x8
1871 + +INTERP +0x0+1c8 0x0+800001c8 0x0+800001c8 0x0+11 0x0+11 R +0x1
1872 .*Requesting program interpreter.*
1873 +LOAD .* R E 0x1000
1874 +LOAD .* RW +0x1000
1875 +DYNAMIC .* RW +0x8
1876 +TLS .* 0x0+60 0x0+a0 R +0x20
1877 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1878
1879 Section to Segment mapping:
1880 +Segment Sections...
1881 @@ -52,6 +53,7 @@ Program Headers:
1882 +03 +.tdata .dynamic .got *
1883 +04 +.dynamic *
1884 +05 +.tdata .tbss *
1885 + +06 +
1886
1887 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
1888 +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
1889 --- binutils-2.22/ld/testsuite/ld-s390/tlspic.rd
1890 +++ binutils-2.22/ld/testsuite/ld-s390/tlspic.rd
1891 @@ -39,6 +39,7 @@ Program Headers:
1892 +LOAD .* RW +0x1000
1893 +DYNAMIC .* RW +0x4
1894 +TLS .* 0x0+60 0x0+80 R +0x20
1895 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1896
1897 Section to Segment mapping:
1898 +Segment Sections...
1899 @@ -46,6 +47,7 @@ Program Headers:
1900 +01 +.tdata .dynamic .got
1901 +02 +.dynamic
1902 +03 +.tdata .tbss
1903 + +04 +
1904
1905 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
1906 Offset +Info +Type +Sym.Value +Sym. Name \+ Addend
1907 --- binutils-2.22/ld/testsuite/ld-s390/tlspic_64.rd
1908 +++ binutils-2.22/ld/testsuite/ld-s390/tlspic_64.rd
1909 @@ -39,6 +39,7 @@ Program Headers:
1910 +LOAD .* RW +0x1000
1911 +DYNAMIC .* RW +0x8
1912 +TLS .* 0x0+60 0x0+80 R +0x20
1913 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1914
1915 Section to Segment mapping:
1916 +Segment Sections...
1917 @@ -46,6 +47,7 @@ Program Headers:
1918 +01 +.tdata .dynamic .got *
1919 +02 +.dynamic *
1920 +03 +.tdata .tbss *
1921 + +04 +
1922
1923 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
1924 +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
1925 --- binutils-2.22/ld/testsuite/ld-scripts/empty-aligned.d
1926 +++ binutils-2.22/ld/testsuite/ld-scripts/empty-aligned.d
1927 @@ -8,7 +8,9 @@
1928 Program Headers:
1929 +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg +Align
1930 +LOAD +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ [RWE ]+ +0x[0-9a-f]+
1931 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1932
1933 Section to Segment mapping:
1934 +Segment Sections\.\.\.
1935 +00 +.text
1936 + +01 +
1937 --- binutils-2.22/ld/testsuite/ld-sh/tlsbin-2.d
1938 +++ binutils-2.22/ld/testsuite/ld-sh/tlsbin-2.d
1939 @@ -44,6 +44,7 @@ Program Headers:
1940 +LOAD.*
1941 +DYNAMIC.*
1942 +TLS +0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x0+18 0x0+28 R +0x4
1943 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1944
1945 Section to Segment mapping:
1946 +Segment Sections\.\.\.
1947 @@ -53,6 +54,7 @@ Program Headers:
1948 +03 +\.tdata \.dynamic \.got *
1949 +04 +\.dynamic *
1950 +05 +\.tdata \.tbss *
1951 + +06 +
1952
1953 Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
1954 Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend
1955 --- binutils-2.22/ld/testsuite/ld-sh/tlspic-2.d
1956 +++ binutils-2.22/ld/testsuite/ld-sh/tlspic-2.d
1957 @@ -32,7 +32,7 @@ Key to Flags:
1958
1959 Elf file type is DYN \(Shared object file\)
1960 Entry point 0x[0-9a-f]+
1961 -There are 4 program headers, starting at offset [0-9]+
1962 +There are [0-9] program headers, starting at offset [0-9]+
1963
1964 Program Headers:
1965 +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
1966 @@ -40,6 +40,7 @@ Program Headers:
1967 +LOAD.*
1968 +DYNAMIC.*
1969 +TLS .* 0x0+18 0x0+20 R +0x4
1970 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1971
1972 Section to Segment mapping:
1973 +Segment Sections\.\.\.
1974 @@ -47,6 +48,7 @@ Program Headers:
1975 +01 +\.tdata \.dynamic \.got *
1976 +02 +\.dynamic *
1977 +03 +\.tdata \.tbss *
1978 + +04 +
1979
1980 Relocation section '\.rela\.dyn' at offset 0x[0-9a-f]+ contains 10 entries:
1981 Offset +Info +Type +Sym\.Value +Sym\. Name \+ Addend
1982 --- binutils-2.22/ld/testsuite/ld-sparc/gotop32.rd
1983 +++ binutils-2.22/ld/testsuite/ld-sparc/gotop32.rd
1984 @@ -31,6 +31,7 @@ Program Headers:
1985 +LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x10000
1986 +LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+2000 0x0+2000 RW +0x10000
1987 +DYNAMIC +0x0+2000 0x0+12000 0x0+12000 0x0+70 0x0+70 RW +0x4
1988 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1989 #...
1990
1991 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
1992 --- binutils-2.22/ld/testsuite/ld-sparc/gotop64.rd
1993 +++ binutils-2.22/ld/testsuite/ld-sparc/gotop64.rd
1994 @@ -31,6 +31,7 @@ Program Headers:
1995 +LOAD +0x0+ 0x0+ 0x0+ 0x0+2000 0x0+2000 R E 0x100000
1996 +LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+2000 0x0+2000 RW +0x100000
1997 +DYNAMIC +0x0+2000 0x0+102000 0x0+102000 0x0+e0 0x0+e0 RW +0x8
1998 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
1999 #...
2000
2001 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entries:
2002 --- binutils-2.22/ld/testsuite/ld-sparc/tlssunbin32.rd
2003 +++ binutils-2.22/ld/testsuite/ld-sparc/tlssunbin32.rd
2004 @@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
2005
2006 Program Headers:
2007 +Type +Offset +VirtAddr +PhysAddr +FileSiz MemSiz +Flg Align
2008 - +PHDR +0x0+34 0x0+10034 0x0+10034 0x0+c0 0x0+c0 R E 0x4
2009 - +INTERP +0x0+f4 0x0+100f4 0x0+100f4 0x0+11 0x0+11 R +0x1
2010 + +PHDR +0x0+34 0x0+10034 0x0+10034 (0x[0-9a-f]+) \1 R E 0x4
2011 + +INTERP +(0x[0-9a-f]+ ){3}0x0+11 0x0+11 R +0x1
2012 .*Requesting program interpreter.*
2013 +LOAD .* R E 0x10000
2014 +LOAD .* RW +0x10000
2015 +DYNAMIC .* RW +0x4
2016 +TLS .* 0x0+1060 0x0+10a0 R +0x4
2017 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
2018 #...
2019
2020 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
2021 --- binutils-2.22/ld/testsuite/ld-sparc/tlssunbin64.rd
2022 +++ binutils-2.22/ld/testsuite/ld-sparc/tlssunbin64.rd
2023 @@ -30,13 +30,14 @@ There are [0-9]+ program headers, starting at offset [0-9]+
2024
2025 Program Headers:
2026 +Type +Offset +VirtAddr +PhysAddr +FileSiz +MemSiz +Flg Align
2027 - +PHDR +0x0+40 0x0+100040 0x0+100040 0x0+150 0x0+150 R E 0x8
2028 - +INTERP +0x0+190 0x0+100190 0x0+100190 0x0+19 0x0+19 R +0x1
2029 + +PHDR +0x0+40 0x0+100040 0x0+100040 (0x[0-9a-f]+) \1 R E 0x8
2030 + +INTERP +0x0+([0-9a-f]+) (0x0+10+\1) \2 0x0+19 0x0+19 R +0x1
2031 .*Requesting program interpreter.*
2032 +LOAD .* R E 0x100000
2033 +LOAD .* RW +0x100000
2034 +DYNAMIC .* RW +0x8
2035 +TLS .* 0x0+60 0x0+a0 R +0x4
2036 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
2037 #...
2038
2039 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 4 entries:
2040 --- binutils-2.22/ld/testsuite/ld-sparc/tlssunnopic32.rd
2041 +++ binutils-2.22/ld/testsuite/ld-sparc/tlssunnopic32.rd
2042 @@ -32,6 +32,7 @@ Program Headers:
2043 +LOAD .* RW +0x10000
2044 +DYNAMIC .* RW +0x4
2045 +TLS .* 0x0+ 0x0+24 R +0x4
2046 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
2047 #...
2048
2049 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 12 entries:
2050 --- binutils-2.22/ld/testsuite/ld-sparc/tlssunnopic64.rd
2051 +++ binutils-2.22/ld/testsuite/ld-sparc/tlssunnopic64.rd
2052 @@ -32,6 +32,7 @@ Program Headers:
2053 +LOAD .* RW +0x100000
2054 +DYNAMIC .* RW +0x8
2055 +TLS .* 0x0+ 0x0+24 R +0x4
2056 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
2057 #...
2058
2059 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
2060 --- binutils-2.22/ld/testsuite/ld-sparc/tlssunpic32.rd
2061 +++ binutils-2.22/ld/testsuite/ld-sparc/tlssunpic32.rd
2062 @@ -36,6 +36,7 @@ Program Headers:
2063 +LOAD +0x0+2000 0x0+12000 0x0+12000 0x0+184 0x0+184 RWE 0x10000
2064 +DYNAMIC +0x0+2060 0x0+12060 0x0+12060 0x0+98 0x0+98 RW +0x4
2065 +TLS +0x0+2000 0x0+12000 0x0+12000 0x0+60 0x0+80 R +0x4
2066 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
2067 #...
2068
2069 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
2070 --- binutils-2.22/ld/testsuite/ld-sparc/tlssunpic64.rd
2071 +++ binutils-2.22/ld/testsuite/ld-sparc/tlssunpic64.rd
2072 @@ -36,6 +36,7 @@ Program Headers:
2073 +LOAD +0x0+2000 0x0+102000 0x0+102000 0x0+3a0 0x0+3a0 RWE 0x100000
2074 +DYNAMIC +0x0+2060 0x0+102060 0x0+102060 0x0+130 0x0+130 RW +0x8
2075 +TLS +0x0+2000 0x0+102000 0x0+102000 0x0+60 0x0+80 R +0x4
2076 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
2077 #...
2078
2079 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
2080 --- binutils-2.22/ld/testsuite/ld-x86-64/protected3.d
2081 +++ binutils-2.22/ld/testsuite/ld-x86-64/protected3.d
2082 @@ -8,6 +8,6 @@
2083 Disassembly of section .text:
2084
2085 0+[a-f0-9]+ <bar>:
2086 -[ ]*[a-f0-9]+: 8b 05 [a-f0-9][a-f0-9] 00 [a-f0-9][a-f0-9] 00 mov 0x[a-f0-9]+\(%rip\),%eax # [a-f0-9]+ <foo>
2087 +[ ]*[a-f0-9]+: 8b 05 [a-f0-9][a-f0-9] [a-f0-9][a-f0-9] [a-f0-9][a-f0-9] 00 mov 0x[a-f0-9]+\(%rip\),%eax # [a-f0-9]+ <foo>
2088 [ ]*[a-f0-9]+: c3 retq
2089 #pass
2090 --- binutils-2.22/ld/testsuite/ld-x86-64/tlsgdesc.rd
2091 +++ binutils-2.22/ld/testsuite/ld-x86-64/tlsgdesc.rd
2092 @@ -36,12 +36,14 @@ Program Headers:
2093 +LOAD.*
2094 +LOAD.*
2095 +DYNAMIC.*
2096 + +PAX_FLAGS.*
2097
2098 Section to Segment mapping:
2099 +Segment Sections...
2100 +00 +.hash .dynsym .dynstr .rela.dyn .rela.plt .plt .text *
2101 +01 +.dynamic .got .got.plt *
2102 +02 +.dynamic *
2103 + +03 +
2104
2105 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
2106 +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
2107 --- binutils-2.22/ld/testsuite/ld-x86-64/tlspic.rd
2108 +++ binutils-2.22/ld/testsuite/ld-x86-64/tlspic.rd
2109 @@ -40,6 +40,7 @@ Program Headers:
2110 +LOAD +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+244 0x0+244 RW +0x200000
2111 +DYNAMIC +0x0+1210 0x0+201210 0x0+201210 0x0+130 0x0+130 RW +0x8
2112 +TLS +0x0+11ac 0x0+2011ac 0x0+2011ac 0x0+60 0x0+80 R +0x1
2113 + +PAX_FLAGS +0x0+ 0x0+ 0x0+ 0x0+ 0x0+ +0x[48]
2114
2115 Section to Segment mapping:
2116 +Segment Sections...
2117 @@ -47,6 +48,7 @@ Program Headers:
2118 +01 +.tdata .dynamic .got .got.plt *
2119 +02 +.dynamic *
2120 +03 +.tdata .tbss *
2121 + +04 +
2122
2123 Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
2124 +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
2125
2126
2127
2128 1.1 src/patchsets/binutils/2.22.52.0.1/65_all_binutils-2.20-amd64-32bit-path.patch
2129
2130 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/65_all_binutils-2.20-amd64-32bit-path.patch?rev=1.1&view=markup
2131 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/65_all_binutils-2.20-amd64-32bit-path.patch?rev=1.1&content-type=text/plain
2132
2133 Index: 65_all_binutils-2.20-amd64-32bit-path.patch
2134 ===================================================================
2135 --- binutils/ld/emulparams/elf_i386.sh
2136 +++ binutils/ld/emulparams/elf_i386.sh
2137 @@ -13,3 +13,13 @@
2138 SEPARATE_GOTPLT=12
2139 IREL_IN_PLT=
2140 SHARABLE_SECTIONS=yes
2141 +
2142 +# In Gentoo, we install 32bit libs into /lib32 in an
2143 +# ABI setup with amd64/x86
2144 +case "$target" in
2145 + x86_64*-linux*)
2146 + case "$EMULATION_NAME" in
2147 + *i386*) LIBPATH_SUFFIX=32 ;;
2148 + esac
2149 + ;;
2150 +esac
2151
2152
2153
2154 1.1 src/patchsets/binutils/2.22.52.0.1/66_all_binutils-2.22.52.0.1-warn-textrel.patch
2155
2156 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/66_all_binutils-2.22.52.0.1-warn-textrel.patch?rev=1.1&view=markup
2157 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/66_all_binutils-2.22.52.0.1-warn-textrel.patch?rev=1.1&content-type=text/plain
2158
2159 Index: 66_all_binutils-2.22.52.0.1-warn-textrel.patch
2160 ===================================================================
2161 textrels are bad for forcing copy-on-write (this affects everyone),
2162 and for security/runtime code generation, this affects security ppl.
2163 But in either case, it doesn't matter who needs textrels, it's
2164 the very fact that they're needed at all.
2165
2166 2006-06-10 Ned Ludd <solar@g.o>, Mike Frysinger <vapier@g.o>
2167
2168 * bfd/elflink.c (bfd_elf_final_link): Check all objects for TEXTRELs.
2169 * ld/ldmain.c (main): Change textrel warning default to true.
2170 * ld/testsuite/lib/ld-lib.exp (default_ld_simple_link): Scrub TEXTREL
2171 warnings from ld output.
2172
2173 --- a/bfd/elflink.c
2174 +++ b/bfd/elflink.c
2175 @@ -8652,7 +8652,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
2176 goto error_return;
2177
2178 /* Check for DT_TEXTREL (late, in case the backend removes it). */
2179 - if (((info->warn_shared_textrel && info->shared)
2180 + if ((info->warn_shared_textrel
2181 || info->error_textrel)
2182 && (o = bfd_get_section_by_name (dynobj, ".dynamic")) != NULL)
2183 {
2184 @@ -8702,7 +8702,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
2185 (_("%P%X: read-only segment has dynamic relocations.\n"));
2186 else
2187 info->callbacks->einfo
2188 - (_("%P: warning: creating a DT_TEXTREL in a shared object.\n"));
2189 + (_("%P: warning: creating a DT_TEXTREL in object.\n"));
2190 break;
2191 }
2192 }
2193 --- a/ld/ldmain.c
2194 +++ b/ld/ldmain.c
2195 @@ -282,2 +282,3 @@ main (int argc, char **argv)
2196 link_info.spare_dynamic_tags = 5;
2197 + link_info.warn_shared_textrel = TRUE;
2198 link_info.sharable_sections = FALSE;
2199 --- a/ld/testsuite/lib/ld-lib.exp
2200 +++ b/ld/testsuite/lib/ld-lib.exp
2201 @@ -181,6 +181,10 @@ proc default_ld_simple_link { ld target
2202 # symbol, since the default linker script might use ENTRY.
2203 regsub -all "(^|\n)(\[^\n\]*: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
2204
2205 + # Gentoo tweak:
2206 + # We want to ignore TEXTREL warnings since we force enable them by default
2207 + regsub -all "^lt-ld-new: warning: creating a DT_TEXTREL in object\." $exec_output "\\1" exec_output
2208 +
2209 if [string match "" $exec_output] then {
2210 return 1
2211 } else {
2212
2213
2214
2215 1.1 src/patchsets/binutils/2.22.52.0.1/75_all_binutils-default-test-flags.patch
2216
2217 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/75_all_binutils-default-test-flags.patch?rev=1.1&view=markup
2218 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/75_all_binutils-default-test-flags.patch?rev=1.1&content-type=text/plain
2219
2220 Index: 75_all_binutils-default-test-flags.patch
2221 ===================================================================
2222 many tests rely on order of symbols and the gnu hash style/relro options
2223 change that. so to avoid having to constantly thrash in the test files,
2224 use the normal options that everyone tests against.
2225
2226 --- binutils/ld/testsuite/lib/ld-lib.exp
2227 +++ binutils/ld/testsuite/lib/ld-lib.exp
2228 @@ -84,7 +84,7 @@
2229 global HOSTING_EMU
2230
2231 remote_file host delete $target
2232 - return [run_host_cmd_yesno "$ld" "$HOSTING_EMU -o $target -r $objects"]
2233 + return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -z norelro -o $target -r $objects"]
2234 }
2235
2236 # Check to see if ld is being invoked with a non-endian output format
2237 @@ -158,7 +158,7 @@
2238
2239 remote_file host delete $target
2240
2241 - return [run_host_cmd_yesno "$ld" "$HOSTING_EMU $flags -o $target $objs $libs"]
2242 + return [run_host_cmd_yesno "$ld" "$HOSTING_EMU --hash-style=sysv -z norelro $flags -o $target $objs $libs"]
2243 }
2244
2245 # Link a program using ld, without including any libraries.
2246 @@ -189,7 +189,9 @@
2247 }
2248 set ldexe [string replace $ldexe 0 [string last "/" $ldexe] ""]
2249 if {[string match "*gcc*" $ldexe] || [string match "*++*" $ldexe]} then {
2250 - set ldflags "$gcc_ld_flag $ldflags"
2251 + set ldflags "$gcc_ld_flag -Wl,--hash-style=sysv -Wl,-z,norelro $ldflags"
2252 + } else {
2253 + set ldflags "--hash-style=sysv -z norelro $ldflags"
2254 }
2255
2256 remote_file host delete $target
2257
2258
2259
2260 1.1 src/patchsets/binutils/2.22.52.0.1/76_all_only-use-new-ld-dtags.patch.disabled
2261
2262 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/76_all_only-use-new-ld-dtags.patch.disabled?rev=1.1&view=markup
2263 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/76_all_only-use-new-ld-dtags.patch.disabled?rev=1.1&content-type=text/plain
2264
2265 Index: 76_all_only-use-new-ld-dtags.patch.disabled
2266 ===================================================================
2267 Don't generate RPATH if we're going to be generating RUNPATH.
2268
2269 need to ponder what ramifications this has before enabling it
2270
2271 --- binutils/bfd/elflink.c
2272 +++ binutils/bfd/elflink.c
2273 @@ -5382,11 +5382,15 @@
2274
2275 indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath,
2276 TRUE);
2277 - if (indx == (bfd_size_type) -1
2278 - || !_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
2279 + if (indx == (bfd_size_type) -1)
2280 return FALSE;
2281
2282 - if (info->new_dtags)
2283 + if (!info->new_dtags)
2284 + {
2285 + if (!_bfd_elf_add_dynamic_entry (info, DT_RPATH, indx))
2286 + return FALSE;
2287 + }
2288 + else
2289 {
2290 _bfd_elf_strtab_addref (elf_hash_table (info)->dynstr, indx);
2291 if (!_bfd_elf_add_dynamic_entry (info, DT_RUNPATH, indx))
2292
2293
2294
2295 1.1 src/patchsets/binutils/2.22.52.0.1/76_all_use-new-ld-dtags.patch
2296
2297 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/76_all_use-new-ld-dtags.patch?rev=1.1&view=markup
2298 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/76_all_use-new-ld-dtags.patch?rev=1.1&content-type=text/plain
2299
2300 Index: 76_all_use-new-ld-dtags.patch
2301 ===================================================================
2302 --- binutils/ld/ldmain.c
2303 +++ binutils/ld/ldmain.c
2304 @@ -296,6 +296,7 @@ main (int argc, char **argv)
2305
2306 link_info.allow_undefined_version = TRUE;
2307 link_info.keep_memory = TRUE;
2308 + link_info.new_dtags = TRUE;
2309 link_info.combreloc = TRUE;
2310 link_info.strip_discarded = TRUE;
2311 link_info.callbacks = &link_callbacks;
2312 --- binutils/ld/ld.texinfo
2313 +++ binutils/ld/ld.texinfo
2314 @@ -2036,8 +2036,9 @@
2315 systems may not understand them. If you specify
2316 @option{--enable-new-dtags}, the dynamic tags will be created as needed.
2317 If you specify @option{--disable-new-dtags}, no new dynamic tags will be
2318 -created. By default, the new dynamic tags are not created. Note that
2319 -those options are only available for ELF systems.
2320 +created. On Gentoo, by default, the new dynamic tags are created (this
2321 +differs from upstream behaviour). Note that those options are only
2322 +available for ELF systems.
2323
2324 @kindex --hash-size=@var{number}
2325 @item --hash-size=@var{number}
2326
2327
2328
2329 1.1 src/patchsets/binutils/2.22.52.0.1/77_all_generate-gnu-hash.patch
2330
2331 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/77_all_generate-gnu-hash.patch?rev=1.1&view=markup
2332 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/77_all_generate-gnu-hash.patch?rev=1.1&content-type=text/plain
2333
2334 Index: 77_all_generate-gnu-hash.patch
2335 ===================================================================
2336 --- binutils/ld/ldmain.c
2337 +++ binutils/ld/ldmain.c
2338 @@ -273,2 +273,5 @@ main (int argc, char **argv)
2339 link_info.emit_hash = TRUE;
2340 +#ifndef __mips__
2341 + link_info.emit_gnu_hash = TRUE;
2342 +#endif
2343 link_info.callbacks = &link_callbacks;
2344
2345
2346
2347 1.1 src/patchsets/binutils/2.22.52.0.1/78_all_use-relro.patch
2348
2349 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/78_all_use-relro.patch?rev=1.1&view=markup
2350 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/78_all_use-relro.patch?rev=1.1&content-type=text/plain
2351
2352 Index: 78_all_use-relro.patch
2353 ===================================================================
2354 background:
2355 http://www.airs.com/blog/archives/189
2356
2357 --- binutils/ld/ldmain.c
2358 +++ binutils/ld/ldmain.c
2359 @@ -293,2 +293,3 @@ main (int argc, char **argv)
2360 link_info.combreloc = TRUE;
2361 + link_info.relro = TRUE;
2362 link_info.strip_discarded = TRUE;
2363
2364
2365
2366 1.1 src/patchsets/binutils/2.22.52.0.1/91_all_libiberty-pic.patch
2367
2368 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/91_all_libiberty-pic.patch?rev=1.1&view=markup
2369 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/91_all_libiberty-pic.patch?rev=1.1&content-type=text/plain
2370
2371 Index: 91_all_libiberty-pic.patch
2372 ===================================================================
2373 --- libiberty/Makefile.in.mps 2004-05-13 15:53:17.000000000 +0200
2374 +++ libiberty/Makefile.in 2004-05-13 15:52:53.000000000 +0200
2375 @@ -224,6 +224,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA
2376 $(AR) $(AR_FLAGS) $(TARGETLIB) \
2377 $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
2378 $(RANLIB) $(TARGETLIB); \
2379 + cp $(TARGETLIB) ../ ; \
2380 cd ..; \
2381 else true; fi
2382
2383
2384
2385
2386 1.1 src/patchsets/binutils/2.22.52.0.1/README.history
2387
2388 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/README.history?rev=1.1&view=markup
2389 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/binutils/2.22.52.0.1/README.history?rev=1.1&content-type=text/plain
2390
2391 Index: README.history
2392 ===================================================================
2393 1.0 04 Feb 2012
2394 + 03_all_binutils-2.15.92.0.2-ppc64-pie.patch
2395 + 08_all_binutils-RPATH_ENVVAR-smack.patch
2396 + 12_all_sh-targets.patch
2397 + 20_all_ld-sysroot.patch
2398 + 30_all_binutils-2.22-flexible-tests.patch
2399 + 62_all_binutils-2.22-hardened-crtbegin.patch
2400 + 63_all_binutils-2.22.52.0.1-pt-pax-flags-20120204.patch
2401 + 65_all_binutils-2.20-amd64-32bit-path.patch
2402 + 66_all_binutils-2.22.52.0.1-warn-textrel.patch
2403 + 75_all_binutils-default-test-flags.patch
2404 + 76_all_use-new-ld-dtags.patch
2405 + 77_all_generate-gnu-hash.patch
2406 + 78_all_use-relro.patch
2407 + 91_all_libiberty-pic.patch