Gentoo Archives: gentoo-commits

From: "Mark Loeser (halcy0n)" <halcy0n@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/binutils/2.19.51.0.14: 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 42_all_012_check_ldrunpath_length.patch 63_all_binutils-2.18-pt-pax-flags-20070828.patch 65_all_binutils-2.18-amd64-32bit-path.patch 66_all_binutils-2.18.50.0.2-warn-textrel.patch 76_all_use-new-ld-dtags.patch 77_all_document-new-dtags-behaviour.patch 77_all_generate-gnu-hash.patch 78_all_use-relro.patch 91_all_libiberty-pic.patch README.history
Date: Thu, 23 Jul 2009 14:39:21
Message-Id: E1MTzS2-0008PE-0V@stork.gentoo.org
1 halcy0n 09/07/23 14:39:18
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 42_all_012_check_ldrunpath_length.patch
7 63_all_binutils-2.18-pt-pax-flags-20070828.patch
8 65_all_binutils-2.18-amd64-32bit-path.patch
9 66_all_binutils-2.18.50.0.2-warn-textrel.patch
10 76_all_use-new-ld-dtags.patch
11 77_all_document-new-dtags-behaviour.patch
12 77_all_generate-gnu-hash.patch
13 78_all_use-relro.patch 91_all_libiberty-pic.patch
14 README.history
15 Log:
16 Patchset bump
17
18 Revision Changes Path
19 1.1 src/patchsets/binutils/2.19.51.0.14/03_all_binutils-2.15.92.0.2-ppc64-pie.patch
20
21 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/03_all_binutils-2.15.92.0.2-ppc64-pie.patch?rev=1.1&view=markup
22 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/03_all_binutils-2.15.92.0.2-ppc64-pie.patch?rev=1.1&content-type=text/plain
23
24 Index: 03_all_binutils-2.15.92.0.2-ppc64-pie.patch
25 ===================================================================
26 --- bfd/elf64-ppc.c.jj 2004-09-27 16:46:06.000000000 -0400
27 +++ bfd/elf64-ppc.c 2004-10-04 09:09:50.000000000 -0400
28 @@ -9681,7 +9681,12 @@ ppc64_elf_relocate_section (bfd *output_
29 else if (!SYMBOL_REFERENCES_LOCAL (info, &h->elf)
30 && !is_opd
31 && r_type != R_PPC64_TOC)
32 - outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
33 + {
34 + outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
35 + if (h->elf.dynindx == -1
36 + && h->elf.root.type == bfd_link_hash_undefweak)
37 + memset (&outrel, 0, sizeof outrel);
38 + }
39 else
40 {
41 /* This symbol is local, or marked to become local,
42
43
44
45 1.1 src/patchsets/binutils/2.19.51.0.14/08_all_binutils-RPATH_ENVVAR-smack.patch
46
47 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/08_all_binutils-RPATH_ENVVAR-smack.patch?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/08_all_binutils-RPATH_ENVVAR-smack.patch?rev=1.1&content-type=text/plain
49
50 Index: 08_all_binutils-RPATH_ENVVAR-smack.patch
51 ===================================================================
52 http://sourceware.org/ml/binutils/2007-07/msg00401.html
53 http://sourceware.org/bugzilla/show_bug.cgi?id=4970
54
55 --- configure
56 +++ configure
57 @@ -5601,6 +5601,7 @@ case "${host}" in
58 *-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
59 *) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
60 esac
61 +RPATH_ENVVAR="cant_touch_this_nah_nah_nah"
62
63 # On systems where the dynamic library environment variable is PATH,
64 if test "$RPATH_ENVVAR" = PATH; then
65
66
67
68 1.1 src/patchsets/binutils/2.19.51.0.14/12_all_sh-targets.patch
69
70 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/12_all_sh-targets.patch?rev=1.1&view=markup
71 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/12_all_sh-targets.patch?rev=1.1&content-type=text/plain
72
73 Index: 12_all_sh-targets.patch
74 ===================================================================
75 r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines
76
77 Likewise, binutils has no idea about any of these new targets either, so we
78 fix that up too.. now we're able to actually build a real toolchain for
79 sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more
80 inept targets than that one, really. Go look, I promise).
81
82 --- binutils-2.16.90.0.2-dist/configure
83 +++ binutils-2.16.90.0.2/configure
84 @@ -1207,7 +1207,7 @@
85 am33_2.0-*-linux*)
86 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
87 ;;
88 - sh-*-linux*)
89 + sh*-*-linux*)
90 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
91 ;;
92 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
93 @@ -1495,7 +1495,7 @@
94 romp-*-*)
95 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
96 ;;
97 - sh-*-* | sh64-*-*)
98 + sh*-*-* | sh64-*-*)
99 case "${host}" in
100 i[3456789]86-*-vsta) ;; # don't add gprof back in
101 i[3456789]86-*-go32*) ;; # don't add gprof back in
102 --- binutils-2.16.90.0.2-dist/configure.ac
103 +++ binutils-2.16.90.0.2/configure.ac
104 @@ -424,7 +424,7 @@
105 am33_2.0-*-linux*)
106 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
107 ;;
108 - sh-*-linux*)
109 + sh*-*-linux*)
110 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
111 ;;
112 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
113 @@ -712,7 +712,7 @@
114 romp-*-*)
115 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
116 ;;
117 - sh-*-* | sh64-*-*)
118 + sh*-*-* | sh64-*-*)
119 case "${host}" in
120 i[[3456789]]86-*-vsta) ;; # don't add gprof back in
121 i[[3456789]]86-*-go32*) ;; # don't add gprof back in
122
123
124
125 1.1 src/patchsets/binutils/2.19.51.0.14/20_all_ld-sysroot.patch
126
127 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/20_all_ld-sysroot.patch?rev=1.1&view=markup
128 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/20_all_ld-sysroot.patch?rev=1.1&content-type=text/plain
129
130 Index: 20_all_ld-sysroot.patch
131 ===================================================================
132 Signed-off-by: Sven Rebhan <odinshorse@××××××××××.com>
133
134 Always try to prepend the sysroot prefix to absolute filenames first.
135
136 http://bugs.gentoo.org/275666
137 http://sourceware.org/bugzilla/show_bug.cgi?id=10340
138
139 --- ld/ldfile.c
140 +++ ld/ldfile.c
141 @@ -308,18 +308,24 @@
142 directory first. */
143 if (! entry->is_archive)
144 {
145 - if (entry->sysrooted && IS_ABSOLUTE_PATH (entry->filename))
146 + /* For absolute pathnames, try to always open the file in the
147 + sysroot first. If this fails, try to open the file at the
148 + given location. */
149 + entry->sysrooted = is_sysrooted_pathname(entry->filename, FALSE);
150 + if (IS_ABSOLUTE_PATH (entry->filename) && ld_sysroot && ! entry->sysrooted)
151 {
152 char *name = concat (ld_sysroot, entry->filename,
153 (const char *) NULL);
154 if (ldfile_try_open_bfd (name, entry))
155 {
156 entry->filename = name;
157 + entry->sysrooted = TRUE;
158 return TRUE;
159 }
160 free (name);
161 }
162 - else if (ldfile_try_open_bfd (entry->filename, entry))
163 +
164 + if (ldfile_try_open_bfd (entry->filename, entry))
165 {
166 entry->sysrooted = IS_ABSOLUTE_PATH (entry->filename)
167 && is_sysrooted_pathname (entry->filename, TRUE);
168
169
170
171 1.1 src/patchsets/binutils/2.19.51.0.14/42_all_012_check_ldrunpath_length.patch
172
173 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/42_all_012_check_ldrunpath_length.patch?rev=1.1&view=markup
174 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/42_all_012_check_ldrunpath_length.patch?rev=1.1&content-type=text/plain
175
176 Index: 42_all_012_check_ldrunpath_length.patch
177 ===================================================================
178 #!/bin/sh -e
179 ## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@××××××.org>
180 ##
181 ## All lines beginning with `## DP:' are a description of the patch.
182 ## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
183 ## DP: cases where -rpath isn't specified. (#151024)
184
185 if [ $# -ne 1 ]; then
186 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
187 exit 1
188 fi
189
190 [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
191 patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
192
193 case "$1" in
194 -patch) patch $patch_opts -p1 < $0;;
195 -unpatch) patch $patch_opts -p1 -R < $0;;
196 *)
197 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
198 exit 1;;
199 esac
200
201 exit 0
202
203 @DPATCH@
204 diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
205 --- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
206 +++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
207 @@ -692,6 +692,8 @@
208 && command_line.rpath == NULL)
209 {
210 lib_path = (const char *) getenv ("LD_RUN_PATH");
211 + if ((lib_path) && (strlen (lib_path) == 0))
212 + lib_path = NULL;
213 if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
214 force))
215 break;
216 @@ -871,6 +873,8 @@
217 rpath = command_line.rpath;
218 if (rpath == NULL)
219 rpath = (const char *) getenv ("LD_RUN_PATH");
220 + if ((rpath) && (strlen (rpath) == 0))
221 + rpath = NULL;
222 if (! (bfd_elf_size_dynamic_sections
223 (output_bfd, command_line.soname, rpath,
224 command_line.filter_shlib,
225
226
227
228 1.1 src/patchsets/binutils/2.19.51.0.14/63_all_binutils-2.18-pt-pax-flags-20070828.patch
229
230 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/63_all_binutils-2.18-pt-pax-flags-20070828.patch?rev=1.1&view=markup
231 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/63_all_binutils-2.18-pt-pax-flags-20070828.patch?rev=1.1&content-type=text/plain
232
233 Index: 63_all_binutils-2.18-pt-pax-flags-20070828.patch
234 ===================================================================
235 --- binutils-2.18/bfd/elf-bfd.h
236 +++ binutils-2.18/bfd/elf-bfd.h
237 @@ -1431,6 +1431,9 @@ struct elf_obj_tdata
238 /* Should the PT_GNU_RELRO segment be emitted? */
239 bfd_boolean relro;
240
241 + /* Segment flags for the PT_PAX_FLAGS segment. */
242 + unsigned int pax_flags;
243 +
244 /* Symbol version definitions in external objects. */
245 Elf_Internal_Verdef *verdef;
246
247 --- binutils-2.18/bfd/elf.c
248 +++ binutils-2.18/bfd/elf.c
249 @@ -1085,6 +1085,7 @@ get_segment_type (unsigned int p_type)
250 case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break;
251 case PT_GNU_STACK: pt = "STACK"; break;
252 case PT_GNU_RELRO: pt = "RELRO"; break;
253 + case PT_PAX_FLAGS: pt = "PAX_FLAGS"; break;
254 default: pt = NULL; break;
255 }
256 return pt;
257 @@ -2361,6 +2362,9 @@ bfd_section_from_phdr (bfd *abfd, Elf_In
258 case PT_GNU_RELRO:
259 return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "relro");
260
261 + case PT_PAX_FLAGS:
262 + return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "pax_flags");
263 +
264 default:
265 /* Check for any processor-specific program segment types. */
266 bed = get_elf_backend_data (abfd);
267 @@ -3341,6 +3345,11 @@ get_program_header_size (bfd *abfd, stru
268 ++segs;
269 }
270
271 + {
272 + /* We need a PT_PAX_FLAGS segment. */
273 + ++segs;
274 + }
275 +
276 for (s = abfd->sections; s != NULL; s = s->next)
277 {
278 if ((s->flags & SEC_LOAD) != 0
279 @@ -3868,6 +3877,20 @@ _bfd_elf_map_sections_to_segments (bfd *
280 pm = &m->next;
281 }
282
283 + {
284 + amt = sizeof (struct elf_segment_map);
285 + m = bfd_zalloc (abfd, amt);
286 + if (m == NULL)
287 + goto error_return;
288 + m->next = NULL;
289 + m->p_type = PT_PAX_FLAGS;
290 + m->p_flags = elf_tdata (abfd)->pax_flags;
291 + m->p_flags_valid = 1;
292 +
293 + *pm = m;
294 + pm = &m->next;
295 + }
296 +
297 free (sections);
298 elf_tdata (abfd)->segment_map = mfirst;
299 }
300 @@ -5010,7 +5033,8 @@ rewrite_elf_program_header (bfd *ibfd, b
301 6. PT_TLS segment includes only SHF_TLS sections.
302 7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.
303 8. PT_DYNAMIC should not contain empty sections at the beginning
304 - (with the possible exception of .dynamic). */
305 + (with the possible exception of .dynamic).
306 + 9. PT_PAX_FLAGS segments do not include any sections. */
307 #define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed) \
308 ((((segment->p_paddr \
309 ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
310 @@ -5018,6 +5042,7 @@ rewrite_elf_program_header (bfd *ibfd, b
311 && (section->flags & SEC_ALLOC) != 0) \
312 || IS_COREFILE_NOTE (segment, section)) \
313 && segment->p_type != PT_GNU_STACK \
314 + && segment->p_type != PT_PAX_FLAGS \
315 && (segment->p_type != PT_TLS \
316 || (section->flags & SEC_THREAD_LOCAL)) \
317 && (segment->p_type == PT_LOAD \
318 --- binutils-2.18/bfd/elflink.c
319 +++ binutils-2.18/bfd/elflink.c
320 @@ -5328,16 +5328,30 @@ bfd_elf_size_dynamic_sections (bfd *outp
321 return TRUE;
322
323 bed = get_elf_backend_data (output_bfd);
324 +
325 + elf_tdata (output_bfd)->pax_flags = PF_NORANDEXEC;
326 + if (info->execheap)
327 + elf_tdata (output_bfd)->pax_flags |= PF_NOMPROTECT;
328 + else if (info->noexecheap)
329 + elf_tdata (output_bfd)->pax_flags |= PF_MPROTECT;
330 +
331 if (info->execstack)
332 - elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
333 + {
334 + elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
335 + elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
336 + }
337 else if (info->noexecstack)
338 - elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
339 + {
340 + elf_tdata (output_bfd)->stack_flags = PF_R | PF_W;
341 + elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
342 + }
343 else
344 {
345 bfd *inputobj;
346 asection *notesec = NULL;
347 int exec = 0;
348
349 + elf_tdata (output_bfd)->pax_flags |= PF_NOEMUTRAMP;
350 for (inputobj = info->input_bfds;
351 inputobj;
352 inputobj = inputobj->link_next)
353 @@ -5350,7 +5364,11 @@ bfd_elf_size_dynamic_sections (bfd *outp
354 if (s)
355 {
356 if (s->flags & SEC_CODE)
357 - exec = PF_X;
358 + {
359 + elf_tdata (output_bfd)->pax_flags &= ~PF_NOEMUTRAMP;
360 + elf_tdata (output_bfd)->pax_flags |= PF_EMUTRAMP;
361 + exec = PF_X;
362 + }
363 notesec = s;
364 }
365 else if (bed->default_execstack)
366 --- binutils-2.18/binutils/readelf.c
367 +++ binutils-2.18/binutils/readelf.c
368 @@ -2469,6 +2469,7 @@ get_segment_type (unsigned long p_type)
369 return "GNU_EH_FRAME";
370 case PT_GNU_STACK: return "GNU_STACK";
371 case PT_GNU_RELRO: return "GNU_RELRO";
372 + case PT_PAX_FLAGS: return "PAX_FLAGS";
373
374 default:
375 if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
376 --- binutils-2.18/include/bfdlink.h
377 +++ binutils-2.18/include/bfdlink.h
378 @@ -321,6 +321,14 @@ struct bfd_link_info
379 /* TRUE if PT_GNU_RELRO segment should be created. */
380 unsigned int relro: 1;
381
382 + /* TRUE if PT_PAX_FLAGS segment should be created with PF_NOMPROTECT
383 + flags. */
384 + unsigned int execheap: 1;
385 +
386 + /* TRUE if PT_PAX_FLAGS segment should be created with PF_MPROTECT
387 + flags. */
388 + unsigned int noexecheap: 1;
389 +
390 /* TRUE if we should warn when adding a DT_TEXTREL to a shared object. */
391 unsigned int warn_shared_textrel: 1;
392
393 --- binutils-2.18/include/elf/common.h
394 +++ binutils-2.18/include/elf/common.h
395 @@ -309,6 +309,7 @@
396 #define PT_GNU_STACK (PT_LOOS + 0x474e551) /* Stack flags */
397 #define PT_GNU_RELRO (PT_LOOS + 0x474e552) /* Read-only after relocation */
398 #define PT_GNU_SHR (PT_LOOS + 0x474e554) /* Sharable segment */
399 +#define PT_PAX_FLAGS (PT_LOOS + 0x5041580) /* PaX flags */
400
401 /* Program segment permissions, in program header p_flags field. */
402
403 @@ -319,6 +320,21 @@
404 #define PF_MASKOS 0x0FF00000 /* New value, Oct 4, 1999 Draft */
405 #define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
406
407 +/* Flags to control PaX behavior. */
408 +
409 +#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
410 +#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
411 +#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
412 +#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
413 +#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
414 +#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
415 +#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
416 +#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
417 +#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
418 +#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
419 +#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
420 +#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
421 +
422 /* Values for section header, sh_type field. */
423
424 #define SHT_NULL 0 /* Section header table entry unused */
425 --- binutils-2.18/ld/emultempl/elf32.em
426 +++ binutils-2.18/ld/emultempl/elf32.em
427 @@ -2132,6 +2132,16 @@ fragment <<EOF
428 link_info.noexecstack = TRUE;
429 link_info.execstack = FALSE;
430 }
431 + else if (strcmp (optarg, "execheap") == 0)
432 + {
433 + link_info.execheap = TRUE;
434 + link_info.noexecheap = FALSE;
435 + }
436 + else if (strcmp (optarg, "noexecheap") == 0)
437 + {
438 + link_info.noexecheap = TRUE;
439 + link_info.execheap = FALSE;
440 + }
441 EOF
442
443 if test -n "$COMMONPAGESIZE"; then
444 @@ -2205,6 +2215,8 @@ fragment <<EOF
445 -z defs Report unresolved symbols in object files.\n"));
446 fprintf (file, _("\
447 -z execstack Mark executable as requiring executable stack\n"));
448 + fprintf (file, _("\
449 + -z execheap Mark executable as requiring executable heap\n"));
450 fprintf (file, _("\
451 -z initfirst Mark DSO to be initialized first at runtime\n"));
452 fprintf (file, _("\
453 @@ -2217,6 +2228,8 @@ fragment <<EOF
454 -z nodump Mark DSO not available to dldump\n"));
455 fprintf (file, _("\
456 -z noexecstack Mark executable as not requiring executable stack\n"));
457 + fprintf (file, _("\
458 + -z noexecheap Mark executable as not requiring executable heap\n"));
459 EOF
460
461 if test -n "$COMMONPAGESIZE"; then
462 --- binutils-2.18/ld/ldgram.y
463 +++ binutils-2.18/ld/ldgram.y
464 @@ -1099,6 +1099,8 @@ phdr_type:
465 $$ = exp_intop (0x6474e550);
466 else if (strcmp (s, "PT_GNU_STACK") == 0)
467 $$ = exp_intop (0x6474e551);
468 + else if (strcmp (s, "PT_PAX_FLAGS") == 0)
469 + $$ = exp_intop (0x65041580);
470 else
471 {
472 einfo (_("\
473
474
475
476 1.1 src/patchsets/binutils/2.19.51.0.14/65_all_binutils-2.18-amd64-32bit-path.patch
477
478 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/65_all_binutils-2.18-amd64-32bit-path.patch?rev=1.1&view=markup
479 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/65_all_binutils-2.18-amd64-32bit-path.patch?rev=1.1&content-type=text/plain
480
481 Index: 65_all_binutils-2.18-amd64-32bit-path.patch
482 ===================================================================
483 --- binutils/ld/emulparams/elf_i386.sh
484 +++ binutils/ld/emulparams/elf_i386.sh
485 @@ -13,3 +13,13 @@
486 NO_SMALL_DATA=yes
487 SEPARATE_GOTPLT=12
488 SHARABLE_SECTIONS=yes
489 +
490 +# In Gentoo, we install 32bit libs into /lib32 in an
491 +# ABI setup with amd64/x86
492 +case "$target" in
493 + x86_64*-linux*)
494 + case "$EMULATION_NAME" in
495 + *i386*) LIBPATH_SUFFIX=32 ;;
496 + esac
497 + ;;
498 +esac
499
500
501
502 1.1 src/patchsets/binutils/2.19.51.0.14/66_all_binutils-2.18.50.0.2-warn-textrel.patch
503
504 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/66_all_binutils-2.18.50.0.2-warn-textrel.patch?rev=1.1&view=markup
505 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/66_all_binutils-2.18.50.0.2-warn-textrel.patch?rev=1.1&content-type=text/plain
506
507 Index: 66_all_binutils-2.18.50.0.2-warn-textrel.patch
508 ===================================================================
509 textrels are bad for forcing copy-on-write (this affects everyone),
510 and for security/runtime code generation, this affects security ppl.
511 But in either case, it doesn't matter who needs textrels, it's
512 the very fact that they're needed at all.
513
514 2006-06-10 Ned Ludd <solar@g.o>, Mike Frysinger <vapier@g.o>
515
516 * bfd/elflink.c (bfd_elf_final_link): Check all objects for TEXTRELs.
517 * ld/ldmain.c (main): Change textrel warning default to true.
518 * ld/testsuite/lib/ld-lib.exp (default_ld_simple_link): Scrub TEXTREL
519 warnings from ld output.
520
521 --- bfd/elflink.c
522 +++ bfd/elflink.c
523 @@ -8652,14 +8652,12 @@
524 goto error_return;
525
526 /* Check for DT_TEXTREL (late, in case the backend removes it). */
527 - if (info->warn_shared_textrel && info->shared)
528 + o = bfd_get_section_by_name (dynobj, ".dynamic");
529 + if (info->warn_shared_textrel && o != NULL)
530 {
531 bfd_byte *dyncon, *dynconend;
532
533 /* Fix up .dynamic entries. */
534 - o = bfd_get_section_by_name (dynobj, ".dynamic");
535 - BFD_ASSERT (o != NULL);
536 -
537 dyncon = o->contents;
538 dynconend = o->contents + o->size;
539 for (; dyncon < dynconend; dyncon += bed->s->sizeof_dyn)
540 @@ -8702,7 +8702,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
541 if (dyn.d_tag == DT_TEXTREL)
542 {
543 info->callbacks->einfo
544 - (_("%P: warning: creating a DT_TEXTREL in a shared object.\n"));
545 + (_("%P: warning: creating a DT_TEXTREL in object.\n"));
546 break;
547 }
548 }
549 --- ld/ldmain.c
550 +++ ld/ldmain.c
551 @@ -282,2 +282,3 @@ main (int argc, char **argv)
552 link_info.spare_dynamic_tags = 5;
553 + link_info.warn_shared_textrel = TRUE;
554 link_info.sharable_sections = FALSE;
555 --- ld/testsuite/lib/ld-lib.exp
556 +++ ld/testsuite/lib/ld-lib.exp
557 @@ -181,6 +181,10 @@ proc default_ld_simple_link { ld target
558 # symbol, since the default linker script might use ENTRY.
559 regsub -all "(^|\n)(\[^\n\]*: warning: cannot find entry symbol\[^\n\]*\n?)" $exec_output "\\1" exec_output
560
561 + # Gentoo tweak:
562 + # We want to ignore TEXTREL warnings since we force enable them by default
563 + regsub -all "^lt-ld-new: warning: creating a DT_TEXTREL in object\." $exec_output "\\1" exec_output
564 +
565 if [string match "" $exec_output] then {
566 return 1
567 } else {
568
569
570
571 1.1 src/patchsets/binutils/2.19.51.0.14/76_all_use-new-ld-dtags.patch
572
573 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/76_all_use-new-ld-dtags.patch?rev=1.1&view=markup
574 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/76_all_use-new-ld-dtags.patch?rev=1.1&content-type=text/plain
575
576 Index: 76_all_use-new-ld-dtags.patch
577 ===================================================================
578 --- binutils/ld/ldmain.c
579 +++ binutils/ld/ldmain.c
580 @@ -296,6 +296,7 @@ main (int argc, char **argv)
581
582 link_info.allow_undefined_version = TRUE;
583 link_info.keep_memory = TRUE;
584 + link_info.new_dtags = TRUE;
585 link_info.combreloc = TRUE;
586 link_info.strip_discarded = TRUE;
587 link_info.callbacks = &link_callbacks;
588
589
590
591 1.1 src/patchsets/binutils/2.19.51.0.14/77_all_document-new-dtags-behaviour.patch
592
593 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/77_all_document-new-dtags-behaviour.patch?rev=1.1&view=markup
594 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/77_all_document-new-dtags-behaviour.patch?rev=1.1&content-type=text/plain
595
596 Index: 77_all_document-new-dtags-behaviour.patch
597 ===================================================================
598 Index: binutils-2.19.51.0.5/ld/ld.texinfo
599 ===================================================================
600 --- binutils-2.19.51.0.5.orig/ld/ld.texinfo
601 +++ binutils-2.19.51.0.5/ld/ld.texinfo
602 @@ -2036,8 +2036,9 @@ This linker can create the new dynamic t
603 systems may not understand them. If you specify
604 @option{--enable-new-dtags}, the dynamic tags will be created as needed.
605 If you specify @option{--disable-new-dtags}, no new dynamic tags will be
606 -created. By default, the new dynamic tags are not created. Note that
607 -those options are only available for ELF systems.
608 +created. On Gentoo, by default, the new dynamic tags are created (this
609 +differs from upstream behaviour). Note that those options are only
610 +available for ELF systems.
611
612 @kindex --hash-size=@var{number}
613 @item --hash-size=@var{number}
614
615
616
617 1.1 src/patchsets/binutils/2.19.51.0.14/77_all_generate-gnu-hash.patch
618
619 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/77_all_generate-gnu-hash.patch?rev=1.1&view=markup
620 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/77_all_generate-gnu-hash.patch?rev=1.1&content-type=text/plain
621
622 Index: 77_all_generate-gnu-hash.patch
623 ===================================================================
624 --- binutils/ld/ldmain.c
625 +++ binutils/ld/ldmain.c
626 @@ -273,2 +273,5 @@ main (int argc, char **argv)
627 link_info.emit_hash = TRUE;
628 +#ifndef __mips__
629 + link_info.emit_gnu_hash = TRUE;
630 +#endif
631 link_info.callbacks = &link_callbacks;
632
633
634
635 1.1 src/patchsets/binutils/2.19.51.0.14/78_all_use-relro.patch
636
637 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/78_all_use-relro.patch?rev=1.1&view=markup
638 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/78_all_use-relro.patch?rev=1.1&content-type=text/plain
639
640 Index: 78_all_use-relro.patch
641 ===================================================================
642 --- binutils/ld/ldmain.c
643 +++ binutils/ld/ldmain.c
644 @@ -293,2 +293,3 @@ main (int argc, char **argv)
645 link_info.combreloc = TRUE;
646 + link_info.relro = TRUE;
647 link_info.strip_discarded = TRUE;
648
649
650
651 1.1 src/patchsets/binutils/2.19.51.0.14/91_all_libiberty-pic.patch
652
653 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/91_all_libiberty-pic.patch?rev=1.1&view=markup
654 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/91_all_libiberty-pic.patch?rev=1.1&content-type=text/plain
655
656 Index: 91_all_libiberty-pic.patch
657 ===================================================================
658 --- libiberty/Makefile.in.mps 2004-05-13 15:53:17.000000000 +0200
659 +++ libiberty/Makefile.in 2004-05-13 15:52:53.000000000 +0200
660 @@ -224,6 +224,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA
661 $(AR) $(AR_FLAGS) $(TARGETLIB) \
662 $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
663 $(RANLIB) $(TARGETLIB); \
664 + cp $(TARGETLIB) ../ ; \
665 cd ..; \
666 else true; fi
667
668
669
670
671 1.1 src/patchsets/binutils/2.19.51.0.14/README.history
672
673 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/README.history?rev=1.1&view=markup
674 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/binutils/2.19.51.0.14/README.history?rev=1.1&content-type=text/plain
675
676 Index: README.history
677 ===================================================================
678 1.0 23.07.2009
679 + 03_all_binutils-2.15.92.0.2-ppc64-pie.patch
680 + 08_all_binutils-RPATH_ENVVAR-smack.patch
681 + 12_all_sh-targets.patch
682 + 20_all_ld-sysroot.patch
683 + 42_all_012_check_ldrunpath_length.patch
684 + 63_all_binutils-2.18-pt-pax-flags-20070828.patch
685 + 65_all_binutils-2.18-amd64-32bit-path.patch
686 + 66_all_binutils-2.18.50.0.2-warn-textrel.patch
687 + 76_all_use-new-ld-dtags.patch
688 + 77_all_document-new-dtags-behaviour.patch
689 + 77_all_generate-gnu-hash.patch
690 + 78_all_use-relro.patch
691 + 91_all_libiberty-pic.patch