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