]> rtime.felk.cvut.cz Git - rtems-devel.git/blob - binutils-patches/2.17/binutils-2.17-rtems4.8-20061021.diff
a5b2216a5cf8fdaa38cccfba06c4db94682fd893
[rtems-devel.git] / binutils-patches / 2.17 / binutils-2.17-rtems4.8-20061021.diff
1 diff -uNr binutils-2.17.orig/bfd/bfd-in2.h binutils-2.17/bfd/bfd-in2.h
2 --- binutils-2.17.orig/bfd/bfd-in2.h    2006-03-26 01:38:42.000000000 +0100
3 +++ binutils-2.17/bfd/bfd-in2.h 2006-10-21 13:53:23.000000000 +0200
4 @@ -643,6 +643,12 @@
5    DYN_NO_NEEDED = 8
6  };
7  
8 +enum notice_asneeded_action {
9 +  notice_as_needed,
10 +  notice_not_needed,
11 +  notice_needed
12 +};
13 +
14  extern bfd_boolean bfd_elf_record_link_assignment
15    (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
16     bfd_boolean);
17 diff -uNr binutils-2.17.orig/bfd/bfd-in.h binutils-2.17/bfd/bfd-in.h
18 --- binutils-2.17.orig/bfd/bfd-in.h     2006-03-16 13:20:15.000000000 +0100
19 +++ binutils-2.17/bfd/bfd-in.h  2006-10-21 13:53:23.000000000 +0200
20 @@ -636,6 +636,12 @@
21    DYN_NO_NEEDED = 8
22  };
23  
24 +enum notice_asneeded_action {
25 +  notice_as_needed,
26 +  notice_not_needed,
27 +  notice_needed
28 +};
29 +
30  extern bfd_boolean bfd_elf_record_link_assignment
31    (bfd *, struct bfd_link_info *, const char *, bfd_boolean,
32     bfd_boolean);
33 diff -uNr binutils-2.17.orig/bfd/ChangeLog binutils-2.17/bfd/ChangeLog
34 --- binutils-2.17.orig/bfd/ChangeLog    2006-06-23 20:18:16.000000000 +0200
35 +++ binutils-2.17/bfd/ChangeLog 2006-10-21 13:53:23.000000000 +0200
36 @@ -1,3 +1,25 @@
37 +2006-08-08  Nick Clifton  <nickc@redhat.com>
38 +
39 +       PR binutils/2724
40 +       * coffcode.h (coff_new_section_hook): Only modify the section
41 +       symbol of sections which were created by the user.
42 +
43 +2006-07-19  Alan Modra  <amodra@bigpond.net.au>
44 +
45 +       * bfd-in.h (enum notice_asneeded_action): Define.
46 +       * bfd-in2.h: Regenerate.
47 +       * elflink.c (elf_link_add_object_symbols): Call linker "notice"
48 +       function with NULL name for as-needed handling.
49 +
50 +2006-07-12  Matthew R. Dempsky  <mrd@alkemio.org>
51 +
52 +       * cpu-m68k.c (bfd_m68k_compatible): Handle CPU32.
53 +
54 +2006-06-23  Daniel Jacobowitz  <dan@codesourcery.com>
55 +
56 +       * Makefile.am: Clear RELEASE.
57 +       * Makefile.in: Regenerated.
58 +
59  2006-06-23  Daniel Jacobowitz  <dan@codesourcery.com>
60  
61         * configure.in: Update version to 2.17.
62 diff -uNr binutils-2.17.orig/bfd/coffcode.h binutils-2.17/bfd/coffcode.h
63 --- binutils-2.17.orig/bfd/coffcode.h   2005-10-25 19:40:09.000000000 +0200
64 +++ binutils-2.17/bfd/coffcode.h        2006-10-21 13:53:24.000000000 +0200
65 @@ -1546,9 +1546,6 @@
66  static bfd_boolean
67  coff_new_section_hook (bfd * abfd, asection * section)
68  {
69 -  combined_entry_type *native;
70 -  bfd_size_type amt;
71 -
72    section->alignment_power = COFF_DEFAULT_SECTION_ALIGNMENT_POWER;
73  
74  #ifdef RS6000COFF_C
75 @@ -1560,27 +1557,34 @@
76      section->alignment_power = bfd_xcoff_data_align_power (abfd);
77  #endif
78  
79 -  /* Allocate aux records for section symbols, to store size and
80 -     related info.
81 -
82 -     @@ The 10 is a guess at a plausible maximum number of aux entries
83 -     (but shouldn't be a constant).  */
84 -  amt = sizeof (combined_entry_type) * 10;
85 -  native = bfd_zalloc (abfd, amt);
86 -  if (native == NULL)
87 -    return FALSE;
88 -
89 -  /* We don't need to set up n_name, n_value, or n_scnum in the native
90 -     symbol information, since they'll be overridden by the BFD symbol
91 -     anyhow.  However, we do need to set the type and storage class,
92 -     in case this symbol winds up getting written out.  The value 0
93 -     for n_numaux is already correct.  */
94 -
95 -  native->u.syment.n_type = T_NULL;
96 -  native->u.syment.n_sclass = C_STAT;
97 +  /* PR binutils/2724: Only real sections have a symbol that
98 +     has the coff_symbol_type structure allocated for it.  */
99 +  if (! bfd_is_const_section (section))
100 +    {
101 +      combined_entry_type *native;
102 +      bfd_size_type amt;
103 +
104 +      /* Allocate aux records for section symbols, to store size and
105 +        related info.
106 +
107 +        @@ The 10 is a guess at a plausible maximum number of aux entries
108 +        (but shouldn't be a constant).  */
109 +      amt = sizeof (combined_entry_type) * 10;
110 +      native = bfd_zalloc (abfd, amt);
111 +      if (native == NULL)
112 +       return FALSE;
113  
114 -  coffsymbol (section->symbol)->native = native;
115 +      /* We don't need to set up n_name, n_value, or n_scnum in the native
116 +        symbol information, since they'll be overridden by the BFD symbol
117 +        anyhow.  However, we do need to set the type and storage class,
118 +        in case this symbol winds up getting written out.  The value 0
119 +        for n_numaux is already correct.  */
120 +      native->u.syment.n_type = T_NULL;
121 +      native->u.syment.n_sclass = C_STAT;
122  
123 +      coffsymbol (section->symbol)->native = native;
124 +    }
125 +  
126    coff_set_custom_section_alignment (abfd, section,
127                                      coff_section_alignment_table,
128                                      coff_section_alignment_table_size);
129 diff -uNr binutils-2.17.orig/bfd/cpu-m68k.c binutils-2.17/bfd/cpu-m68k.c
130 --- binutils-2.17.orig/bfd/cpu-m68k.c   2006-03-25 11:24:27.000000000 +0100
131 +++ binutils-2.17/bfd/cpu-m68k.c        2006-10-21 13:53:24.000000000 +0200
132 @@ -202,6 +202,9 @@
133    if (a->mach <= bfd_mach_m68060 && b->mach <= bfd_mach_m68060)
134      /* Merge m68k machine. */
135      return a->mach > b->mach ? a : b;
136 +  else if (a->mach == bfd_mach_cpu32 && b->mach == bfd_mach_cpu32)
137 +    /* CPU32 is compatible with itself. */
138 +    return a;
139    else if (a->mach >= bfd_mach_mcf_isa_a_nodiv
140            && b->mach >= bfd_mach_mcf_isa_a_nodiv)
141      {
142 diff -uNr binutils-2.17.orig/bfd/elflink.c binutils-2.17/bfd/elflink.c
143 --- binutils-2.17.orig/bfd/elflink.c    2006-05-22 17:06:36.000000000 +0200
144 +++ binutils-2.17/bfd/elflink.c 2006-10-21 13:53:24.000000000 +0200
145 @@ -3496,6 +3496,13 @@
146        if (alloc_mark == NULL)
147         goto error_free_vers;
148  
149 +      /* Make a special call to the linker "notice" function to
150 +        tell it that we are about to handle an as-needed lib.  */
151 +      if (!(*info->callbacks->notice) (info, NULL, abfd, NULL,
152 +                                      notice_as_needed))
153 +       return FALSE;
154 +
155 +
156        /* Clone the symbol table and sym hashes.  Remember some
157          pointers into the symbol table, and dynamic symbol count.  */
158        old_hash = (char *) old_tab + tabsize;
159 @@ -4169,6 +4176,12 @@
160             }
161         }
162  
163 +      /* Make a special call to the linker "notice" function to
164 +        tell it that symbols added for crefs may need to be removed.  */
165 +      if (!(*info->callbacks->notice) (info, NULL, abfd, NULL,
166 +                                      notice_not_needed))
167 +       return FALSE;
168 +
169        free (old_tab);
170        objalloc_free_block ((struct objalloc *) htab->root.table.memory,
171                            alloc_mark);
172 @@ -4179,6 +4192,9 @@
173  
174    if (old_tab != NULL)
175      {
176 +      if (!(*info->callbacks->notice) (info, NULL, abfd, NULL,
177 +                                      notice_needed))
178 +       return FALSE;
179        free (old_tab);
180        old_tab = NULL;
181      }
182 diff -uNr binutils-2.17.orig/bfd/version.h binutils-2.17/bfd/version.h
183 --- binutils-2.17.orig/bfd/version.h    2006-06-23 20:14:41.000000000 +0200
184 +++ binutils-2.17/bfd/version.h 2006-10-21 13:53:24.000000000 +0200
185 @@ -1,3 +1,3 @@
186 -#define BFD_VERSION_DATE 20060623
187 +#define BFD_VERSION_DATE 20061021
188  #define BFD_VERSION @bfd_version@
189  #define BFD_VERSION_STRING @bfd_version_string@
190 diff -uNr binutils-2.17.orig/binutils/ChangeLog binutils-2.17/binutils/ChangeLog
191 --- binutils-2.17.orig/binutils/ChangeLog       2006-06-12 15:05:03.000000000 +0200
192 +++ binutils-2.17/binutils/ChangeLog    2006-10-21 13:53:24.000000000 +0200
193 @@ -1,3 +1,8 @@
194 +2006-08-15  Nick Clifton  <nickc@redhat.com>
195 +
196 +       PR binutils/3039
197 +       * wrstabs.c (stab_tag_type): Initialize 'size'.
198 +
199  2006-06-07  Joseph S. Myers  <joseph@codesourcery.com>
200  
201         * po/Make-in (pdf, ps): New dummy targets.
202 diff -uNr binutils-2.17.orig/binutils/wrstabs.c binutils-2.17/binutils/wrstabs.c
203 --- binutils-2.17.orig/binutils/wrstabs.c       2006-03-16 13:20:16.000000000 +0100
204 +++ binutils-2.17/binutils/wrstabs.c    2006-10-21 13:53:24.000000000 +0200
205 @@ -1869,7 +1869,7 @@
206  {
207    struct stab_write_handle *info = (struct stab_write_handle *) p;
208    long index;
209 -  unsigned int size;
210 +  unsigned int size = 0;
211  
212    index = stab_get_struct_index (info, name, id, kind, &size);
213    if (index < 0)
214 diff -uNr binutils-2.17.orig/gas/ChangeLog binutils-2.17/gas/ChangeLog
215 --- binutils-2.17.orig/gas/ChangeLog    2006-06-12 15:05:03.000000000 +0200
216 +++ binutils-2.17/gas/ChangeLog 2006-10-21 13:53:24.000000000 +0200
217 @@ -1,3 +1,8 @@
218 +2006-07-19  Mat Hostetter  <mat@lcs.mit.edu>
219 +
220 +       * symbols.c (report_op_error): Fix pasto.  Don't use as_bad_where
221 +       when file and line unknown.
222 +
223  2006-06-07  Joseph S. Myers  <joseph@codesourcery.com>
224  
225         * po/Make-in (pdf, ps): New dummy targets.
226 diff -uNr binutils-2.17.orig/gas/symbols.c binutils-2.17/gas/symbols.c
227 --- binutils-2.17.orig/gas/symbols.c    2006-01-09 18:14:40.000000000 +0100
228 +++ binutils-2.17/gas/symbols.c 2006-10-21 13:53:24.000000000 +0200
229 @@ -928,13 +928,11 @@
230           && seg_right != undefined_section)
231         {
232           if (right)
233 -           as_bad_where (file, line,
234 -                         _("invalid sections for operation on `%s' and `%s' setting `%s'"),
235 -                         S_GET_NAME (left), S_GET_NAME (right), S_GET_NAME (symp));
236 +           as_bad (_("invalid sections for operation on `%s' and `%s' setting `%s'"),
237 +                   S_GET_NAME (left), S_GET_NAME (right), S_GET_NAME (symp));
238           else
239 -           as_bad_where (file, line,
240 -                         _("invalid section for operation on `%s' setting `%s'"),
241 -                         S_GET_NAME (left), S_GET_NAME (symp));
242 +           as_bad (_("invalid section for operation on `%s' setting `%s'"),
243 +                   S_GET_NAME (left), S_GET_NAME (symp));
244         }
245      }
246  }
247 diff -uNr binutils-2.17.orig/ld/ChangeLog binutils-2.17/ld/ChangeLog
248 --- binutils-2.17.orig/ld/ChangeLog     2006-06-12 15:07:28.000000000 +0200
249 +++ binutils-2.17/ld/ChangeLog  2006-10-21 13:53:24.000000000 +0200
250 @@ -1,3 +1,20 @@
251 +2006-07-19  Alan Modra  <amodra@bigpond.net.au>
252 +
253 +       * ld.h (handle_asneeded_cref): Declare.
254 +       * ldcref.c: Include objalloc.h.
255 +       (old_table, old_tab, alloc_mark): New variables.
256 +       (tabsize, entsize, refsize, old_symcount): Likewise.
257 +       (add_cref): Use bfd_hash_allocate for refs.
258 +       (handle_asneeded_cref): New function.
259 +       * ldmain.c (notice): Call handle_asneeded_cref for NULL name.
260 +
261 +2006-07-04  Daniel Jacobowitz  <dan@codesourcery.com>
262 +
263 +       Backport:
264 +       2006-05-19  Alan Modra  <amodra@bigpond.net.au>
265 +       * ldlang.c (lang_size_sections_1): Don't check mem regions for
266 +       os->ignored sections.
267 +
268  2006-06-12  Fred Fish  <fnf@specifix.com>
269  
270         * emulparams/elf32bmip.sh (OTHER_SECTIONS): Keep the
271 diff -uNr binutils-2.17.orig/ld/configure.tgt binutils-2.17/ld/configure.tgt
272 --- binutils-2.17.orig/ld/configure.tgt 2006-04-05 14:41:57.000000000 +0200
273 +++ binutils-2.17/ld/configure.tgt      2006-10-21 13:53:24.000000000 +0200
274 @@ -83,7 +83,8 @@
275  avr-*-*)               targ_emul=avr2
276                         targ_extra_emuls="avr1 avr3 avr4 avr5"
277                         ;;
278 -bfin-*-elf)            targ_emul=elf32bfin; targ_extra_emuls="elf32bfinfd" ;;
279 +bfin-*-elf | bfin-*-rtems*)
280 +                       targ_emul=elf32bfin; targ_extra_emuls="elf32bfinfd" ;;
281  bfin-*-uclinux*)       targ_emul=elf32bfin; targ_extra_emuls="elf32bfinfd" ;;
282  cr16c-*-elf*)           targ_emul=elf32cr16c
283                         ;;
284 diff -uNr binutils-2.17.orig/ld/emulparams/h8300elf.sh binutils-2.17/ld/emulparams/h8300elf.sh
285 --- binutils-2.17.orig/ld/emulparams/h8300elf.sh        2005-12-22 18:43:34.000000000 +0100
286 +++ binutils-2.17/ld/emulparams/h8300elf.sh     2006-10-21 13:53:24.000000000 +0200
287 @@ -17,7 +17,7 @@
288  TINY_DATA_SECTION=".tinydata   0xff8000 :
289    {
290         *(.tinydata)
291 -       _tinydata = .;
292 +       ${RELOCATING+ _tinydata = .; }
293    }"
294  TINY_BSS_SECTION=".tinybss     : AT (_tinydata)
295    {
296 diff -uNr binutils-2.17.orig/ld/ldcref.c binutils-2.17/ld/ldcref.c
297 --- binutils-2.17.orig/ld/ldcref.c      2006-03-16 13:20:16.000000000 +0100
298 +++ binutils-2.17/ld/ldcref.c   2006-10-21 13:53:24.000000000 +0200
299 @@ -27,6 +27,7 @@
300  #include "sysdep.h"
301  #include "bfdlink.h"
302  #include "libiberty.h"
303 +#include "objalloc.h"
304  
305  #include "ld.h"
306  #include "ldmain.h"
307 @@ -101,6 +102,15 @@
308  
309  static size_t cref_symcount;
310  
311 +/* Used to take a snapshot of the cref hash table when starting to
312 +   add syms from an as-needed library.  */
313 +static struct bfd_hash_entry **old_table;
314 +static unsigned int old_size;
315 +static void *old_tab;
316 +static void *alloc_mark;
317 +static size_t tabsize, entsize, refsize;
318 +static size_t old_symcount;
319 +
320  /* Create an entry in a cref hash table.  */
321  
322  static struct bfd_hash_entry *
323 @@ -165,7 +175,9 @@
324  
325    if (r == NULL)
326      {
327 -      r = xmalloc (sizeof *r);
328 +      r = bfd_hash_allocate (&cref_table.root, sizeof *r);
329 +      if (r == NULL)
330 +       einfo (_("%X%P: cref alloc failed: %E\n"));
331        r->next = h->refs;
332        h->refs = r;
333        r->abfd = abfd;
334 @@ -182,6 +194,123 @@
335      r->def = TRUE;
336  }
337  
338 +/* Called before loading an as-needed library to take a snapshot of
339 +   the cref hash table, and after we have loaded or found that the
340 +   library was not needed.  */
341 +
342 +bfd_boolean
343 +handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
344 +                     enum notice_asneeded_action act)
345 +{
346 +  unsigned int i;
347 +
348 +  if (!cref_initialized)
349 +    return TRUE;
350 +
351 +  if (act == notice_as_needed)
352 +    {
353 +      char *old_ent, *old_ref;
354 +
355 +      for (i = 0; i < cref_table.root.size; i++)
356 +       {
357 +         struct bfd_hash_entry *p;
358 +         struct cref_hash_entry *c;
359 +         struct cref_ref *r;
360 +
361 +         for (p = cref_table.root.table[i]; p != NULL; p = p->next)
362 +           {
363 +             entsize += cref_table.root.entsize;
364 +             c = (struct cref_hash_entry *) p;
365 +             for (r = c->refs; r != NULL; r = r->next)
366 +               refsize += sizeof (struct cref_hash_entry);
367 +           }
368 +       }
369 +
370 +      tabsize = cref_table.root.size * sizeof (struct bfd_hash_entry *);
371 +      old_tab = xmalloc (tabsize + entsize + refsize);
372 +
373 +      alloc_mark = bfd_hash_allocate (&cref_table.root, 1);
374 +      if (alloc_mark == NULL)
375 +       return FALSE;
376 +
377 +      memcpy (old_tab, cref_table.root.table, tabsize);
378 +      old_ent = (char *) old_tab + tabsize;
379 +      old_ref = (char *) old_ent + entsize;
380 +      old_table = cref_table.root.table;
381 +      old_size = cref_table.root.size;
382 +      old_symcount = cref_symcount;
383 +
384 +      for (i = 0; i < cref_table.root.size; i++)
385 +       {
386 +         struct bfd_hash_entry *p;
387 +         struct cref_hash_entry *c;
388 +         struct cref_ref *r;
389 +
390 +         for (p = cref_table.root.table[i]; p != NULL; p = p->next)
391 +           {
392 +             memcpy (old_ent, p, cref_table.root.entsize);
393 +             old_ent = (char *) old_ent + cref_table.root.entsize;
394 +             c = (struct cref_hash_entry *) p;
395 +             for (r = c->refs; r != NULL; r = r->next)
396 +               {
397 +                 memcpy (old_ref, r, sizeof (struct cref_hash_entry));
398 +                 old_ref = (char *) old_ref + sizeof (struct cref_hash_entry);
399 +               }
400 +           }
401 +       }
402 +      return TRUE;
403 +    }
404 +
405 +  if (act == notice_not_needed)
406 +    {
407 +      char *old_ent, *old_ref;
408 +
409 +      if (old_tab == NULL)
410 +       {
411 +         /* The only way old_tab can be NULL is if the cref hash table
412 +            had not been initialised when notice_as_needed.  */
413 +         bfd_hash_table_free (&cref_table.root);
414 +         cref_initialized = FALSE;
415 +         return TRUE;
416 +       }
417 +
418 +      old_ent = (char *) old_tab + tabsize;
419 +      old_ref = (char *) old_ent + entsize;
420 +      cref_table.root.table = old_table;
421 +      cref_table.root.size = old_size;
422 +      memcpy (cref_table.root.table, old_tab, tabsize);
423 +      cref_symcount = old_symcount;
424 +
425 +      for (i = 0; i < cref_table.root.size; i++)
426 +       {
427 +         struct bfd_hash_entry *p;
428 +         struct cref_hash_entry *c;
429 +         struct cref_ref *r;
430 +
431 +         for (p = cref_table.root.table[i]; p != NULL; p = p->next)
432 +           {
433 +             memcpy (p, old_ent, cref_table.root.entsize);
434 +             old_ent = (char *) old_ent + cref_table.root.entsize;
435 +             c = (struct cref_hash_entry *) p;
436 +             for (r = c->refs; r != NULL; r = r->next)
437 +               {
438 +                 memcpy (r, old_ref, sizeof (struct cref_hash_entry));
439 +                 old_ref = (char *) old_ref + sizeof (struct cref_hash_entry);
440 +               }
441 +           }
442 +       }
443 +
444 +      objalloc_free_block ((struct objalloc *) cref_table.root.memory,
445 +                          alloc_mark);
446 +    }
447 +  else if (act != notice_needed)
448 +    return FALSE;
449 +
450 +  free (old_tab);
451 +  old_tab = NULL;
452 +  return TRUE;
453 +}
454 +
455  /* Copy the addresses of the hash table entries into an array.  This
456     is called via cref_hash_traverse.  We also fill in the demangled
457     name.  */
458 diff -uNr binutils-2.17.orig/ld/ld.h binutils-2.17/ld/ld.h
459 --- binutils-2.17.orig/ld/ld.h  2005-09-30 13:42:04.000000000 +0200
460 +++ binutils-2.17/ld/ld.h       2006-10-21 13:53:24.000000000 +0200
461 @@ -1,6 +1,6 @@
462  /* ld.h -- general linker header file
463     Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
464 -   2001, 2002, 2003, 2004, 2005
465 +   2001, 2002, 2003, 2004, 2005, 2006
466     Free Software Foundation, Inc.
467  
468     This file is part of GLD, the Gnu Linker.
469 @@ -282,6 +282,7 @@
470  
471  extern int yyparse (void);
472  extern void add_cref (const char *, bfd *, asection *, bfd_vma);
473 +extern bfd_boolean handle_asneeded_cref (bfd *, enum notice_asneeded_action);
474  extern void output_cref (FILE *);
475  extern void check_nocrossrefs (void);
476  extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
477 diff -uNr binutils-2.17.orig/ld/ldlang.c binutils-2.17/ld/ldlang.c
478 --- binutils-2.17.orig/ld/ldlang.c      2006-06-12 15:05:04.000000000 +0200
479 +++ binutils-2.17/ld/ldlang.c   2006-10-21 13:53:24.000000000 +0200
480 @@ -4207,7 +4207,8 @@
481                     /* If a loadable section is using the default memory
482                        region, and some non default memory regions were
483                        defined, issue an error message.  */
484 -                   if (!IGNORE_SECTION (os->bfd_section)
485 +                   if (!os->ignored
486 +                       && !IGNORE_SECTION (os->bfd_section)
487                         && ! link_info.relocatable
488                         && check_regions
489                         && strcmp (os->region->name,
490 diff -uNr binutils-2.17.orig/ld/ldmain.c binutils-2.17/ld/ldmain.c
491 --- binutils-2.17.orig/ld/ldmain.c      2006-04-06 20:52:45.000000000 +0200
492 +++ binutils-2.17/ld/ldmain.c   2006-10-21 13:53:24.000000000 +0200
493 @@ -1511,6 +1511,13 @@
494         asection *section,
495         bfd_vma value)
496  {
497 +  if (name == NULL)
498 +    {
499 +      if (command_line.cref || nocrossref_list != NULL)
500 +       return handle_asneeded_cref (abfd, value);
501 +      return TRUE;
502 +    }
503 +
504    if (! info->notice_all
505        || (info->notice_hash != NULL
506           && bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL))
507 diff -uNr binutils-2.17.orig/ld/testsuite/ChangeLog binutils-2.17/ld/testsuite/ChangeLog
508 --- binutils-2.17.orig/ld/testsuite/ChangeLog   2006-06-12 15:44:33.000000000 +0200
509 +++ binutils-2.17/ld/testsuite/ChangeLog        2006-10-21 13:53:24.000000000 +0200
510 @@ -1,3 +1,17 @@
511 +2006-07-12  Richard Sandiford  <richard@codesourcery.com>
512 +
513 +       * ld-m68k/merge-ok-1c.d: New test.
514 +       * ld-m68k/m68k.exp: Run it.
515 +
516 +2006-07-04  Daniel Jacobowitz  <dan@codesourcery.com>
517 +
518 +       Backport:
519 +       2006-05-19  Alan Modra  <amodra@bigpond.net.au>
520 +       * ld-scripts/empty-orphan.d: Update again.
521 +
522 +       * ld-scripts/empty-orphan.t: Discard .reginfo.
523 +       * ld-scripts/empty-orphan.d: Update.
524 +
525  2006-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
526  
527         Backport:
528 diff -uNr binutils-2.17.orig/ld/testsuite/ld-m68k/m68k.exp binutils-2.17/ld/testsuite/ld-m68k/m68k.exp
529 --- binutils-2.17.orig/ld/testsuite/ld-m68k/m68k.exp    2006-03-25 11:24:27.000000000 +0100
530 +++ binutils-2.17/ld/testsuite/ld-m68k/m68k.exp 2006-10-21 13:53:24.000000000 +0200
531 @@ -53,3 +53,4 @@
532  run_dump_test "merge-error-1e"
533  run_dump_test "merge-ok-1a"
534  run_dump_test "merge-ok-1b"
535 +run_dump_test "merge-ok-1c"
536 diff -uNr binutils-2.17.orig/ld/testsuite/ld-scripts/empty-orphan.d binutils-2.17/ld/testsuite/ld-scripts/empty-orphan.d
537 --- binutils-2.17.orig/ld/testsuite/ld-scripts/empty-orphan.d   2005-03-17 17:20:39.000000000 +0100
538 +++ binutils-2.17/ld/testsuite/ld-scripts/empty-orphan.d        2006-10-21 13:53:24.000000000 +0200
539 @@ -1,3 +1,6 @@
540  #source: empty-orphan.s
541  #ld: -T empty-orphan.t
542 -#error: no memory region specified for loadable section
543 +#readelf: -l --wide
544 +#...
545 + +LOAD +[x0-9a-f]+ [x0]+70000000 [x0]+70000000 [x0]+(2|4|8|10|20|40|80) .*
546 +#pass
547 diff -uNr binutils-2.17.orig/ld/testsuite/ld-scripts/empty-orphan.t binutils-2.17/ld/testsuite/ld-scripts/empty-orphan.t
548 --- binutils-2.17.orig/ld/testsuite/ld-scripts/empty-orphan.t   2005-03-17 17:20:39.000000000 +0100
549 +++ binutils-2.17/ld/testsuite/ld-scripts/empty-orphan.t        2006-10-21 13:53:24.000000000 +0200
550 @@ -17,5 +17,6 @@
551     .text : { *(.text) } > text_mem : text_phdr
552     .data : { *(.data) } > data_mem : data_phdr
553     .bss : { *(.bss) } > data_mem : data_phdr
554 +   /DISCARD/ : { *(.reginfo) }
555     /* .orphan_data is an orphan */
556  }