source: clfs-sysroot/patches/binutils-2.19-branch_update-4.patch@ c3d197b

Last change on this file since c3d197b was c2e251c, checked in by Joe Ciccone <jciccone@…>, 16 years ago

Add the binutils branch update patch.

  • Property mode set to 100644
File size: 116.9 KB
RevLine 
[c2e251c]1Submitted By: Jim Gifford (jim at cross-lfs dot org)
2Date: 01-22-2009
3Initial Package Version: 2.19
4Origin: Upstream
5Upstream Status: Applied
6Description: This is a branch update for binutils-2.19, and should be
7 rechecked periodically.
8
9diff -Naur binutils-2.19.orig/bfd/ChangeLog binutils-2.19/bfd/ChangeLog
10--- binutils-2.19.orig/bfd/ChangeLog 2008-10-16 06:20:48.000000000 -0700
11+++ binutils-2.19/bfd/ChangeLog 2009-01-14 01:13:49.000000000 -0800
12@@ -1,3 +1,37 @@
13+2009-01-14 Joseph Myers <joseph@codesourcery.com>
14+
15+ * elf32-arm.c (elf32_arm_final_link_relocate): Do not turn
16+ branches to undefine weak symbols into branches to the next
17+ instruction if creating PLT entries for those symbols.
18+
19+2008-12-23 Nick Clifton <nickc@redhat.com>
20+
21+ * Import this patch from the mainline:
22+ 2008-11-10 Andreas Schwab <schwab@suse.de>
23+
24+ PR 7011
25+ * elf.c (assign_file_positions_for_non_load_sections): Handle
26+ PT_GNU_RELRO specially.
27+
28+2008-11-20 Alan Modra <amodra@bigpond.net.au>
29+
30+ * elf32-ppc.c (allocate_dynrelocs): Always use tlsld_got for
31+ TLS_LD even when symbol is used with other TLS reloc types.
32+ (ppc_elf_relocate_section): Bypass symbol checks when using tlsld_got.
33+ Leave addend zero on LD DTPMOD dynamic reloc.
34+
35+2008-11-17 Eric B. Weddington <eric.weddington@atmel.com>
36+
37+ PR 7022
38+ * elf32-avr.c (bfd_elf_avr_final_write_processing):
39+ Add missing break statements.
40+
41+2008-10-28 Tristan Gingold <gingold@adacore.com>
42+
43+ * configure.in: Bump version to 2.19.0
44+ * Makefile.am (RELEASE): Unset.
45+ * configure, Makefile.in: Regenerated.
46+
47 2008-10-16 Tristan Gingold <gingold@adacore.com>
48
49 * configure.in: Bump version to 2.19
50diff -Naur binutils-2.19.orig/bfd/configure binutils-2.19/bfd/configure
51--- binutils-2.19.orig/bfd/configure 2008-10-16 06:20:42.000000000 -0700
52+++ binutils-2.19/bfd/configure 2008-10-28 03:42:15.000000000 -0700
53@@ -3032,7 +3032,7 @@
54
55 # Define the identity of the package.
56 PACKAGE=bfd
57- VERSION=2.19
58+ VERSION=2.19.0
59
60
61 cat >>confdefs.h <<_ACEOF
62diff -Naur binutils-2.19.orig/bfd/configure.in binutils-2.19/bfd/configure.in
63--- binutils-2.19.orig/bfd/configure.in 2008-10-16 06:20:34.000000000 -0700
64+++ binutils-2.19/bfd/configure.in 2008-10-28 03:42:15.000000000 -0700
65@@ -8,7 +8,7 @@
66 AC_CANONICAL_TARGET
67 AC_ISC_POSIX
68
69-AM_INIT_AUTOMAKE(bfd, 2.19)
70+AM_INIT_AUTOMAKE(bfd, 2.19.0)
71
72 dnl These must be called before LT_INIT, because it may want
73 dnl to call AC_CHECK_PROG.
74diff -Naur binutils-2.19.orig/bfd/doc/bfdver.texi binutils-2.19/bfd/doc/bfdver.texi
75--- binutils-2.19.orig/bfd/doc/bfdver.texi 2008-10-16 06:45:29.000000000 -0700
76+++ binutils-2.19/bfd/doc/bfdver.texi 2009-01-14 01:00:24.000000000 -0800
77@@ -1,4 +1,4 @@
78-@set VERSION 2.19
79+@set VERSION 2.19.0
80 @set VERSION_PACKAGE (GNU Binutils)
81-@set UPDATED October 2008
82+@set UPDATED December 2008
83 @set BUGURL @uref{http://www.sourceware.org/bugzilla/}
84diff -Naur binutils-2.19.orig/bfd/elf32-arm.c binutils-2.19/bfd/elf32-arm.c
85--- binutils-2.19.orig/bfd/elf32-arm.c 2008-08-26 07:40:18.000000000 -0700
86+++ binutils-2.19/bfd/elf32-arm.c 2009-01-14 01:13:49.000000000 -0800
87@@ -6381,8 +6381,9 @@
88 int thumb2 = using_thumb2 (globals);
89
90 /* A branch to an undefined weak symbol is turned into a jump to
91- the next instruction. */
92- if (h && h->root.type == bfd_link_hash_undefweak)
93+ the next instruction unless a PLT entry will be created. */
94+ if (h && h->root.type == bfd_link_hash_undefweak
95+ && !(splt != NULL && h->plt.offset != (bfd_vma) -1))
96 {
97 bfd_put_16 (input_bfd, 0xe000, hit_data);
98 bfd_put_16 (input_bfd, 0xbf00, hit_data + 2);
99diff -Naur binutils-2.19.orig/bfd/elf32-avr.c binutils-2.19/bfd/elf32-avr.c
100--- binutils-2.19.orig/bfd/elf32-avr.c 2008-08-08 22:35:12.000000000 -0700
101+++ binutils-2.19/bfd/elf32-avr.c 2008-11-17 07:26:01.000000000 -0800
102@@ -1298,6 +1298,7 @@
103
104 case bfd_mach_avr25:
105 val = E_AVR_MACH_AVR25;
106+ break;
107
108 case bfd_mach_avr3:
109 val = E_AVR_MACH_AVR3;
110@@ -1305,9 +1306,11 @@
111
112 case bfd_mach_avr31:
113 val = E_AVR_MACH_AVR31;
114+ break;
115
116 case bfd_mach_avr35:
117 val = E_AVR_MACH_AVR35;
118+ break;
119
120 case bfd_mach_avr4:
121 val = E_AVR_MACH_AVR4;
122diff -Naur binutils-2.19.orig/bfd/elf32-ppc.c binutils-2.19/bfd/elf32-ppc.c
123--- binutils-2.19.orig/bfd/elf32-ppc.c 2008-10-02 01:07:16.000000000 -0700
124+++ binutils-2.19/bfd/elf32-ppc.c 2008-11-20 03:50:22.000000000 -0800
125@@ -4997,6 +4997,9 @@
126 eh = (struct ppc_elf_link_hash_entry *) h;
127 if (eh->elf.got.refcount > 0)
128 {
129+ bfd_boolean dyn;
130+ unsigned int need;
131+
132 /* Make sure this symbol is output as a dynamic symbol. */
133 if (eh->elf.dynindx == -1
134 && !eh->elf.forced_local
135@@ -5006,30 +5009,32 @@
136 return FALSE;
137 }
138
139- if (eh->tls_mask == (TLS_TLS | TLS_LD)
140- && !eh->elf.def_dynamic)
141- {
142- /* If just an LD reloc, we'll just use htab->tlsld_got.offset. */
143- htab->tlsld_got.refcount += 1;
144- eh->elf.got.offset = (bfd_vma) -1;
145- }
146- else
147+ need = 0;
148+ if ((eh->tls_mask & TLS_TLS) != 0)
149 {
150- bfd_boolean dyn;
151- unsigned int need = 0;
152- if ((eh->tls_mask & TLS_TLS) != 0)
153+ if ((eh->tls_mask & TLS_LD) != 0)
154 {
155- if ((eh->tls_mask & TLS_LD) != 0)
156- need += 8;
157- if ((eh->tls_mask & TLS_GD) != 0)
158+ if (!eh->elf.def_dynamic)
159+ /* We'll just use htab->tlsld_got.offset. This should
160+ always be the case. It's a little odd if we have
161+ a local dynamic reloc against a non-local symbol. */
162+ htab->tlsld_got.refcount += 1;
163+ else
164 need += 8;
165- if ((eh->tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0)
166- need += 4;
167- if ((eh->tls_mask & TLS_DTPREL) != 0)
168- need += 4;
169 }
170- else
171+ if ((eh->tls_mask & TLS_GD) != 0)
172+ need += 8;
173+ if ((eh->tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0)
174+ need += 4;
175+ if ((eh->tls_mask & TLS_DTPREL) != 0)
176 need += 4;
177+ }
178+ else
179+ need += 4;
180+ if (need == 0)
181+ eh->elf.got.offset = (bfd_vma) -1;
182+ else
183+ {
184 eh->elf.got.offset = allocate_got (htab, need);
185 dyn = htab->elf.dynamic_sections_created;
186 if ((info->shared
187@@ -5039,7 +5044,8 @@
188 {
189 /* All the entries we allocated need relocs.
190 Except LD only needs one. */
191- if ((eh->tls_mask & TLS_LD) != 0)
192+ if ((eh->tls_mask & TLS_LD) != 0
193+ && eh->elf.def_dynamic)
194 need -= 4;
195 htab->relgot->size += need * (sizeof (Elf32_External_Rela) / 4);
196 }
197@@ -5275,27 +5281,24 @@
198 for (; local_got < end_local_got; ++local_got, ++lgot_masks)
199 if (*local_got > 0)
200 {
201- if (*lgot_masks == (TLS_TLS | TLS_LD))
202+ unsigned int need = 0;
203+ if ((*lgot_masks & TLS_TLS) != 0)
204 {
205- /* If just an LD reloc, we'll just use
206- htab->tlsld_got.offset. */
207- htab->tlsld_got.refcount += 1;
208- *local_got = (bfd_vma) -1;
209+ if ((*lgot_masks & TLS_GD) != 0)
210+ need += 8;
211+ if ((*lgot_masks & TLS_LD) != 0)
212+ htab->tlsld_got.refcount += 1;
213+ if ((*lgot_masks & (TLS_TPREL | TLS_TPRELGD)) != 0)
214+ need += 4;
215+ if ((*lgot_masks & TLS_DTPREL) != 0)
216+ need += 4;
217 }
218 else
219+ need += 4;
220+ if (need == 0)
221+ *local_got = (bfd_vma) -1;
222+ else
223 {
224- unsigned int need = 0;
225- if ((*lgot_masks & TLS_TLS) != 0)
226- {
227- if ((*lgot_masks & TLS_GD) != 0)
228- need += 8;
229- if ((*lgot_masks & (TLS_TPREL | TLS_TPRELGD)) != 0)
230- need += 4;
231- if ((*lgot_masks & TLS_DTPREL) != 0)
232- need += 4;
233- }
234- else
235- need += 4;
236 *local_got = allocate_got (htab, need);
237 if (info->shared)
238 htab->relgot->size += (need
239@@ -6560,7 +6563,8 @@
240
241 /* Generate relocs for the dynamic linker. */
242 if ((info->shared || indx != 0)
243- && (h == NULL
244+ && (offp == &htab->tlsld_got.offset
245+ || h == NULL
246 || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
247 || h->root.type != bfd_link_hash_undefweak))
248 {
249@@ -6591,7 +6595,7 @@
250 outrel.r_info = ELF32_R_INFO (indx, R_PPC_RELATIVE);
251 else
252 outrel.r_info = ELF32_R_INFO (indx, R_PPC_GLOB_DAT);
253- if (indx == 0)
254+ if (indx == 0 && tls_ty != (TLS_TLS | TLS_LD))
255 {
256 outrel.r_addend += relocation;
257 if (tls_ty & (TLS_GD | TLS_DTPREL | TLS_TPREL))
258diff -Naur binutils-2.19.orig/bfd/elf.c binutils-2.19/bfd/elf.c
259--- binutils-2.19.orig/bfd/elf.c 2008-10-09 05:18:23.000000000 -0700
260+++ binutils-2.19/bfd/elf.c 2008-12-23 02:06:46.000000000 -0800
261@@ -4606,7 +4606,61 @@
262 m != NULL;
263 m = m->next, p++)
264 {
265- if (m->count != 0)
266+ if (p->p_type == PT_GNU_RELRO)
267+ {
268+ const Elf_Internal_Phdr *lp;
269+
270+ BFD_ASSERT (!m->includes_filehdr && !m->includes_phdrs);
271+
272+ if (link_info != NULL)
273+ {
274+ /* During linking the range of the RELRO segment is passed
275+ in link_info. */
276+ for (lp = phdrs; lp < phdrs + count; ++lp)
277+ {
278+ if (lp->p_type == PT_LOAD
279+ && lp->p_vaddr >= link_info->relro_start
280+ && lp->p_vaddr < link_info->relro_end
281+ && lp->p_vaddr + lp->p_filesz >= link_info->relro_end)
282+ break;
283+ }
284+ }
285+ else
286+ {
287+ /* Otherwise we are copying an executable or shared
288+ library, but we need to use the same linker logic. */
289+ for (lp = phdrs; lp < phdrs + count; ++lp)
290+ {
291+ if (lp->p_type == PT_LOAD
292+ && lp->p_paddr == p->p_paddr)
293+ break;
294+ }
295+ }
296+
297+ if (lp < phdrs + count)
298+ {
299+ p->p_vaddr = lp->p_vaddr;
300+ p->p_paddr = lp->p_paddr;
301+ p->p_offset = lp->p_offset;
302+ if (link_info != NULL)
303+ p->p_filesz = link_info->relro_end - lp->p_vaddr;
304+ else if (m->p_size_valid)
305+ p->p_filesz = m->p_size;
306+ else
307+ abort ();
308+ p->p_memsz = p->p_filesz;
309+ p->p_align = 1;
310+ p->p_flags = (lp->p_flags & ~PF_W);
311+ }
312+ else if (link_info != NULL)
313+ {
314+ memset (p, 0, sizeof *p);
315+ p->p_type = PT_NULL;
316+ }
317+ else
318+ abort ();
319+ }
320+ else if (m->count != 0)
321 {
322 if (p->p_type != PT_LOAD
323 && (p->p_type != PT_NOTE
324@@ -4622,87 +4676,20 @@
325 p->p_filesz = sect->filepos - m->sections[0]->filepos;
326 if (hdr->sh_type != SHT_NOBITS)
327 p->p_filesz += hdr->sh_size;
328-
329- if (p->p_type == PT_GNU_RELRO)
330- {
331- /* When we get here, we are copying executable
332- or shared library. But we need to use the same
333- linker logic. */
334- Elf_Internal_Phdr *lp;
335-
336- for (lp = phdrs; lp < phdrs + count; ++lp)
337- {
338- if (lp->p_type == PT_LOAD
339- && lp->p_paddr == p->p_paddr)
340- break;
341- }
342-
343- if (lp < phdrs + count)
344- {
345- /* We should use p_size if it is valid since it
346- may contain the first few bytes of the next
347- SEC_ALLOC section. */
348- if (m->p_size_valid)
349- p->p_filesz = m->p_size;
350- else
351- abort ();
352- p->p_vaddr = lp->p_vaddr;
353- p->p_offset = lp->p_offset;
354- p->p_memsz = p->p_filesz;
355- p->p_align = 1;
356- }
357- else
358- abort ();
359- }
360- else
361- p->p_offset = m->sections[0]->filepos;
362+ p->p_offset = m->sections[0]->filepos;
363 }
364 }
365- else
366+ else if (m->includes_filehdr)
367 {
368- if (m->includes_filehdr)
369- {
370- p->p_vaddr = filehdr_vaddr;
371- if (! m->p_paddr_valid)
372- p->p_paddr = filehdr_paddr;
373- }
374- else if (m->includes_phdrs)
375- {
376- p->p_vaddr = phdrs_vaddr;
377- if (! m->p_paddr_valid)
378- p->p_paddr = phdrs_paddr;
379- }
380- else if (p->p_type == PT_GNU_RELRO)
381- {
382- Elf_Internal_Phdr *lp;
383-
384- for (lp = phdrs; lp < phdrs + count; ++lp)
385- {
386- if (lp->p_type == PT_LOAD
387- && lp->p_vaddr <= link_info->relro_end
388- && lp->p_vaddr >= link_info->relro_start
389- && (lp->p_vaddr + lp->p_filesz
390- >= link_info->relro_end))
391- break;
392- }
393-
394- if (lp < phdrs + count
395- && link_info->relro_end > lp->p_vaddr)
396- {
397- p->p_vaddr = lp->p_vaddr;
398- p->p_paddr = lp->p_paddr;
399- p->p_offset = lp->p_offset;
400- p->p_filesz = link_info->relro_end - lp->p_vaddr;
401- p->p_memsz = p->p_filesz;
402- p->p_align = 1;
403- p->p_flags = (lp->p_flags & ~PF_W);
404- }
405- else
406- {
407- memset (p, 0, sizeof *p);
408- p->p_type = PT_NULL;
409- }
410- }
411+ p->p_vaddr = filehdr_vaddr;
412+ if (! m->p_paddr_valid)
413+ p->p_paddr = filehdr_paddr;
414+ }
415+ else if (m->includes_phdrs)
416+ {
417+ p->p_vaddr = phdrs_vaddr;
418+ if (! m->p_paddr_valid)
419+ p->p_paddr = phdrs_paddr;
420 }
421 }
422
423diff -Naur binutils-2.19.orig/bfd/Makefile.in binutils-2.19/bfd/Makefile.in
424--- binutils-2.19.orig/bfd/Makefile.in 2008-10-16 06:20:48.000000000 -0700
425+++ binutils-2.19/bfd/Makefile.in 2009-01-22 16:10:32.431360245 -0800
426@@ -271,7 +271,7 @@
427 ACLOCAL_AMFLAGS = -I . -I .. -I ../config
428
429 # Uncomment the following line when doing a release.
430-RELEASE = y
431+RELEASE=y
432 INCDIR = $(srcdir)/../include
433 CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
434 MKDEP = gcc -MM
435diff -Naur binutils-2.19.orig/bfd/version.h binutils-2.19/bfd/version.h
436--- binutils-2.19.orig/bfd/version.h 2008-10-16 05:51:57.000000000 -0700
437+++ binutils-2.19/bfd/version.h 2009-01-22 16:00:14.000000000 -0800
438@@ -1,4 +1,4 @@
439-#define BFD_VERSION_DATE 20081016
440+#define BFD_VERSION_DATE 20090123
441 #define BFD_VERSION @bfd_version@
442 #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
443 #define REPORT_BUGS_TO @report_bugs_to@
444diff -Naur binutils-2.19.orig/binutils/ChangeLog binutils-2.19/binutils/ChangeLog
445--- binutils-2.19.orig/binutils/ChangeLog 2008-10-02 01:07:16.000000000 -0700
446+++ binutils-2.19/binutils/ChangeLog 2008-12-23 03:49:58.000000000 -0800
447@@ -1,3 +1,16 @@
448+2008-12-23 Nick Clifton <nickc@redhat.com>
449+
450+ * windmc.c (main): Use correct type for file length.
451+ * dlltool.c (gen_exp_file): Likewise.
452+
453+2008-12-01 Nick Clifton <nickc@redhat.com>
454+
455+ PR 7044
456+ * dlltool.c (run): Use formatting string to avoid compile time
457+ warning.
458+ (gen_exp_file): Check return value from fread.
459+ * windmc.c (main): Check return value from fread.
460+
461 2008-09-25 Richard Henderson <rth@redhat.com>
462
463 * dwarf.c (size_of_encoded_value, get_encoded_value): Move up.
464diff -Naur binutils-2.19.orig/binutils/dlltool.c binutils-2.19/binutils/dlltool.c
465--- binutils-2.19.orig/binutils/dlltool.c 2008-07-29 21:34:56.000000000 -0700
466+++ binutils-2.19/binutils/dlltool.c 2008-12-23 03:49:58.000000000 -0800
467@@ -1206,7 +1206,7 @@
468
469 if (pid == -1)
470 {
471- inform (strerror (errno));
472+ inform ("%s", strerror (errno));
473
474 fatal (errmsg_fmt, errmsg_arg);
475 }
476@@ -1980,7 +1980,7 @@
477 int addr;
478 long need[PAGE_SIZE];
479 long page_addr;
480- int numbytes;
481+ bfd_size_type numbytes;
482 int num_entries;
483 long *copy;
484 int j;
485@@ -1992,10 +1992,10 @@
486 numbytes = ftell (base_file);
487 fseek (base_file, 0, SEEK_SET);
488 copy = xmalloc (numbytes);
489- fread (copy, 1, numbytes, base_file);
490+ if (fread (copy, 1, numbytes, base_file) < numbytes)
491+ fatal (_("failed to read the number of entries from base file"));
492 num_entries = numbytes / sizeof (long);
493
494-
495 fprintf (f, "\t.section\t.reloc\n");
496 if (num_entries)
497 {
498diff -Naur binutils-2.19.orig/binutils/windmc.c binutils-2.19/binutils/windmc.c
499--- binutils-2.19.orig/binutils/windmc.c 2008-07-29 21:34:56.000000000 -0700
500+++ binutils-2.19/binutils/windmc.c 2008-12-23 03:49:58.000000000 -0800
501@@ -1144,7 +1144,7 @@
502 unichar *u;
503 rc_uint_type ul;
504 char *buff;
505- long flen;
506+ bfd_size_type flen;
507 FILE *fp = fopen (input_filename, "rb");
508
509 if (!fp)
510@@ -1155,7 +1155,8 @@
511 fseek (fp, 0, SEEK_SET);
512 buff = malloc (flen + 3);
513 memset (buff, 0, flen + 3);
514- fread (buff, 1, flen, fp);
515+ if (fread (buff, 1, flen, fp) < flen)
516+ fatal (_("unable to read contents of %s"), input_filename);
517 fclose (fp);
518 if (mcset_text_in_is_unicode != 1)
519 {
520diff -Naur binutils-2.19.orig/configure.ac binutils-2.19/configure.ac
521--- binutils-2.19.orig/configure.ac 2008-10-16 06:45:42.000000000 -0700
522+++ binutils-2.19/configure.ac 2008-09-03 19:18:16.000000000 -0700
523@@ -166,7 +166,7 @@
524 # binutils, gas and ld appear in that order because it makes sense to run
525 # "make check" in that particular order.
526 # If --enable-gold is used, "gold" will replace "ld".
527-host_tools="byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
528+host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
529
530 # libgcj represents the runtime libraries only used by gcj.
531 libgcj="target-libffi \
532diff -Naur binutils-2.19.orig/gas/ChangeLog binutils-2.19/gas/ChangeLog
533--- binutils-2.19.orig/gas/ChangeLog 2008-10-16 05:52:03.000000000 -0700
534+++ binutils-2.19/gas/ChangeLog 2009-01-14 01:00:24.000000000 -0800
535@@ -1,3 +1,29 @@
536+2009-01-14 Jakub Jelinek <jakub@redhat.com>
537+
538+ * Makefile.am (ehopt.o): Add struc-symbol.h.
539+ * Makefile.in: Regenerated.
540+ * ehopt.c: Include struc-symbol.h.
541+ (check_eh_frame): For very small O_constant DW_CFA_advance_loc4
542+ create correct DW_CFA_advance_loc. Handle O_subtract only
543+ for code alignment factor 1, otherwise handle O_divide or
544+ O_right_shift of O_subtract and O_constant.
545+ (eh_frame_estimate_size_before_relax): Always divide by ca.
546+ (eh_frame_convert_frag): Likewise.
547+
548+2009-01-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
549+
550+ * dw2gencfi.c (output_cfi_insn): Scale DW_CFA_advance_loc1,
551+ DW_CFA_advance_loc2 and DW_CFA_advance_loc4 outputs.
552+
553+2009-01-08 Adam Nemet <anemet@caviumnetworks.com>
554+
555+ * config/tc-mips.c (NO_ISA_COP): New macro.
556+ (COP_INSN): New macro.
557+ (is_opcode_valid): Use them.
558+ (macro) <ld_st>: Use them. Don't accept coprocessor load store
559+ insns based on the ISA if CPU is NO_ISA_COP.
560+ <copz>: Likewise for coprocessor operations.
561+
562 2008-10-09 Eric Botcazou <ebotcazou@adacore.com>
563
564 * dw2gencfi.c (cfi_finish): Deal with md_fix_up_eh_frame.
565diff -Naur binutils-2.19.orig/gas/config/tc-mips.c binutils-2.19/gas/config/tc-mips.c
566--- binutils-2.19.orig/gas/config/tc-mips.c 2008-08-08 12:24:49.000000000 -0700
567+++ binutils-2.19/gas/config/tc-mips.c 2009-01-08 16:16:12.000000000 -0800
568@@ -514,12 +514,11 @@
569 /* Returns true for a (non floating-point) coprocessor instruction. Reading
570 or writing the condition code is only possible on the coprocessors and
571 these insns are not marked with INSN_COP. Thus for these insns use the
572- condition-code flags unless this is the floating-point coprocessor. */
573+ condition-code flags. */
574 #define COP_INSN(PINFO) \
575 (PINFO != INSN_MACRO \
576- && (((PINFO) & INSN_COP) \
577- || ((PINFO) & (INSN_READ_COND_CODE | INSN_WRITE_COND_CODE) \
578- && ((PINFO) & (FP_S | FP_D)) == 0)))
579+ && ((PINFO) & (FP_S | FP_D)) == 0 \
580+ && ((PINFO) & (INSN_COP | INSN_READ_COND_CODE | INSN_WRITE_COND_CODE)))
581
582 /* MIPS PIC level. */
583
584diff -Naur binutils-2.19.orig/gas/dw2gencfi.c binutils-2.19/gas/dw2gencfi.c
585--- binutils-2.19.orig/gas/dw2gencfi.c 2008-10-16 05:52:09.000000000 -0700
586+++ binutils-2.19/gas/dw2gencfi.c 2009-01-14 01:00:24.000000000 -0800
587@@ -1,5 +1,5 @@
588 /* dw2gencfi.c - Support for generating Dwarf2 CFI information.
589- Copyright 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
590+ Copyright 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
591 Contributed by Michal Ludvig <mludvig@suse.cz>
592
593 This file is part of GAS, the GNU Assembler.
594@@ -972,20 +972,20 @@
595
596 if (scaled <= 0x3F)
597 out_one (DW_CFA_advance_loc + scaled);
598- else if (delta <= 0xFF)
599+ else if (scaled <= 0xFF)
600 {
601 out_one (DW_CFA_advance_loc1);
602- out_one (delta);
603+ out_one (scaled);
604 }
605- else if (delta <= 0xFFFF)
606+ else if (scaled <= 0xFFFF)
607 {
608 out_one (DW_CFA_advance_loc2);
609- out_two (delta);
610+ out_two (scaled);
611 }
612 else
613 {
614 out_one (DW_CFA_advance_loc4);
615- out_four (delta);
616+ out_four (scaled);
617 }
618 }
619 else
620diff -Naur binutils-2.19.orig/gas/ehopt.c binutils-2.19/gas/ehopt.c
621--- binutils-2.19.orig/gas/ehopt.c 2007-11-06 09:15:10.000000000 -0800
622+++ binutils-2.19/gas/ehopt.c 2009-01-14 01:00:25.000000000 -0800
623@@ -1,5 +1,6 @@
624 /* ehopt.c--optimize gcc exception frame information.
625- Copyright 1998, 2000, 2001, 2003, 2005, 2007 Free Software Foundation, Inc.
626+ Copyright 1998, 2000, 2001, 2003, 2005, 2007, 2008
627+ Free Software Foundation, Inc.
628 Written by Ian Lance Taylor <ian@cygnus.com>.
629
630 This file is part of GAS, the GNU Assembler.
631@@ -21,6 +22,7 @@
632
633 #include "as.h"
634 #include "subsegs.h"
635+#include "struc-symbol.h"
636
637 /* We include this ELF file, even though we may not be assembling for
638 ELF, since the exception frame information is always in a format
639@@ -398,13 +400,10 @@
640 subtracted were in the same frag and the expression was
641 reduced to a constant. We can do the optimization entirely
642 in this function. */
643- if (d->cie_info.code_alignment > 0
644- && exp->X_add_number % d->cie_info.code_alignment == 0
645- && exp->X_add_number / d->cie_info.code_alignment < 0x40)
646+ if (exp->X_add_number < 0x40)
647 {
648 d->loc4_frag->fr_literal[d->loc4_fix]
649- = DW_CFA_advance_loc
650- | (exp->X_add_number / d->cie_info.code_alignment);
651+ = DW_CFA_advance_loc | exp->X_add_number;
652 /* No more bytes needed. */
653 return 1;
654 }
655@@ -419,23 +418,39 @@
656 *pnbytes = 2;
657 }
658 }
659- else if (exp->X_op == O_subtract)
660+ else if (exp->X_op == O_subtract && d->cie_info.code_alignment == 1)
661 {
662 /* This is a case we can optimize. The expression was not
663 reduced, so we can not finish the optimization until the end
664 of the assembly. We set up a variant frag which we handle
665 later. */
666- int fr_subtype;
667-
668- if (d->cie_info.code_alignment > 0)
669- fr_subtype = d->cie_info.code_alignment << 3;
670- else
671- fr_subtype = 0;
672-
673- frag_var (rs_cfa, 4, 0, fr_subtype, make_expr_symbol (exp),
674+ frag_var (rs_cfa, 4, 0, 1 << 3, make_expr_symbol (exp),
675 d->loc4_fix, (char *) d->loc4_frag);
676 return 1;
677 }
678+ else if ((exp->X_op == O_divide
679+ || exp->X_op == O_right_shift)
680+ && d->cie_info.code_alignment > 1)
681+ {
682+ if (exp->X_add_symbol->bsym
683+ && exp->X_op_symbol->bsym
684+ && exp->X_add_symbol->sy_value.X_op == O_subtract
685+ && exp->X_op_symbol->sy_value.X_op == O_constant
686+ && ((exp->X_op == O_divide
687+ ? exp->X_op_symbol->sy_value.X_add_number
688+ : (offsetT) 1 << exp->X_op_symbol->sy_value.X_add_number)
689+ == (offsetT) d->cie_info.code_alignment))
690+ {
691+ /* This is a case we can optimize as well. The expression was
692+ not reduced, so we can not finish the optimization until the
693+ end of the assembly. We set up a variant frag which we
694+ handle later. */
695+ frag_var (rs_cfa, 4, 0, d->cie_info.code_alignment << 3,
696+ make_expr_symbol (&exp->X_add_symbol->sy_value),
697+ d->loc4_fix, (char *) d->loc4_frag);
698+ return 1;
699+ }
700+ }
701 break;
702
703 case state_error:
704@@ -459,7 +474,9 @@
705
706 diff = resolve_symbol_value (frag->fr_symbol);
707
708- if (ca > 0 && diff % ca == 0 && diff / ca < 0x40)
709+ assert (ca > 0);
710+ diff /= ca;
711+ if (diff < 0x40)
712 ret = 0;
713 else if (diff < 0x100)
714 ret = 1;
715@@ -496,21 +513,21 @@
716 {
717 offsetT diff;
718 fragS *loc4_frag;
719- int loc4_fix;
720+ int loc4_fix, ca;
721
722 loc4_frag = (fragS *) frag->fr_opcode;
723 loc4_fix = (int) frag->fr_offset;
724
725 diff = resolve_symbol_value (frag->fr_symbol);
726
727+ ca = frag->fr_subtype >> 3;
728+ assert (ca > 0);
729+ diff /= ca;
730 switch (frag->fr_subtype & 7)
731 {
732 case 0:
733- {
734- int ca = frag->fr_subtype >> 3;
735- assert (ca > 0 && diff % ca == 0 && diff / ca < 0x40);
736- loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | (diff / ca);
737- }
738+ assert (diff < 0x40);
739+ loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | diff;
740 break;
741
742 case 1:
743diff -Naur binutils-2.19.orig/gas/Makefile.am binutils-2.19/gas/Makefile.am
744--- binutils-2.19.orig/gas/Makefile.am 2008-10-02 01:07:17.000000000 -0700
745+++ binutils-2.19/gas/Makefile.am 2009-01-14 01:00:24.000000000 -0800
746@@ -2159,7 +2159,8 @@
747 dw2gencfi.o: dw2gencfi.c dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
748 subsegs.h $(INCDIR)/obstack.h
749 ecoff.o: ecoff.c ecoff.h
750-ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
751+ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h \
752+ struc-symbol.h
753 expr.o: expr.c $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h
754 flonum-copy.o: flonum-copy.c
755 flonum-konst.o: flonum-konst.c
756diff -Naur binutils-2.19.orig/gas/Makefile.in binutils-2.19/gas/Makefile.in
757--- binutils-2.19.orig/gas/Makefile.in 2008-10-02 01:07:17.000000000 -0700
758+++ binutils-2.19/gas/Makefile.in 2009-01-14 01:00:24.000000000 -0800
759@@ -3002,7 +3002,8 @@
760 dw2gencfi.o: dw2gencfi.c dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
761 subsegs.h $(INCDIR)/obstack.h
762 ecoff.o: ecoff.c ecoff.h
763-ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
764+ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h \
765+ struc-symbol.h
766 expr.o: expr.c $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h
767 flonum-copy.o: flonum-copy.c
768 flonum-konst.o: flonum-konst.c
769diff -Naur binutils-2.19.orig/gas/testsuite/ChangeLog binutils-2.19/gas/testsuite/ChangeLog
770--- binutils-2.19.orig/gas/testsuite/ChangeLog 2008-09-17 02:00:45.000000000 -0700
771+++ binutils-2.19/gas/testsuite/ChangeLog 2009-01-08 16:16:12.000000000 -0800
772@@ -1,3 +1,9 @@
773+2009-01-08 Adam Nemet <anemet@caviumnetworks.com>
774+
775+ * gas/mips/mips1-fp.s, gas/mips/mips1-fp.d, gas/mips/mips1-fp.l:
776+ New tests.
777+ * gas/mips/mips.exp: Run them.
778+
779 2008-09-15 Alan Modra <amodra@bigpond.net.au>
780
781 * gas/all/gas.exp: Don't run redef tests on a bunch of targets.
782diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.d binutils-2.19/gas/testsuite/gas/mips/mips1-fp.d
783--- binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.d 1969-12-31 16:00:00.000000000 -0800
784+++ binutils-2.19/gas/testsuite/gas/mips/mips1-fp.d 2009-01-08 16:16:12.000000000 -0800
785@@ -0,0 +1,12 @@
786+#as: -32
787+#objdump: -M reg-names=numeric -dr
788+#name: MIPS1 FP instructions
789+
790+.*: file format .*
791+
792+Disassembly of section .text:
793+
794+[0-9a-f]+ <foo>:
795+.*: 46041000 add.s \$f0,\$f2,\$f4
796+.*: 44420000 cfc1 \$2,\$0
797+#pass
798diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.l binutils-2.19/gas/testsuite/gas/mips/mips1-fp.l
799--- binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.l 1969-12-31 16:00:00.000000000 -0800
800+++ binutils-2.19/gas/testsuite/gas/mips/mips1-fp.l 2009-01-08 16:16:12.000000000 -0800
801@@ -0,0 +1,3 @@
802+.*: Assembler messages:
803+.*:6: Error: opcode not supported on this processor: .* \(.*\) `add.s \$f0,\$f2,\$f4'
804+.*:7: Error: opcode not supported on this processor: .* \(.*\) `cfc1 \$2,\$0'
805diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.s binutils-2.19/gas/testsuite/gas/mips/mips1-fp.s
806--- binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.s 1969-12-31 16:00:00.000000000 -0800
807+++ binutils-2.19/gas/testsuite/gas/mips/mips1-fp.s 2009-01-08 16:16:12.000000000 -0800
808@@ -0,0 +1,7 @@
809+# Source file used to test -mips1 fp instructions.
810+
811+# This is not a complete list of mips1 FP instructions.
812+
813+foo:
814+ add.s $f0,$f2,$f4
815+ cfc1 $2,$0
816diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips.exp binutils-2.19/gas/testsuite/gas/mips/mips.exp
817--- binutils-2.19.orig/gas/testsuite/gas/mips/mips.exp 2008-09-06 01:47:00.000000000 -0700
818+++ binutils-2.19/gas/testsuite/gas/mips/mips.exp 2009-01-08 16:16:12.000000000 -0800
819@@ -398,6 +398,9 @@
820 run_dump_test_arches "abs" [mips_arch_list_matching mips1]
821 run_dump_test_arches "add" [mips_arch_list_matching mips1]
822 run_dump_test_arches "and" [mips_arch_list_matching mips1]
823+ run_dump_test_arches "mips1-fp" [mips_arch_list_matching mips1]
824+ run_list_test_arches "mips1-fp" "-32 -msoft-float" \
825+ [mips_arch_list_matching mips1]
826 run_dump_test "break20"
827 run_dump_test "trap20"
828
829diff -Naur binutils-2.19.orig/ld/ChangeLog binutils-2.19/ld/ChangeLog
830--- binutils-2.19.orig/ld/ChangeLog 2008-10-09 05:18:31.000000000 -0700
831+++ binutils-2.19/ld/ChangeLog 2009-01-08 06:39:46.000000000 -0800
832@@ -1,826 +1,14 @@
833-2008-10-05 Alan Modra <amodra@bigpond.net.au>
834+2009-01-08 Dave Korn <dave.korn.cygwin@gmail.com>
835
836- PR 6943
837- * scripttempl/avr.sc (.bss): Set lma when relocating.
838- (.bss, .noinit): No need to set vma when relocating.
839- (.text, .bss, ,noinit): Set vma to zero when not relocating.
840+Backport bugfix from HEAD:
841
842-2008-09-30 Joseph Myers <joseph@codesourcery.com>
843+ 2009-01-03 Dave Korn <dave.korn.cygwin@gmail.com>
844
845- * emulparams/elf64ppc.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.opd
846- and .rela.branch_lt.
847+ * pe-dll.c (autofilter_liblist): Add entry for shared libgcc.
848+ (libnamencmp): New function.
849+ (auto_export): Use it in place of strncmp when filtering libraries.
850
851-2008-09-29 Nick Clifton <nickc@redhat.com>
852-
853- * po/vi.po: Updated Vietnamese translation.
854-
855-2008-09-09 Peter Rosin <peda@lysator.liu.se> (tiny change)
856-
857- * emultempl/pe.em (pe_find_data_imports): Add trailing newline
858- to warning message.
859- * emultempl/pep.em (pep_find_data_imports): Likewise.
860-
861-2008-09-09 Alan Modra <amodra@bigpond.net.au>
862-
863- * Makefile.am: Run "make dep-am".
864- * Makefile.in: Regenerate.
865- * po/ld.pot: Regenerate.
866-
867-2008-09-09 Alan Modra <amodra@bigpond.net.au>
868-
869- * emultempl/beos.em (gld${EMULATION_NAME}_place_orphan): Updated.
870- * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Ditto.
871-
872-2008-09-08 Tristan Gingold <gingold@adacore.com>
873-
874- * NEWS: Add a marker for the 2.19 features.
875-
876-2008-09-07 Alan Modra <amodra@bigpond.net.au>
877-
878- * ldlang.h (lang_output_section_find): Define.
879- (lang_output_section_statement_lookup): Update prototype.
880- * ldlang.c (lang_output_section_find,
881- lang_output_section_statement_lookup_1): Merge into..
882- (lang_output_section_statement_lookup): ..here. Update all callers.
883- (process_insert_statements): Set constraint negative
884- for output section statements we might be inserting. Make error
885- fatal on not finding insertion section.
886- (lang_output_section_find): Rather than comparing
887- output_section_statement.constraint against -1, test whether
888- it is postive.
889- (lang_output_section_statement_lookup_1): Likewise.
890- (output_prev_sec_find, strip_excluded_output_sections): Likewise.
891- (lang_record_phdrs): Likewise.
892- * emultempl/elf32.em (output_rel_find): Likewise.
893- * NEWS: Mention INSERT.
894-
895-2008-08-26 Nick Clifton <nickc@redhat.com>
896-
897- PR 6727
898- * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Scan all
899- input sections in all input bfds and always select the last
900- suitable one, so that interworking stubs are always processed
901- after all other input sections.
902- (arm_elf_before_allocation): Remove redundant use of
903- output_has_begun flag.
904-
905-2008-08-24 Alan Modra <amodra@bigpond.net.au>
906-
907- * configure.in: Update a number of obsolete autoconf macros.
908- * configure: Regenerate.
909- * aclocal.m4: Regenerate.
910-
911-2008-08-21 Jan Kratochvil <jan.kratochvil@redhat.com>
912-
913- PR ld/6833
914- * ldexp.c (fold_binary <DATA_SEGMENT_ALIGN>): Do not align
915- EXPLD.DATASEG.MIN_BASE.
916- * ldlang.c (lang_size_sections): New variable OLD_BASE. Rename
917- OLD_MIN_BASE to MIN_BASE with the former alignment from `ldexp.c'.
918- Use OLD_BASE now for the minimal base check after the base decrease by
919- the maximum alignment found.
920-
921-2008-08-17 Alan Modra <amodra@bigpond.net.au>
922-
923- PR 6478
924- * ldcref.c (check_local_sym_xref): Use bfd_generic_link_read_symbols.
925- Don't free symbol pointer array.
926- (check_refs): Likewise.
927- * ldmain.c (warning_callback): Likewise.
928- * ldmisc.c (vfinfo): Likewise.
929- * pe-dll.c (process_def_file): Likewise.
930- (pe_walk_relocs_of_symbol, generate_reloc): Likewise.
931- * emultempl/pe.em (pe_find_data_imports): Likewise.
932- (gld_${EMULATION_NAME}_after_open): Likewise.
933- * emultempl/pep.em (pep_find_data_imports): Likewise.
934- (gld_${EMULATION_NAME}_after_open): Likewise.
935- * ldlang.h (lang_input_statement_type): Delete asymbols, symbol_count,
936- passive_position, closed.
937- * ldlang.c (new_afile): Don't set asymbols and symbol_count.
938- * ldmain.c (add_archive_element): xcalloc lang_input_statement_type.
939-
940-2008-08-15 Alan Modra <amodra@bigpond.net.au>
941-
942- PR 6526
943- * configure.in: Invoke AC_USE_SYSTEM_EXTENSIONS.
944- * Makefile.in: Regenerate.
945- * aclocal.m4: Regenerate.
946- * config.in: Regenerate.
947- * configure: Regenerate.
948-
949-2008-08-09 Alan Modra <amodra@bigpond.net.au>
950-
951- PR 6753
952- * ldmain.c (check_for_scripts_dir, set_scripts_dir): Delete.
953- (main): Don't set_scripts_dir here.
954- * ldfile.c (check_for_scripts_dir, find_scripts_dir): New functions,
955- largely based on ldmain.c versions.
956- (ldfile_find_command_file): Set up search in script dir here without
957- affecting library search.
958- * Makefile.am (ldmain.o): No need to define SCRIPTDIR.
959- (ldfile.o): New rule.
960- * Makefile.in: Regenerate.
961-
962-2008-08-08 Anatoly Sokolov <aesok@post.ru>
963-
964- * Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
965- and eavr51.o.
966- Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
967- * Makefile.in: Regenerate.
968- * configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
969- and avr51.
970- * emulparams/avr25.sh: New file.
971- * emulparams/avr31.sh: New file.
972- * emulparams/avr35.sh: New file.
973- * emulparams/avr51.sh: New file.
974-
975-2008-08-08 Richard Sandiford <rdsandiford@googlemail.com>
976- Daniel Jacobowitz <dan@codesourcery.com>
977-
978- * emulparams/elf32bmip.sh (GOT): Define, moving .got.plt to...
979- (OTHER_RELRO_SECTIONS, OTHER_READWRITE_SECTIONS): ...one of these
980- two variables.
981- * emulparams/elf32bmipn32-defs.sh: Likewise.
982- * emultempl/mipself.em: Include ldctor.h, elf/mips.h and elfxx-mips.h.
983- (is_mips_elf): New macro.
984- (stub_file, stub_bfd): New variables.
985- (hook_stub_info): New structure.
986- (hook_in_stub): New function.
987- (mips_add_stub_section): Likewise.
988- (mips_create_output_section_statements): Likewise.
989- (mips_before_allocation): Likewise.
990- (real_func): New variable.
991- (mips_for_each_input_file_wrapper): New function.
992- (mips_lang_for_each_input_file): Likewise.
993- (lang_for_each_input_file): Define.
994- (LDEMUL_BEFORE_ALLOCATION): Likewise.
995- (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Likewise.
996-
997-2008-08-08 Alan Modra <amodra@bigpond.net.au>
998-
999- * ldfile.c (ldfile_open_file_search): Use concat.
1000- (try_open): Don't use a fixed size pathname buffer.
1001- (ldfile_find_command_file): Likewise.
1002- * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): If
1003- using EXTRA_SHLIB_EXTENSION, don't open twice.
1004-
1005-2008-08-04 Alan Modra <amodra@bigpond.net.au>
1006-
1007- * Makefile.am (POTFILES.in): Set LC_ALL=C.
1008- * Makefile.in: Regenerate.
1009- * po/POTFILES.in: Regenerate.
1010-
1011-2008-08-03 Alan Modra <amodra@bigpond.net.au>
1012-
1013- * Makefile.am (spu_ovl.o): Merge rule into..
1014- (spu_ovl.o_c): ..this one. Only run cpp for spu target.
1015- * Makefile.in: Regenerate.
1016-
1017-2008-08-02 Jan Kratochvil <jan.kratochvil@redhat.com>
1018-
1019- Include the spu_ovl ASCII form in the repository files.
1020- * emultempl/spuelf.em: No longer use `bin2c', use now `spu_ovl.o_c'.
1021- * Makefile.am (eelf32_spu.c): Depend now on `spu_ovl.o_c'.
1022- ($(srcdir)/emultempl/spu_ovl.o_c): New target.
1023- ($(srcdir)/emultempl/spu_ovl.o): Rename to...
1024- (spu_ovl.o): ...this one.
1025- * Makefile.in: Regenerate.
1026- * emultempl/spu_ovl.o_c: New file.
1027- * emultempl/spu_ovl.o: File removed.
1028-
1029-2008-07-31 Takashi Ono <t_ono@hkfreak.net>
1030-
1031- * pe-dll.c (generate_relocs): Don't generate relocs for
1032- undefined weak symbols.
1033-
1034-2008-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1035-
1036- * emultempl/spuelf.em: Abort on the missing required `spu_ovl.o'.
1037-
1038-2008-07-30 Alan Modra <amodra@bigpond.net.au>
1039-
1040- * emultempl/pe.em, emultempl/pep.em: Silence gcc warnings.
1041-
1042-2008-07-18 Joseph Myers <joseph@codesourcery.com>
1043-
1044- * ld.texinfo (--no-wchar-size-warning): Document new ARM option.
1045- * emultempl/armelf.em (no_wchar_size_warning): New.
1046- (arm_elf_create_output_section_statements): Pass
1047- no_wchar_size_warning to arm_elf_create_output_section_statements.
1048- (OPTION_NO_WCHAR_SIZE_WARNING): New.
1049- (PARSE_AND_LIST_LONGOPTS): Add no-wchar-size-warning.
1050- (PARSE_AND_LIST_OPTIONS): List --no-wchar-size-warning.
1051- (PARSE_AND_LIST_ARGS_CASES): Handle --no-wchar-size-warning.
1052-
1053-2008-07-15 Jie Zhang <jie.zhang@analog.com>
1054-
1055- * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define.
1056-
1057-2008-07-12 Craig Silverstein <csilvers@google.com>
1058-
1059- PR ld/6741
1060- * configure.in: Check for, and include, libz.a if it is present.
1061- * configure: Regenerate.
1062- * config.in: Regenerate.
1063-
1064-2008-07-12 Jie Zhang <jie.zhang@analog.com>
1065-
1066- Revert
1067- 2008-07-12 Jie Zhang <jie.zhang@analog.com>
1068- * Makefile.am (eelf32bfin.c): Depend on bfin.em.
1069- (eelf32bfinfd.c): Likewise.
1070- * Makefile.in: Regenerate.
1071- * gen-doc.texi: Set Blackfin.
1072- * ld.texinfo: Document --sep-code and Blackfin specific
1073- options.
1074- * ldmain.c (main): Initialize link_info.sep_code.
1075- * lexsup.c (enum option_values): Add OPTION_SEP_CODE.
1076- (ld_options[]): Add --sep-code.
1077- (parse_args): Deal with --sep-code.
1078- * emulparams/bfin.sh (EXTRA_EM_FILE): Define.
1079- * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define.
1080- * emultempl/bfin.em: New file.
1081-
1082-2008-07-12 Jie Zhang <jie.zhang@analog.com>
1083-
1084- * Makefile.am (eelf32bfin.c): Depend on bfin.em.
1085- (eelf32bfinfd.c): Likewise.
1086- * Makefile.in: Regenerate.
1087- * gen-doc.texi: Set Blackfin.
1088- * ld.texinfo: Document --sep-code and Blackfin specific
1089- options.
1090- * ldmain.c (main): Initialize link_info.sep_code.
1091- * lexsup.c (enum option_values): Add OPTION_SEP_CODE.
1092- (ld_options[]): Add --sep-code.
1093- (parse_args): Deal with --sep-code.
1094- * emulparams/bfin.sh (EXTRA_EM_FILE): Define.
1095- * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define.
1096- * emultempl/bfin.em: New file.
1097-
1098-2008-07-09 Danny Smith <dannysmith@users.sourceforge.net>
1099-
1100- *pe-dll.c (autofilter_symbolprefixlist): Excude all symbols
1101- starting with ".".
1102- Exclude "_IMPORT_DESCRIPTOR_".
1103- (autofilter_symbolsuffixlist): Exclude "_NULL_THUNK_DATA".
1104- (autofilter_symbollist_generic): Don't check for ".text".
1105- Exclude "_NULL_IMPORT_DESCRIPTOR".
1106- (autofilter_symbollist_i386): Likewise.
1107-
1108-2008-07-07 Alan Modra <amodra@bigpond.net.au>
1109-
1110- * emultempl/armelf.em (elf32_arm_add_stub_section): Use
1111- bfd_make_section_with_flags.
1112- * emultempl/avrelf.em (avr_elf_create_output_section_statements):
1113- Likewise.
1114- * emultempl/hppaelf.em (hppaelf_add_stub_section): Likewise.
1115- * emultempl/m68hc1xelf.em (m68hc11elf_add_stub_section): Likewise.
1116- * emultempl/m68kcoff.em (gld${EMULATION_NAME}_after_open): Likewise.
1117- * emultempl/m68kelf.em (m68k_elf_after_open): Likewise.
1118- * emultempl/ppc64elf.em (ppc_add_stub_section): Likewise.
1119- * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation):
1120- Likewise.
1121-
1122-2008-07-06 Nathan Sidwell <nathan@codesourcery.com>
1123-
1124- * ld.texinfo (File Commands): Document that INCLUDE can be used in
1125- several different places.
1126- * ldgram.y (statement, memory_spec, section): Allow INCLUDE.
1127- (memory, memory_spec_list): Simplify BNF
1128- (memory_spec_list_opt): New rule.
1129- * ldlex.l (INCLUDE): Recognize in EXPRESSION.
1130-
1131-2008-06-20 Alan Modra <amodra@bigpond.net.au>
1132-
1133- * emultempl/spuelf.em (gld${EMULATION_NAME}_finish): Make "can not
1134- build overlay stubs" a fatal error.
1135-
1136-2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1137-
1138- * config.in: Regenerate.
1139- * configure: Regenerate.
1140-
1141-2008-06-17 Alan Modra <amodra@bigpond.net.au>
1142-
1143- * emultempl/spuelf.em (extra_stack_space): New variable.
1144- (gld${EMULATION_NAME}_finish): Pass it to spu_elf_check_vma.
1145- (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS,
1146- PARSE_AND_LIST_ARGS_CASES): Handle --extra-stack-space.
1147- * emultempl/spu_ovl.S: Mask interrupts during dma and update of
1148- overlay manager structures.
1149- * emultempl/spu_ovl.o: Regenerate.
1150-
1151-2008-06-16 Hans-Peter Nilsson <hp@bitrange.com>
1152-
1153- * ld.texinfo (@node MMIX): For the __.MMIX.start. prefix, only
1154- mention it as being special for global symbols.
1155-
1156-2008-06-12 Nick Clifton <nickc@redhat.com>
1157-
1158- * ldlang.c (print_output_section_statement): If the output section
1159- statement has an update_dot_tree expression, apply it to
1160- print_dot.
1161- (print_input_section): Do not update print_dot if it would move
1162- print_dot backwards.
1163- (lang_do_assignments_1): If the output section statement has an
1164- update_dot_tree expression apply it to dot.
1165-
1166-2008-06-07 Alan Modra <amodra@bigpond.net.au>
1167-
1168- * NEWS: Mention archive:path patterns.
1169- * ld.texinfo: Likewise.
1170- * ldlang.c: Formatting throughout.
1171- (archive_path): Only assume "[A-Za-z]:" is a dos drive.
1172- (input_statement_is_archive_path): New function, extracted from..
1173- (walk_wild): ..here.
1174- (walk_wild_consider_section): Match archive:path here too.
1175- (init_map_userdata, sort_def_symbol): Convert to ISO C.
1176- * ldmain.c (main): Set link_info.path_separator.
1177- * emultempl/spuelf.em (choose_target): Don't set it here.
1178-
1179-2008-06-06 Alan Modra <amodra@bigpond.net.au>
1180-
1181- * ldlang.c (name_match): New function.
1182- (unique_section_p, walk_wild_consider_section): Use it here.
1183- (walk_wild_section_general): And here.
1184- (archive_path): New function.
1185- (walk_wild): Match archive:path filespecs.
1186- (open_input_bfds): Don't load archive:path files.
1187- * emultempl/spuelf.em (choose_target): Set path_separator.
1188- * emulparams/elf32_spu.sh: Add ._ea.* sections to ._ea output.
1189-
1190-2008-06-04 Nick Clifton <nickc@redhat.com>
1191-
1192- * ld.texinfo (Orphan Sections): Fix texi typo.
1193-
1194-2008-06-04 Chris Metcalf <cmetcalf@tilera.com>
1195-
1196- * lexsup.c (option_values): Add OPTION_NO_WARN_FATAL.
1197- (ld_options): Add entry for --no-fatal-warnings.
1198- (parse_args): Handle OPTION_NO_WARN_FATAL.
1199- * ld.texinfo (Options): Document new command line switch.
1200-
1201-2008-06-04 Alan Modra <amodra@bigpond.net.au>
1202-
1203- * emultempl/spuelf.em (spu_elf_relink): Correct --no-auto-overlay arg.
1204-
1205-2008-06-02 Nathan Sidwell <nathan@codesourcery.com>
1206-
1207- * ldlang.c (closest_target_match): Skip generic big and little
1208- endian ELF targets.
1209-
1210-2008-05-31 Evandro Menezes <evandro@yahoo.com>
1211-
1212- PR ld/6430
1213- * ld.h (enum sort_order): New.
1214- * ldlang.c (lang_check: Fix comment.
1215- (lang_common): Sort commons in ascending or descending order.
1216- (lang_one_common): Likewise.
1217- * lexsup.c (ld_options): Have --sort-common take an option
1218- argument.
1219- (parse_args): Handle argument to --sort-common.
1220- * ld.texinfo (--sort-common): Document new optional argument.
1221- * NEWS: Mention new feature.
1222-
1223-2008-05-28 Christophe Lyon <christophe.lyon@st.com>
1224-
1225- * ld.texinfo: State that farcalls stubs are supported for ARM-EABI
1226- only.
1227-
1228-2008-05-27 Kai Tietz <kai.tietz@onevision.com>
1229-
1230- * pe-dll.c (fill_edata): Make sure we calculate vma's in
1231- type bfd_vma.
1232- (generate_reloc): Likewise.
1233- (pe_implied_import_dll): Likewise.
1234-
1235-2008-05-21 Nick Clifton <nickc@redhat.com>
1236-
1237- PR ld/6519
1238- * ld.texinfo (Orphan Sections): Mention that the linker will
1239- provide start and stop symbols for orphaned sections if their
1240- names are valid C identifiers.
1241- * NEWS: Add an addendum to the description of the linker feature
1242- for providing orphan section start and end symbols.
1243-
1244-2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
1245-
1246- * configure.in (--enable-got): New option. Handle it.
1247- * configure: Regenerate.
1248- * config.in: Regenerate.
1249- * emultempl/m68kelf.em: (got_handling_target_default): New shell
1250- variable.
1251- (GOT_HANDLING_TARGET_DEFAULT): New macro.
1252- (GOT_HANDLING_DEFAULT): New macro. Initialize it from configure
1253- option if one was given.
1254- (got_handling): New static variable.
1255- (elf_m68k_create_output_section_statements): New static function
1256- implementing hook.
1257- (PARSE_AND_LIST_PROLOGUE): Define shell variable.
1258- (OPTION_GOT): New macro.
1259- (PARSE_AND_LIST_LONGOPTS): Define shell variable. Specify
1260- --got option.
1261- (got): New linker option.
1262- (PARSE_AND_LIST_OPTIONS): Define shell variable. Print help string
1263- for --got option.
1264- (PARSE_AND_LIST_ARGS_CASES): Define shell variable. Handle --got
1265- option.
1266- * ld.texinfo: Document --got=<type> option.
1267- * gen-doc.texi: Add M68K.
1268- * NEWS: Mention the new feature.
1269-
1270-2008-05-21 Evandro Menezes <evandro@yahoo.com>
1271-
1272- PR ld/6430
1273- * ld.texinfo (--sort-common): Correct documentation to indicate
1274- that sorting is performed by alignment, not size, biggest
1275- alignment first.
1276-
1277-2008-05-21 Christophe Lyon <christophe.lyon@st.com>
1278- Nick Clifton <nickc@redhat.com>
1279-
1280- * ld.texinfo (ARM): Document --stub-group-size=N option.
1281- Move description of --pic-veneer option into the ARM section.
1282- * NEWS: Mention the support for long function calls.
1283-
1284-2008-05-15 Christophe Lyon <christophe.lyon@st.com>
1285-
1286- * emultempl/armelf.em (build_section_lists): New function.
1287- (stub_file): Define.
1288- (need_laying_out): Define.
1289- (group_size): Define.
1290- (hook_stub_info): Define.
1291- (hook_in_stub): New function.
1292- (elf32_arm_add_stub_section): New function.
1293- (gldarm_layout_sections_again): New function.
1294- (gld${EMULATION_NAME}_finish): Replace arm_elf_finish(). Generate
1295- stubs for long calls if needed.
1296- (arm_elf_create_output_section_statements): create stub_file bfd.
1297- (arm_for_each_input_file_wrapper): New function.
1298- (arm_lang_for_each_input_file): New function.
1299- (lang_for_each_input_file): Define.
1300- (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_STUBGROUP_SIZE.
1301- (PARSE_AND_LIST_LONGOPTS): Add option stub-group-size.
1302- (PARSE_AND_LIST_OPTIONS): Add option stub-group-size.
1303- (PARSE_AND_LIST_ARGS_CASES): Add OPTION_STUBGROUP_SIZE case.
1304- (LDEMUL_FINISH): Update to gld${EMULATION_NAME}_finish.
1305- * lang.c (print_input_statement): Skip if bfd has
1306- BFD_LINKER_CREATED.
1307-
1308-2008-05-14 Alan Modra <amodra@bigpond.net.au>
1309-
1310- * Makefile.in: Regenerate.
1311-
1312-2008-05-09 Kai Tietz <kai.tietz@onevision.com>
1313-
1314- ld/PR6502
1315- * emultempl/pep.em (compute_dll_image_base): Use bfd_vma instead
1316- of long and change return type to bfd_vma.
1317- (definfo): Change type of address from long to bfd_vma.
1318- (set_pep_value): Replace strtoul to strtoull.
1319- (gld_${EMULATION_NAME}_set_symbols): use bfd_vma instead of long..
1320- * pe-dll.c (pe_dll_generate_def_file): Use fprintf_vma to print
1321- ImageBase.
1322- (quick_reloc): Change argument address from int to bfd_size_type.
1323-
1324-2008-05-08 Tom Tromey <tromey@redhat.com>
1325-
1326- * ld.texinfo (PowerPC64 ELF64): Fix typo.
1327-
1328-2008-05-08 Alan Modra <amodra@bigpond.net.au>
1329-
1330- * elf32_spu.sh (OTHER_SECTIONS): Add "._ea".
1331- * elf32ppc.sh: If building with spu support, put ".data.spehandle"
1332- sections at the start of ".data" and provide a symbol to locate
1333- the directory of embedded spe programs.
1334-
1335-2008-05-08 Alan Modra <amodra@bigpond.net.au>
1336-
1337- * ldexp.c (exp_print_token): Add ABSOLUTE, MIN_K, ASSERT_K. Correct
1338- MAX_K.
1339- (fold_binary <SEGMENT_START>): Set expld.result.section to
1340- current section. Expand comment. Formatting.
1341- (fold_name <DEFINED>): Set expld.result.section to current section.
1342-
1343-2008-04-28 Nathan Sidwell <nathan@codesourcery.com>
1344-
1345- * ldlang.c (lang_size_sections_1): Don't check LMA overflow on
1346- non-load sections.
1347-
1348-2008-04-25 Michael Frysinger <vapier@gentoo.org>
1349-
1350- * configure.tgt (bfin-*-linux-uclibc*): Set targ_emul to elf32bfinfd
1351- and targ_extra_emuls to elf32bfin.
1352-
1353-2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1354-
1355- * aclocal.m4: Regenerate.
1356- * configure: Regenerate.
1357-
1358-2008-04-03 Kai Tietz <kai.tietz@onevision.com>
1359-
1360- * scripttempl/pep.sc: Align start of symbol __CTOR_LIST__.
1361-
1362-2008-04-08 Alan Modra <amodra@bigpond.net.au>
1363-
1364- * po/POTFILES.in: Regenerate.
1365-
1366-2008-04-08 Alan Modra <amodra@bigpond.net.au>
1367-
1368- * emultempl/spuelf.em (auto_overlay, auto_overlay_file,
1369- auto_overlay_fixed, auto_overlay_reserved, my_argc, my_argv): New vars.
1370- (spu_before_allocation): Warn on --auto-overlay and existing overlays.
1371- (struct tflist, clean_tmp): Move.
1372- (new_tmp_file): New function, extracted from..
1373- (embedded_spu_file): ..here.
1374- (spu_elf_open_overlay_script, spu_elf_relink): New function.
1375- (gld${EMULATION_NAME}_finish): Pass a bunch of --auto-overlay params.
1376- Warn on --auto-overlay and zero local store.
1377- (gld${EMULATION_NAME}_choose_target): New function to stash argv.
1378- (OPTION_SPU_AUTO_OVERLAY, OPTION_SPU_AUTO_RELINK,
1379- OPTION_SPU_OVERLAY_RODATA, OPTION_SPU_FIXED_SPACE,
1380- OPTION_SPU_RESERVED_SPACE, OPTION_SPU_NO_AUTO_OVERLAY): Define.
1381- (PARSE_AND_LIST_LONGOPTS): Add entries for new options.
1382- (PARSE_AND_LIST_OPTIONS): Likewise.
1383- (PARSE_AND_LIST_ARGS_CASES): Likewise.
1384- (LDEMUL_CHOOSE_TARGET): Define.
1385-
1386-2008-04-03 Kai Tietz <kai.tietz@onevision.com>
1387-
1388- PR ld/6026
1389- * pe-dll.c (make_head): Fix iat and thunk addend offset.
1390-
1391-2008-03-31 Nick Clifton <nickc@redhat.com>
1392-
1393- * po/fr.po: Updated French translation.
1394-
1395-2008-03-24 Ian Lance Taylor <iant@google.com>
1396-
1397- The sha1 code is now in libiberty.
1398- * sha1.c: Remove.
1399- * sha1.h: Remove.
1400- * Makefile.am (CFILES): Remove sha1.c.
1401- (HFILES): Remove sha1.h.
1402- (OFILES): Remove sha1.o.
1403- (ld_new_SOURCES): Remove sha1.c.
1404- (sha1.o): Remove target.
1405- * Makefile.in: Rebuild.
1406-
1407-2008-03-20 Alan Modra <amodra@bigpond.net.au>
1408-
1409- * emultempl/spuelf.em: Update calls to elf32-spu.c funcs.
1410-
1411-2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1412-
1413- * aclocal.m4: Regenerate.
1414- * configure: Likewise.
1415- * Makefile.in: Likewise.
1416-
1417-2008-03-14 Alan Modra <amodra@bigpond.net.au>
1418-
1419- * emultempl/spuelf.em (gld${EMULATION_NAME}_finish): Protect
1420- spu_elf_build_stubs with is_spu_target.
1421-
1422-2008-03-13 Alan Modra <amodra@bigpond.net.au>
1423-
1424- * Makefile.am: Run "make dep-am".
1425- * Makefile.in: Regenerate.
1426- * configure: Regenerate.
1427-
1428-2008-03-06 Joseph Myers <joseph@codesourcery.com>
1429- Roman Zippel <zippel@linux-m68k.org>
1430-
1431- * emulparams/m68kelf.sh (GENERATE_PIE_SCRIPT): Define.
1432- (COMMONPAGESIZE): Define.
1433-
1434-2008-02-22 Nick Clifton <nickc@redhat.com>
1435-
1436- PR ld/5785
1437- * ldlang.c (lang_size_sections_1): Honour the setting of an
1438- lma_region even if there is no vma region set, or the vma region
1439- is the same as the lma region.
1440-
1441-2008-02-18 Nick Clifton <nickc@redhat.com>
1442-
1443- * scripttempl/armbpabi.sc (ENTRY): Do not define when performing a
1444- relocatable link.
1445- * scripttempl/elf32cr16.sc: Likewise.
1446- * scripttempl/elf32cr16c.sc: Likewise.
1447- * scripttempl/elf32crx.sc: Likewise.
1448- * scripttempl/elf32sh-symbian.sc: Likewise.
1449- * scripttempl/elf_chaos.sc: Likewise.
1450- * scripttempl/elfd10v.sc: Likewise.
1451- * scripttempl/elfi370.sc: Likewise.
1452- * scripttempl/elfm68hc11.sc: Likewise.
1453- * scripttempl/elfm68hc12.sc: Likewise.
1454- * scripttempl/ip2k.sc: Likewise.
1455- * scripttempl/iq2000.sc: Likewise.
1456- * scripttempl/mep.sc: Likewise.
1457- * scripttempl/v850.sc: Likewise.
1458- * scripttempl/xstormy16.sc: Likewise.
1459-
1460-2008-02-16 Alan Modra <amodra@bigpond.net.au>
1461-
1462- PR ld/5761
1463- * ldexp.c (fold_name <LOADADDR>): Check result of evaluating
1464- load_base before calling make_abs.
1465-
1466-2008-02-15 Alan Modra <amodra@bigpond.net.au>
1467-
1468- * emultempl/alphaelf.em (alpha_after_open): Use elf_object_id.
1469- * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
1470- Likewise.
1471- * emultempl/ppc64elf.em (ppc_create_output_section_statements):
1472- Likewise.
1473- * emultempl/ppc32elf.em (is_ppc_elf32_vec): Delete. Replace all
1474- uses with..
1475- (is_ppc_elf): ..this new macro.
1476-
1477-2008-02-15 Alan Modra <amodra@bigpond.net.au>
1478-
1479- * ldmain.h (output_bfd): Delete.
1480- * ldmain.c (output_bfd): Delete.
1481- Replace all occurrences of output_bfd with link_info.output_bfd.
1482- * ldcref.c: Likewise.
1483- * ldctor.c: Likewise.
1484- * ldemul.c: Likewise.
1485- * ldexp.c: Likewise.
1486- * ldfile.c: Likewise.
1487- * ldlang.c: Likewise.
1488- * ldmisc.c: Likewise.
1489- * ldwrite.c: Likewise.
1490- * pe-dll.c: Likewise.
1491- * emultempl/aix.em: Likewise.
1492- * emultempl/alphaelf.em: Likewise.
1493- * emultempl/armcoff.em: Likewise.
1494- * emultempl/armelf.em: Likewise.
1495- * emultempl/avrelf.em: Likewise.
1496- * emultempl/beos.em: Likewise.
1497- * emultempl/elf-generic.em: Likewise.
1498- * emultempl/elf32.em: Likewise.
1499- * emultempl/gld960.em: Likewise.
1500- * emultempl/hppaelf.em: Likewise.
1501- * emultempl/irix.em: Likewise.
1502- * emultempl/linux.em: Likewise.
1503- * emultempl/lnk960.em: Likewise.
1504- * emultempl/m68hc1xelf.em: Likewise.
1505- * emultempl/mmix-elfnmmo.em: Likewise.
1506- * emultempl/mmo.em: Likewise.
1507- * emultempl/pe.em: Likewise.
1508- * emultempl/pep.em: Likewise.
1509- * emultempl/ppc32elf.em: Likewise.
1510- * emultempl/ppc64elf.em: Likewise.
1511- * emultempl/scoreelf.em: Likewise.
1512- * emultempl/sh64elf.em: Likewise.
1513- * emultempl/spuelf.em: Likewise.
1514- * emultempl/sunos.em: Likewise.
1515- * emultempl/vanilla.em: Likewise.
1516- * emultempl/vxworks.em: Likewise.
1517- * emultempl/xtensaelf.em: Likewise.
1518- * emultempl/z80.em: Likewise.
1519- * ldlang.c (open_output): Don't return output, instead write
1520- link_info_output_bfd directly.
1521- * emultempl/alphaelf.em: Replace occurrences of link_info.hash->creator
1522- with link_info.output_bfd->xvec.
1523- * emultempl/hppaelf.em: Likewise.
1524- * emultempl/ppc32elf.em: Likewise.
1525- * emultempl/ppc64elf.em: Likewise.
1526- * emultempl/spuelf.em: Likewise.
1527-
1528-2008-02-07 Alan Modra <amodra@bigpond.net.au>
1529-
1530- * ldlang.c (new_afile): Don't pass unadorned NULL to concat.
1531- * ldfile.c (ldfile_add_library_path): Likewise.
1532- * emultempl/elf32.em (check_ld_elf_hints, check_ld_so_conf): Likewise.
1533- * emultempl/lnk960.em (lnk960_before_parse): Likewise.
1534- * emultempl/spuelf.em (embedded_spu_file): Likewise.
1535-
1536-2008-02-07 Alan Modra <amodra@bigpond.net.au>
1537-
1538- * emultempl/spu_ovl.S: Use low bit of _ovly_table.size as
1539- a "present" bit rather than low bit of .buf. Correct indexing
1540- into _ovly_buf_table. Use relative loads and stores to access
1541- overlay manager local vars.
1542- * emultempl/spu_ovl.o: Regenerate.
1543-
1544-2008-02-04 H.J. Lu <hongjiu.lu@intel.com>
1545-
1546- PR 5715
1547- * configure: Regenerated.
1548-
1549-2008-01-31 Marc Gauthier <marc@tensilica.com>
1550-
1551- * configure.tgt (xtensa*-*-*): Recognize processor variants.
1552-
1553-2008-01-28 Fabian Groffen <grobian@gentoo.org>
1554-
1555- * configure.tgt (x86_64-*-solaris2): Add support for this target.
1556-
1557-2008-01-28 Vincent Riviere <vincent.riviere@freesbee.fr>
1558-
1559- PR ld/5652
1560- * genscripts.sh: Check for the existence of BASH_LINENO not just
1561- the BASH shell before generating line numbers in the emulation
1562- file.
1563-
1564-2008-01-28 Alan Modra <amodra@bigpond.net.au>
1565-
1566- * emultempl/spu_ovl.S: Rewrite.
1567- * emultempl/spu_ovl.o: Regenerate.
1568- * emultempl/spuelf.em (toe): Delete.
1569- (spu_place_special_section): Add param to control section placement.
1570- Adjust callers.
1571- (spu_elf_load_ovl_mgr): Adjust for struct _spu_elf_section_data
1572- changes.
1573- (spu_before_allocation): Adjust spu_elf_size_stubs call.
1574- (gld${EMULATION_NAME}_finish): Adjust spu_elf_build_stubs call.
1575-
1576-2008-01-25 H.J. Lu <hongjiu.lu@intel.com>
1577-
1578- PR ld/5670
1579- * ldlang.c (process_insert_statements): Silence gcc 4.1 alias
1580- warning.
1581-
1582-2008-01-25 Alan Modra <amodra@bigpond.net.au>
1583-
1584- * ld.texinfo (INSERT): Describe.
1585- * ldgram.y (ldgram_in_script, ldgram_had_equals): Delete.
1586- (INSERT_K, AFTER, BEFORE): Add as tokens.
1587- (ifile_p1): Handle INSERT statements.
1588- (saved_script_handle, force_make_executable): Move to..
1589- * ldmain.c: ..here.
1590- (previous_script_handle): New global var.
1591- * ldmain.h (saved_script_handle, force_make_executable): Declare.
1592- (previous_script_handle): Likewise.
1593- * ldlex.l (INSERT_K, AFTER, BEFORE): Add tokens.
1594- * lexsup.c (parge_args <-T>): Set previous_script_handle.
1595- * ldlang.c (lang_for_each_statement_worker): Handle insert statement.
1596- (map_input_to_output_sections, print_statement): Likewise.
1597- (lang_size_sections_1, lang_do_assignments_1): Likewise.
1598- (insert_os_after): New function, extracted from..
1599- (lang_insert_orphan): ..here.
1600- (process_insert_statements): New function.
1601- (lang_process): Call it.
1602- (lang_add_insert): New function.
1603- * ldlang.h (lang_insert_statement_enum): New.
1604- (lang_insert_statement_type): New.
1605- (lang_statement_union_type): Add insert_statement.
1606- (lang_add_insert): Declare.
1607-
1608-2008-01-18 Bob Wilson <bob.wilson@acm.org>
1609-
1610- * scripttempl/elfxtensa.sc: Merge ENTRY and .note.gnu.build-id
1611- changes from elf.sc.
1612-
1613-2008-01-16 Alan Modra <amodra@bigpond.net.au>
1614-
1615- * ldlang.c (lang_size_sections_1): Simplify SEC_NEVER_LOAD test.
1616-
1617-2008-01-16 Alan Modra <amodra@bigpond.net.au>
1618-
1619- * ldlang.h (lang_afile_asection_pair_statement_enum): Delete.
1620- (lang_afile_asection_pair_statement_type): Delete.
1621- (lang_statement_union_type): Delete afile_asection_pair_statement.
1622- * ldlang.c (lang_insert_orphan): Delete case handling the above.
1623- (map_input_to_output_sections, print_statement): Likewise.
1624-
1625-2008-01-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1626-
1627- * emulparams/shlelf_linux.sh (DATA_START_SYMBOLS): Use PROVIDE
1628- with __data_start.
1629- * emulparams/shelf_nbsd.sh (DATA_START_SYMBOLS): Likewise.
1630-
1631-2008-01-15 Alan Modra <amodra@bigpond.net.au>
1632-
1633- PR 5604
1634- * ldlang.c (lang_gc_sections): Move code to set SEC_KEEP on entry
1635- syms to _bfd_elf_gc_keep.
1636- * emultempl/ppc64elf.em (ppc_before_allocation): Don't call
1637- ppc64_elf_edit_opd if no_opd_opt.
1638-
1639-2008-01-11 Tristan Gingold <gingold@adacore.com>
1640- Eric Botcazou <ebotcazou@adacore.com>
1641-
1642- * ldlang.c (lang_end): Warns if the entry point is not found when
1643- --gc-sections.
1644- Emit an error if no root is specified when --gc-sections -r.
1645- * ld.texinfo (Options): Document that --gc-sections is compatible
1646- with -r and -q.
1647- * ldmain.c (main): Do not error out if -r and --gc-sections.
1648- * scripttempl/elf.sc: Emit ENTRY command only if relocating.
1649-
1650-2008-01-10 Daniel Jacobowitz <drow@sources.redhat.com>
1651-
1652- PR ld/5533
1653- * ldlang.c (lang_end): Issue a warning for a missing start symbol
1654- of a shared library if the symbol was specified on the command
1655- line.
1656-
1657-2008-01-10 Alan Modra <amodra@bigpond.net.au>
1658-
1659- * ld.texinfo (--gc-sections): Describe linker behaviour.
1660-
1661-For older changes see ChangeLog-2007
1662+For older changes see ChangeLog-2008
1663
1664
1665 Local Variables:
1666 mode: change-log
1667@@ -828,3 +16,4 @@
1668 fill-column: 74
1669 version-control: never
1670 End:
1671+
1672diff -Naur binutils-2.19.orig/ld/ChangeLog-2008 binutils-2.19/ld/ChangeLog-2008
1673--- binutils-2.19.orig/ld/ChangeLog-2008 1969-12-31 16:00:00.000000000 -0800
1674+++ binutils-2.19/ld/ChangeLog-2008 2009-01-08 06:39:46.000000000 -0800
1675@@ -0,0 +1,840 @@
1676+2008-12-23 Tristan Gingold <gingold@adacore.com>
1677+
1678+ * Makefile.am (EXTRA_DIST): Add deffilep.c and deffilep.h
1679+ * Makefile.in: Regenerate.
1680+
1681+2008-11-14 Alan Modra <amodra@bigpond.net.au>
1682+
1683+ * Makefile.am (spu_ovl.o_c): Add missing line continuations.
1684+ * Makefile.in: Regenerate.
1685+
1686+2008-10-05 Alan Modra <amodra@bigpond.net.au>
1687+
1688+ PR 6943
1689+ * scripttempl/avr.sc (.bss): Set lma when relocating.
1690+ (.bss, .noinit): No need to set vma when relocating.
1691+ (.text, .bss, ,noinit): Set vma to zero when not relocating.
1692+
1693+2008-09-30 Joseph Myers <joseph@codesourcery.com>
1694+
1695+ * emulparams/elf64ppc.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.opd
1696+ and .rela.branch_lt.
1697+
1698+2008-09-29 Nick Clifton <nickc@redhat.com>
1699+
1700+ * po/vi.po: Updated Vietnamese translation.
1701+
1702+2008-09-09 Peter Rosin <peda@lysator.liu.se> (tiny change)
1703+
1704+ * emultempl/pe.em (pe_find_data_imports): Add trailing newline
1705+ to warning message.
1706+ * emultempl/pep.em (pep_find_data_imports): Likewise.
1707+
1708+2008-09-09 Alan Modra <amodra@bigpond.net.au>
1709+
1710+ * Makefile.am: Run "make dep-am".
1711+ * Makefile.in: Regenerate.
1712+ * po/ld.pot: Regenerate.
1713+
1714+2008-09-09 Alan Modra <amodra@bigpond.net.au>
1715+
1716+ * emultempl/beos.em (gld${EMULATION_NAME}_place_orphan): Updated.
1717+ * emultempl/sunos.em (gld${EMULATION_NAME}_before_allocation): Ditto.
1718+
1719+2008-09-08 Tristan Gingold <gingold@adacore.com>
1720+
1721+ * NEWS: Add a marker for the 2.19 features.
1722+
1723+2008-09-07 Alan Modra <amodra@bigpond.net.au>
1724+
1725+ * ldlang.h (lang_output_section_find): Define.
1726+ (lang_output_section_statement_lookup): Update prototype.
1727+ * ldlang.c (lang_output_section_find,
1728+ lang_output_section_statement_lookup_1): Merge into..
1729+ (lang_output_section_statement_lookup): ..here. Update all callers.
1730+ (process_insert_statements): Set constraint negative
1731+ for output section statements we might be inserting. Make error
1732+ fatal on not finding insertion section.
1733+ (lang_output_section_find): Rather than comparing
1734+ output_section_statement.constraint against -1, test whether
1735+ it is postive.
1736+ (lang_output_section_statement_lookup_1): Likewise.
1737+ (output_prev_sec_find, strip_excluded_output_sections): Likewise.
1738+ (lang_record_phdrs): Likewise.
1739+ * emultempl/elf32.em (output_rel_find): Likewise.
1740+ * NEWS: Mention INSERT.
1741+
1742+2008-08-26 Nick Clifton <nickc@redhat.com>
1743+
1744+ PR 6727
1745+ * emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Scan all
1746+ input sections in all input bfds and always select the last
1747+ suitable one, so that interworking stubs are always processed
1748+ after all other input sections.
1749+ (arm_elf_before_allocation): Remove redundant use of
1750+ output_has_begun flag.
1751+
1752+2008-08-24 Alan Modra <amodra@bigpond.net.au>
1753+
1754+ * configure.in: Update a number of obsolete autoconf macros.
1755+ * configure: Regenerate.
1756+ * aclocal.m4: Regenerate.
1757+
1758+2008-08-21 Jan Kratochvil <jan.kratochvil@redhat.com>
1759+
1760+ PR ld/6833
1761+ * ldexp.c (fold_binary <DATA_SEGMENT_ALIGN>): Do not align
1762+ EXPLD.DATASEG.MIN_BASE.
1763+ * ldlang.c (lang_size_sections): New variable OLD_BASE. Rename
1764+ OLD_MIN_BASE to MIN_BASE with the former alignment from `ldexp.c'.
1765+ Use OLD_BASE now for the minimal base check after the base decrease by
1766+ the maximum alignment found.
1767+
1768+2008-08-17 Alan Modra <amodra@bigpond.net.au>
1769+
1770+ PR 6478
1771+ * ldcref.c (check_local_sym_xref): Use bfd_generic_link_read_symbols.
1772+ Don't free symbol pointer array.
1773+ (check_refs): Likewise.
1774+ * ldmain.c (warning_callback): Likewise.
1775+ * ldmisc.c (vfinfo): Likewise.
1776+ * pe-dll.c (process_def_file): Likewise.
1777+ (pe_walk_relocs_of_symbol, generate_reloc): Likewise.
1778+ * emultempl/pe.em (pe_find_data_imports): Likewise.
1779+ (gld_${EMULATION_NAME}_after_open): Likewise.
1780+ * emultempl/pep.em (pep_find_data_imports): Likewise.
1781+ (gld_${EMULATION_NAME}_after_open): Likewise.
1782+ * ldlang.h (lang_input_statement_type): Delete asymbols, symbol_count,
1783+ passive_position, closed.
1784+ * ldlang.c (new_afile): Don't set asymbols and symbol_count.
1785+ * ldmain.c (add_archive_element): xcalloc lang_input_statement_type.
1786+
1787+2008-08-15 Alan Modra <amodra@bigpond.net.au>
1788+
1789+ PR 6526
1790+ * configure.in: Invoke AC_USE_SYSTEM_EXTENSIONS.
1791+ * Makefile.in: Regenerate.
1792+ * aclocal.m4: Regenerate.
1793+ * config.in: Regenerate.
1794+ * configure: Regenerate.
1795+
1796+2008-08-09 Alan Modra <amodra@bigpond.net.au>
1797+
1798+ PR 6753
1799+ * ldmain.c (check_for_scripts_dir, set_scripts_dir): Delete.
1800+ (main): Don't set_scripts_dir here.
1801+ * ldfile.c (check_for_scripts_dir, find_scripts_dir): New functions,
1802+ largely based on ldmain.c versions.
1803+ (ldfile_find_command_file): Set up search in script dir here without
1804+ affecting library search.
1805+ * Makefile.am (ldmain.o): No need to define SCRIPTDIR.
1806+ (ldfile.o): New rule.
1807+ * Makefile.in: Regenerate.
1808+
1809+2008-08-08 Anatoly Sokolov <aesok@post.ru>
1810+
1811+ * Makefile.am (ALL_EMULATIONS): Add eavr25.o, eavr31.o, eavr35.o,
1812+ and eavr51.o.
1813+ Add rules for eavr25.c, eavr31.c, eavr35.c, eavr51.c.
1814+ * Makefile.in: Regenerate.
1815+ * configure.tgt (avr-*-*, targ_extra_emuls): Add avr25, avr31, avr35
1816+ and avr51.
1817+ * emulparams/avr25.sh: New file.
1818+ * emulparams/avr31.sh: New file.
1819+ * emulparams/avr35.sh: New file.
1820+ * emulparams/avr51.sh: New file.
1821+
1822+2008-08-08 Richard Sandiford <rdsandiford@googlemail.com>
1823+ Daniel Jacobowitz <dan@codesourcery.com>
1824+
1825+ * emulparams/elf32bmip.sh (GOT): Define, moving .got.plt to...
1826+ (OTHER_RELRO_SECTIONS, OTHER_READWRITE_SECTIONS): ...one of these
1827+ two variables.
1828+ * emulparams/elf32bmipn32-defs.sh: Likewise.
1829+ * emultempl/mipself.em: Include ldctor.h, elf/mips.h and elfxx-mips.h.
1830+ (is_mips_elf): New macro.
1831+ (stub_file, stub_bfd): New variables.
1832+ (hook_stub_info): New structure.
1833+ (hook_in_stub): New function.
1834+ (mips_add_stub_section): Likewise.
1835+ (mips_create_output_section_statements): Likewise.
1836+ (mips_before_allocation): Likewise.
1837+ (real_func): New variable.
1838+ (mips_for_each_input_file_wrapper): New function.
1839+ (mips_lang_for_each_input_file): Likewise.
1840+ (lang_for_each_input_file): Define.
1841+ (LDEMUL_BEFORE_ALLOCATION): Likewise.
1842+ (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Likewise.
1843+
1844+2008-08-08 Alan Modra <amodra@bigpond.net.au>
1845+
1846+ * ldfile.c (ldfile_open_file_search): Use concat.
1847+ (try_open): Don't use a fixed size pathname buffer.
1848+ (ldfile_find_command_file): Likewise.
1849+ * emultempl/elf32.em (gld${EMULATION_NAME}_open_dynamic_archive): If
1850+ using EXTRA_SHLIB_EXTENSION, don't open twice.
1851+
1852+2008-08-04 Alan Modra <amodra@bigpond.net.au>
1853+
1854+ * Makefile.am (POTFILES.in): Set LC_ALL=C.
1855+ * Makefile.in: Regenerate.
1856+ * po/POTFILES.in: Regenerate.
1857+
1858+2008-08-03 Alan Modra <amodra@bigpond.net.au>
1859+
1860+ * Makefile.am (spu_ovl.o): Merge rule into..
1861+ (spu_ovl.o_c): ..this one. Only run cpp for spu target.
1862+ * Makefile.in: Regenerate.
1863+
1864+2008-08-02 Jan Kratochvil <jan.kratochvil@redhat.com>
1865+
1866+ Include the spu_ovl ASCII form in the repository files.
1867+ * emultempl/spuelf.em: No longer use `bin2c', use now `spu_ovl.o_c'.
1868+ * Makefile.am (eelf32_spu.c): Depend now on `spu_ovl.o_c'.
1869+ ($(srcdir)/emultempl/spu_ovl.o_c): New target.
1870+ ($(srcdir)/emultempl/spu_ovl.o): Rename to...
1871+ (spu_ovl.o): ...this one.
1872+ * Makefile.in: Regenerate.
1873+ * emultempl/spu_ovl.o_c: New file.
1874+ * emultempl/spu_ovl.o: File removed.
1875+
1876+2008-07-31 Takashi Ono <t_ono@hkfreak.net>
1877+
1878+ * pe-dll.c (generate_relocs): Don't generate relocs for
1879+ undefined weak symbols.
1880+
1881+2008-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1882+
1883+ * emultempl/spuelf.em: Abort on the missing required `spu_ovl.o'.
1884+
1885+2008-07-30 Alan Modra <amodra@bigpond.net.au>
1886+
1887+ * emultempl/pe.em, emultempl/pep.em: Silence gcc warnings.
1888+
1889+2008-07-18 Joseph Myers <joseph@codesourcery.com>
1890+
1891+ * ld.texinfo (--no-wchar-size-warning): Document new ARM option.
1892+ * emultempl/armelf.em (no_wchar_size_warning): New.
1893+ (arm_elf_create_output_section_statements): Pass
1894+ no_wchar_size_warning to arm_elf_create_output_section_statements.
1895+ (OPTION_NO_WCHAR_SIZE_WARNING): New.
1896+ (PARSE_AND_LIST_LONGOPTS): Add no-wchar-size-warning.
1897+ (PARSE_AND_LIST_OPTIONS): List --no-wchar-size-warning.
1898+ (PARSE_AND_LIST_ARGS_CASES): Handle --no-wchar-size-warning.
1899+
1900+2008-07-15 Jie Zhang <jie.zhang@analog.com>
1901+
1902+ * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define.
1903+
1904+2008-07-12 Craig Silverstein <csilvers@google.com>
1905+
1906+ PR ld/6741
1907+ * configure.in: Check for, and include, libz.a if it is present.
1908+ * configure: Regenerate.
1909+ * config.in: Regenerate.
1910+
1911+2008-07-12 Jie Zhang <jie.zhang@analog.com>
1912+
1913+ Revert
1914+ 2008-07-12 Jie Zhang <jie.zhang@analog.com>
1915+ * Makefile.am (eelf32bfin.c): Depend on bfin.em.
1916+ (eelf32bfinfd.c): Likewise.
1917+ * Makefile.in: Regenerate.
1918+ * gen-doc.texi: Set Blackfin.
1919+ * ld.texinfo: Document --sep-code and Blackfin specific
1920+ options.
1921+ * ldmain.c (main): Initialize link_info.sep_code.
1922+ * lexsup.c (enum option_values): Add OPTION_SEP_CODE.
1923+ (ld_options[]): Add --sep-code.
1924+ (parse_args): Deal with --sep-code.
1925+ * emulparams/bfin.sh (EXTRA_EM_FILE): Define.
1926+ * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define.
1927+ * emultempl/bfin.em: New file.
1928+
1929+2008-07-12 Jie Zhang <jie.zhang@analog.com>
1930+
1931+ * Makefile.am (eelf32bfin.c): Depend on bfin.em.
1932+ (eelf32bfinfd.c): Likewise.
1933+ * Makefile.in: Regenerate.
1934+ * gen-doc.texi: Set Blackfin.
1935+ * ld.texinfo: Document --sep-code and Blackfin specific
1936+ options.
1937+ * ldmain.c (main): Initialize link_info.sep_code.
1938+ * lexsup.c (enum option_values): Add OPTION_SEP_CODE.
1939+ (ld_options[]): Add --sep-code.
1940+ (parse_args): Deal with --sep-code.
1941+ * emulparams/bfin.sh (EXTRA_EM_FILE): Define.
1942+ * emulparams/elf32bfinfd.sh (OTHER_SECTIONS): Define.
1943+ * emultempl/bfin.em: New file.
1944+
1945+2008-07-09 Danny Smith <dannysmith@users.sourceforge.net>
1946+
1947+ *pe-dll.c (autofilter_symbolprefixlist): Excude all symbols
1948+ starting with ".".
1949+ Exclude "_IMPORT_DESCRIPTOR_".
1950+ (autofilter_symbolsuffixlist): Exclude "_NULL_THUNK_DATA".
1951+ (autofilter_symbollist_generic): Don't check for ".text".
1952+ Exclude "_NULL_IMPORT_DESCRIPTOR".
1953+ (autofilter_symbollist_i386): Likewise.
1954+
1955+2008-07-07 Alan Modra <amodra@bigpond.net.au>
1956+
1957+ * emultempl/armelf.em (elf32_arm_add_stub_section): Use
1958+ bfd_make_section_with_flags.
1959+ * emultempl/avrelf.em (avr_elf_create_output_section_statements):
1960+ Likewise.
1961+ * emultempl/hppaelf.em (hppaelf_add_stub_section): Likewise.
1962+ * emultempl/m68hc1xelf.em (m68hc11elf_add_stub_section): Likewise.
1963+ * emultempl/m68kcoff.em (gld${EMULATION_NAME}_after_open): Likewise.
1964+ * emultempl/m68kelf.em (m68k_elf_after_open): Likewise.
1965+ * emultempl/ppc64elf.em (ppc_add_stub_section): Likewise.
1966+ * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation):
1967+ Likewise.
1968+
1969+2008-07-06 Nathan Sidwell <nathan@codesourcery.com>
1970+
1971+ * ld.texinfo (File Commands): Document that INCLUDE can be used in
1972+ several different places.
1973+ * ldgram.y (statement, memory_spec, section): Allow INCLUDE.
1974+ (memory, memory_spec_list): Simplify BNF
1975+ (memory_spec_list_opt): New rule.
1976+ * ldlex.l (INCLUDE): Recognize in EXPRESSION.
1977+
1978+2008-06-20 Alan Modra <amodra@bigpond.net.au>
1979+
1980+ * emultempl/spuelf.em (gld${EMULATION_NAME}_finish): Make "can not
1981+ build overlay stubs" a fatal error.
1982+
1983+2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1984+
1985+ * config.in: Regenerate.
1986+ * configure: Regenerate.
1987+
1988+2008-06-17 Alan Modra <amodra@bigpond.net.au>
1989+
1990+ * emultempl/spuelf.em (extra_stack_space): New variable.
1991+ (gld${EMULATION_NAME}_finish): Pass it to spu_elf_check_vma.
1992+ (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS,
1993+ PARSE_AND_LIST_ARGS_CASES): Handle --extra-stack-space.
1994+ * emultempl/spu_ovl.S: Mask interrupts during dma and update of
1995+ overlay manager structures.
1996+ * emultempl/spu_ovl.o: Regenerate.
1997+
1998+2008-06-16 Hans-Peter Nilsson <hp@bitrange.com>
1999+
2000+ * ld.texinfo (@node MMIX): For the __.MMIX.start. prefix, only
2001+ mention it as being special for global symbols.
2002+
2003+2008-06-12 Nick Clifton <nickc@redhat.com>
2004+
2005+ * ldlang.c (print_output_section_statement): If the output section
2006+ statement has an update_dot_tree expression, apply it to
2007+ print_dot.
2008+ (print_input_section): Do not update print_dot if it would move
2009+ print_dot backwards.
2010+ (lang_do_assignments_1): If the output section statement has an
2011+ update_dot_tree expression apply it to dot.
2012+
2013+2008-06-07 Alan Modra <amodra@bigpond.net.au>
2014+
2015+ * NEWS: Mention archive:path patterns.
2016+ * ld.texinfo: Likewise.
2017+ * ldlang.c: Formatting throughout.
2018+ (archive_path): Only assume "[A-Za-z]:" is a dos drive.
2019+ (input_statement_is_archive_path): New function, extracted from..
2020+ (walk_wild): ..here.
2021+ (walk_wild_consider_section): Match archive:path here too.
2022+ (init_map_userdata, sort_def_symbol): Convert to ISO C.
2023+ * ldmain.c (main): Set link_info.path_separator.
2024+ * emultempl/spuelf.em (choose_target): Don't set it here.
2025+
2026+2008-06-06 Alan Modra <amodra@bigpond.net.au>
2027+
2028+ * ldlang.c (name_match): New function.
2029+ (unique_section_p, walk_wild_consider_section): Use it here.
2030+ (walk_wild_section_general): And here.
2031+ (archive_path): New function.
2032+ (walk_wild): Match archive:path filespecs.
2033+ (open_input_bfds): Don't load archive:path files.
2034+ * emultempl/spuelf.em (choose_target): Set path_separator.
2035+ * emulparams/elf32_spu.sh: Add ._ea.* sections to ._ea output.
2036+
2037+2008-06-04 Nick Clifton <nickc@redhat.com>
2038+
2039+ * ld.texinfo (Orphan Sections): Fix texi typo.
2040+
2041+2008-06-04 Chris Metcalf <cmetcalf@tilera.com>
2042+
2043+ * lexsup.c (option_values): Add OPTION_NO_WARN_FATAL.
2044+ (ld_options): Add entry for --no-fatal-warnings.
2045+ (parse_args): Handle OPTION_NO_WARN_FATAL.
2046+ * ld.texinfo (Options): Document new command line switch.
2047+
2048+2008-06-04 Alan Modra <amodra@bigpond.net.au>
2049+
2050+ * emultempl/spuelf.em (spu_elf_relink): Correct --no-auto-overlay arg.
2051+
2052+2008-06-02 Nathan Sidwell <nathan@codesourcery.com>
2053+
2054+ * ldlang.c (closest_target_match): Skip generic big and little
2055+ endian ELF targets.
2056+
2057+2008-05-31 Evandro Menezes <evandro@yahoo.com>
2058+
2059+ PR ld/6430
2060+ * ld.h (enum sort_order): New.
2061+ * ldlang.c (lang_check: Fix comment.
2062+ (lang_common): Sort commons in ascending or descending order.
2063+ (lang_one_common): Likewise.
2064+ * lexsup.c (ld_options): Have --sort-common take an option
2065+ argument.
2066+ (parse_args): Handle argument to --sort-common.
2067+ * ld.texinfo (--sort-common): Document new optional argument.
2068+ * NEWS: Mention new feature.
2069+
2070+2008-05-28 Christophe Lyon <christophe.lyon@st.com>
2071+
2072+ * ld.texinfo: State that farcalls stubs are supported for ARM-EABI
2073+ only.
2074+
2075+2008-05-27 Kai Tietz <kai.tietz@onevision.com>
2076+
2077+ * pe-dll.c (fill_edata): Make sure we calculate vma's in
2078+ type bfd_vma.
2079+ (generate_reloc): Likewise.
2080+ (pe_implied_import_dll): Likewise.
2081+
2082+2008-05-21 Nick Clifton <nickc@redhat.com>
2083+
2084+ PR ld/6519
2085+ * ld.texinfo (Orphan Sections): Mention that the linker will
2086+ provide start and stop symbols for orphaned sections if their
2087+ names are valid C identifiers.
2088+ * NEWS: Add an addendum to the description of the linker feature
2089+ for providing orphan section start and end symbols.
2090+
2091+2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
2092+
2093+ * configure.in (--enable-got): New option. Handle it.
2094+ * configure: Regenerate.
2095+ * config.in: Regenerate.
2096+ * emultempl/m68kelf.em: (got_handling_target_default): New shell
2097+ variable.
2098+ (GOT_HANDLING_TARGET_DEFAULT): New macro.
2099+ (GOT_HANDLING_DEFAULT): New macro. Initialize it from configure
2100+ option if one was given.
2101+ (got_handling): New static variable.
2102+ (elf_m68k_create_output_section_statements): New static function
2103+ implementing hook.
2104+ (PARSE_AND_LIST_PROLOGUE): Define shell variable.
2105+ (OPTION_GOT): New macro.
2106+ (PARSE_AND_LIST_LONGOPTS): Define shell variable. Specify
2107+ --got option.
2108+ (got): New linker option.
2109+ (PARSE_AND_LIST_OPTIONS): Define shell variable. Print help string
2110+ for --got option.
2111+ (PARSE_AND_LIST_ARGS_CASES): Define shell variable. Handle --got
2112+ option.
2113+ * ld.texinfo: Document --got=<type> option.
2114+ * gen-doc.texi: Add M68K.
2115+ * NEWS: Mention the new feature.
2116+
2117+2008-05-21 Evandro Menezes <evandro@yahoo.com>
2118+
2119+ PR ld/6430
2120+ * ld.texinfo (--sort-common): Correct documentation to indicate
2121+ that sorting is performed by alignment, not size, biggest
2122+ alignment first.
2123+
2124+2008-05-21 Christophe Lyon <christophe.lyon@st.com>
2125+ Nick Clifton <nickc@redhat.com>
2126+
2127+ * ld.texinfo (ARM): Document --stub-group-size=N option.
2128+ Move description of --pic-veneer option into the ARM section.
2129+ * NEWS: Mention the support for long function calls.
2130+
2131+2008-05-15 Christophe Lyon <christophe.lyon@st.com>
2132+
2133+ * emultempl/armelf.em (build_section_lists): New function.
2134+ (stub_file): Define.
2135+ (need_laying_out): Define.
2136+ (group_size): Define.
2137+ (hook_stub_info): Define.
2138+ (hook_in_stub): New function.
2139+ (elf32_arm_add_stub_section): New function.
2140+ (gldarm_layout_sections_again): New function.
2141+ (gld${EMULATION_NAME}_finish): Replace arm_elf_finish(). Generate
2142+ stubs for long calls if needed.
2143+ (arm_elf_create_output_section_statements): create stub_file bfd.
2144+ (arm_for_each_input_file_wrapper): New function.
2145+ (arm_lang_for_each_input_file): New function.
2146+ (lang_for_each_input_file): Define.
2147+ (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_STUBGROUP_SIZE.
2148+ (PARSE_AND_LIST_LONGOPTS): Add option stub-group-size.
2149+ (PARSE_AND_LIST_OPTIONS): Add option stub-group-size.
2150+ (PARSE_AND_LIST_ARGS_CASES): Add OPTION_STUBGROUP_SIZE case.
2151+ (LDEMUL_FINISH): Update to gld${EMULATION_NAME}_finish.
2152+ * lang.c (print_input_statement): Skip if bfd has
2153+ BFD_LINKER_CREATED.
2154+
2155+2008-05-14 Alan Modra <amodra@bigpond.net.au>
2156+
2157+ * Makefile.in: Regenerate.
2158+
2159+2008-05-09 Kai Tietz <kai.tietz@onevision.com>
2160+
2161+ ld/PR6502
2162+ * emultempl/pep.em (compute_dll_image_base): Use bfd_vma instead
2163+ of long and change return type to bfd_vma.
2164+ (definfo): Change type of address from long to bfd_vma.
2165+ (set_pep_value): Replace strtoul to strtoull.
2166+ (gld_${EMULATION_NAME}_set_symbols): use bfd_vma instead of long..
2167+ * pe-dll.c (pe_dll_generate_def_file): Use fprintf_vma to print
2168+ ImageBase.
2169+ (quick_reloc): Change argument address from int to bfd_size_type.
2170+
2171+2008-05-08 Tom Tromey <tromey@redhat.com>
2172+
2173+ * ld.texinfo (PowerPC64 ELF64): Fix typo.
2174+
2175+2008-05-08 Alan Modra <amodra@bigpond.net.au>
2176+
2177+ * elf32_spu.sh (OTHER_SECTIONS): Add "._ea".
2178+ * elf32ppc.sh: If building with spu support, put ".data.spehandle"
2179+ sections at the start of ".data" and provide a symbol to locate
2180+ the directory of embedded spe programs.
2181+
2182+2008-05-08 Alan Modra <amodra@bigpond.net.au>
2183+
2184+ * ldexp.c (exp_print_token): Add ABSOLUTE, MIN_K, ASSERT_K. Correct
2185+ MAX_K.
2186+ (fold_binary <SEGMENT_START>): Set expld.result.section to
2187+ current section. Expand comment. Formatting.
2188+ (fold_name <DEFINED>): Set expld.result.section to current section.
2189+
2190+2008-04-28 Nathan Sidwell <nathan@codesourcery.com>
2191+
2192+ * ldlang.c (lang_size_sections_1): Don't check LMA overflow on
2193+ non-load sections.
2194+
2195+2008-04-25 Michael Frysinger <vapier@gentoo.org>
2196+
2197+ * configure.tgt (bfin-*-linux-uclibc*): Set targ_emul to elf32bfinfd
2198+ and targ_extra_emuls to elf32bfin.
2199+
2200+2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2201+
2202+ * aclocal.m4: Regenerate.
2203+ * configure: Regenerate.
2204+
2205+2008-04-03 Kai Tietz <kai.tietz@onevision.com>
2206+
2207+ * scripttempl/pep.sc: Align start of symbol __CTOR_LIST__.
2208+
2209+2008-04-08 Alan Modra <amodra@bigpond.net.au>
2210+
2211+ * po/POTFILES.in: Regenerate.
2212+
2213+2008-04-08 Alan Modra <amodra@bigpond.net.au>
2214+
2215+ * emultempl/spuelf.em (auto_overlay, auto_overlay_file,
2216+ auto_overlay_fixed, auto_overlay_reserved, my_argc, my_argv): New vars.
2217+ (spu_before_allocation): Warn on --auto-overlay and existing overlays.
2218+ (struct tflist, clean_tmp): Move.
2219+ (new_tmp_file): New function, extracted from..
2220+ (embedded_spu_file): ..here.
2221+ (spu_elf_open_overlay_script, spu_elf_relink): New function.
2222+ (gld${EMULATION_NAME}_finish): Pass a bunch of --auto-overlay params.
2223+ Warn on --auto-overlay and zero local store.
2224+ (gld${EMULATION_NAME}_choose_target): New function to stash argv.
2225+ (OPTION_SPU_AUTO_OVERLAY, OPTION_SPU_AUTO_RELINK,
2226+ OPTION_SPU_OVERLAY_RODATA, OPTION_SPU_FIXED_SPACE,
2227+ OPTION_SPU_RESERVED_SPACE, OPTION_SPU_NO_AUTO_OVERLAY): Define.
2228+ (PARSE_AND_LIST_LONGOPTS): Add entries for new options.
2229+ (PARSE_AND_LIST_OPTIONS): Likewise.
2230+ (PARSE_AND_LIST_ARGS_CASES): Likewise.
2231+ (LDEMUL_CHOOSE_TARGET): Define.
2232+
2233+2008-04-03 Kai Tietz <kai.tietz@onevision.com>
2234+
2235+ PR ld/6026
2236+ * pe-dll.c (make_head): Fix iat and thunk addend offset.
2237+
2238+2008-03-31 Nick Clifton <nickc@redhat.com>
2239+
2240+ * po/fr.po: Updated French translation.
2241+
2242+2008-03-24 Ian Lance Taylor <iant@google.com>
2243+
2244+ The sha1 code is now in libiberty.
2245+ * sha1.c: Remove.
2246+ * sha1.h: Remove.
2247+ * Makefile.am (CFILES): Remove sha1.c.
2248+ (HFILES): Remove sha1.h.
2249+ (OFILES): Remove sha1.o.
2250+ (ld_new_SOURCES): Remove sha1.c.
2251+ (sha1.o): Remove target.
2252+ * Makefile.in: Rebuild.
2253+
2254+2008-03-20 Alan Modra <amodra@bigpond.net.au>
2255+
2256+ * emultempl/spuelf.em: Update calls to elf32-spu.c funcs.
2257+
2258+2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2259+
2260+ * aclocal.m4: Regenerate.
2261+ * configure: Likewise.
2262+ * Makefile.in: Likewise.
2263+
2264+2008-03-14 Alan Modra <amodra@bigpond.net.au>
2265+
2266+ * emultempl/spuelf.em (gld${EMULATION_NAME}_finish): Protect
2267+ spu_elf_build_stubs with is_spu_target.
2268+
2269+2008-03-13 Alan Modra <amodra@bigpond.net.au>
2270+
2271+ * Makefile.am: Run "make dep-am".
2272+ * Makefile.in: Regenerate.
2273+ * configure: Regenerate.
2274+
2275+2008-03-06 Joseph Myers <joseph@codesourcery.com>
2276+ Roman Zippel <zippel@linux-m68k.org>
2277+
2278+ * emulparams/m68kelf.sh (GENERATE_PIE_SCRIPT): Define.
2279+ (COMMONPAGESIZE): Define.
2280+
2281+2008-02-22 Nick Clifton <nickc@redhat.com>
2282+
2283+ PR ld/5785
2284+ * ldlang.c (lang_size_sections_1): Honour the setting of an
2285+ lma_region even if there is no vma region set, or the vma region
2286+ is the same as the lma region.
2287+
2288+2008-02-18 Nick Clifton <nickc@redhat.com>
2289+
2290+ * scripttempl/armbpabi.sc (ENTRY): Do not define when performing a
2291+ relocatable link.
2292+ * scripttempl/elf32cr16.sc: Likewise.
2293+ * scripttempl/elf32cr16c.sc: Likewise.
2294+ * scripttempl/elf32crx.sc: Likewise.
2295+ * scripttempl/elf32sh-symbian.sc: Likewise.
2296+ * scripttempl/elf_chaos.sc: Likewise.
2297+ * scripttempl/elfd10v.sc: Likewise.
2298+ * scripttempl/elfi370.sc: Likewise.
2299+ * scripttempl/elfm68hc11.sc: Likewise.
2300+ * scripttempl/elfm68hc12.sc: Likewise.
2301+ * scripttempl/ip2k.sc: Likewise.
2302+ * scripttempl/iq2000.sc: Likewise.
2303+ * scripttempl/mep.sc: Likewise.
2304+ * scripttempl/v850.sc: Likewise.
2305+ * scripttempl/xstormy16.sc: Likewise.
2306+
2307+2008-02-16 Alan Modra <amodra@bigpond.net.au>
2308+
2309+ PR ld/5761
2310+ * ldexp.c (fold_name <LOADADDR>): Check result of evaluating
2311+ load_base before calling make_abs.
2312+
2313+2008-02-15 Alan Modra <amodra@bigpond.net.au>
2314+
2315+ * emultempl/alphaelf.em (alpha_after_open): Use elf_object_id.
2316+ * emultempl/hppaelf.em (hppaelf_create_output_section_statements):
2317+ Likewise.
2318+ * emultempl/ppc64elf.em (ppc_create_output_section_statements):
2319+ Likewise.
2320+ * emultempl/ppc32elf.em (is_ppc_elf32_vec): Delete. Replace all
2321+ uses with..
2322+ (is_ppc_elf): ..this new macro.
2323+
2324+2008-02-15 Alan Modra <amodra@bigpond.net.au>
2325+
2326+ * ldmain.h (output_bfd): Delete.
2327+ * ldmain.c (output_bfd): Delete.
2328+ Replace all occurrences of output_bfd with link_info.output_bfd.
2329+ * ldcref.c: Likewise.
2330+ * ldctor.c: Likewise.
2331+ * ldemul.c: Likewise.
2332+ * ldexp.c: Likewise.
2333+ * ldfile.c: Likewise.
2334+ * ldlang.c: Likewise.
2335+ * ldmisc.c: Likewise.
2336+ * ldwrite.c: Likewise.
2337+ * pe-dll.c: Likewise.
2338+ * emultempl/aix.em: Likewise.
2339+ * emultempl/alphaelf.em: Likewise.
2340+ * emultempl/armcoff.em: Likewise.
2341+ * emultempl/armelf.em: Likewise.
2342+ * emultempl/avrelf.em: Likewise.
2343+ * emultempl/beos.em: Likewise.
2344+ * emultempl/elf-generic.em: Likewise.
2345+ * emultempl/elf32.em: Likewise.
2346+ * emultempl/gld960.em: Likewise.
2347+ * emultempl/hppaelf.em: Likewise.
2348+ * emultempl/irix.em: Likewise.
2349+ * emultempl/linux.em: Likewise.
2350+ * emultempl/lnk960.em: Likewise.
2351+ * emultempl/m68hc1xelf.em: Likewise.
2352+ * emultempl/mmix-elfnmmo.em: Likewise.
2353+ * emultempl/mmo.em: Likewise.
2354+ * emultempl/pe.em: Likewise.
2355+ * emultempl/pep.em: Likewise.
2356+ * emultempl/ppc32elf.em: Likewise.
2357+ * emultempl/ppc64elf.em: Likewise.
2358+ * emultempl/scoreelf.em: Likewise.
2359+ * emultempl/sh64elf.em: Likewise.
2360+ * emultempl/spuelf.em: Likewise.
2361+ * emultempl/sunos.em: Likewise.
2362+ * emultempl/vanilla.em: Likewise.
2363+ * emultempl/vxworks.em: Likewise.
2364+ * emultempl/xtensaelf.em: Likewise.
2365+ * emultempl/z80.em: Likewise.
2366+ * ldlang.c (open_output): Don't return output, instead write
2367+ link_info_output_bfd directly.
2368+ * emultempl/alphaelf.em: Replace occurrences of link_info.hash->creator
2369+ with link_info.output_bfd->xvec.
2370+ * emultempl/hppaelf.em: Likewise.
2371+ * emultempl/ppc32elf.em: Likewise.
2372+ * emultempl/ppc64elf.em: Likewise.
2373+ * emultempl/spuelf.em: Likewise.
2374+
2375+2008-02-07 Alan Modra <amodra@bigpond.net.au>
2376+
2377+ * ldlang.c (new_afile): Don't pass unadorned NULL to concat.
2378+ * ldfile.c (ldfile_add_library_path): Likewise.
2379+ * emultempl/elf32.em (check_ld_elf_hints, check_ld_so_conf): Likewise.
2380+ * emultempl/lnk960.em (lnk960_before_parse): Likewise.
2381+ * emultempl/spuelf.em (embedded_spu_file): Likewise.
2382+
2383+2008-02-07 Alan Modra <amodra@bigpond.net.au>
2384+
2385+ * emultempl/spu_ovl.S: Use low bit of _ovly_table.size as
2386+ a "present" bit rather than low bit of .buf. Correct indexing
2387+ into _ovly_buf_table. Use relative loads and stores to access
2388+ overlay manager local vars.
2389+ * emultempl/spu_ovl.o: Regenerate.
2390+
2391+2008-02-04 H.J. Lu <hongjiu.lu@intel.com>
2392+
2393+ PR 5715
2394+ * configure: Regenerated.
2395+
2396+2008-01-31 Marc Gauthier <marc@tensilica.com>
2397+
2398+ * configure.tgt (xtensa*-*-*): Recognize processor variants.
2399+
2400+2008-01-28 Fabian Groffen <grobian@gentoo.org>
2401+
2402+ * configure.tgt (x86_64-*-solaris2): Add support for this target.
2403+
2404+2008-01-28 Vincent Riviere <vincent.riviere@freesbee.fr>
2405+
2406+ PR ld/5652
2407+ * genscripts.sh: Check for the existence of BASH_LINENO not just
2408+ the BASH shell before generating line numbers in the emulation
2409+ file.
2410+
2411+2008-01-28 Alan Modra <amodra@bigpond.net.au>
2412+
2413+ * emultempl/spu_ovl.S: Rewrite.
2414+ * emultempl/spu_ovl.o: Regenerate.
2415+ * emultempl/spuelf.em (toe): Delete.
2416+ (spu_place_special_section): Add param to control section placement.
2417+ Adjust callers.
2418+ (spu_elf_load_ovl_mgr): Adjust for struct _spu_elf_section_data
2419+ changes.
2420+ (spu_before_allocation): Adjust spu_elf_size_stubs call.
2421+ (gld${EMULATION_NAME}_finish): Adjust spu_elf_build_stubs call.
2422+
2423+2008-01-25 H.J. Lu <hongjiu.lu@intel.com>
2424+
2425+ PR ld/5670
2426+ * ldlang.c (process_insert_statements): Silence gcc 4.1 alias
2427+ warning.
2428+
2429+2008-01-25 Alan Modra <amodra@bigpond.net.au>
2430+
2431+ * ld.texinfo (INSERT): Describe.
2432+ * ldgram.y (ldgram_in_script, ldgram_had_equals): Delete.
2433+ (INSERT_K, AFTER, BEFORE): Add as tokens.
2434+ (ifile_p1): Handle INSERT statements.
2435+ (saved_script_handle, force_make_executable): Move to..
2436+ * ldmain.c: ..here.
2437+ (previous_script_handle): New global var.
2438+ * ldmain.h (saved_script_handle, force_make_executable): Declare.
2439+ (previous_script_handle): Likewise.
2440+ * ldlex.l (INSERT_K, AFTER, BEFORE): Add tokens.
2441+ * lexsup.c (parge_args <-T>): Set previous_script_handle.
2442+ * ldlang.c (lang_for_each_statement_worker): Handle insert statement.
2443+ (map_input_to_output_sections, print_statement): Likewise.
2444+ (lang_size_sections_1, lang_do_assignments_1): Likewise.
2445+ (insert_os_after): New function, extracted from..
2446+ (lang_insert_orphan): ..here.
2447+ (process_insert_statements): New function.
2448+ (lang_process): Call it.
2449+ (lang_add_insert): New function.
2450+ * ldlang.h (lang_insert_statement_enum): New.
2451+ (lang_insert_statement_type): New.
2452+ (lang_statement_union_type): Add insert_statement.
2453+ (lang_add_insert): Declare.
2454+
2455+2008-01-18 Bob Wilson <bob.wilson@acm.org>
2456+
2457+ * scripttempl/elfxtensa.sc: Merge ENTRY and .note.gnu.build-id
2458+ changes from elf.sc.
2459+
2460+2008-01-16 Alan Modra <amodra@bigpond.net.au>
2461+
2462+ * ldlang.c (lang_size_sections_1): Simplify SEC_NEVER_LOAD test.
2463+
2464+2008-01-16 Alan Modra <amodra@bigpond.net.au>
2465+
2466+ * ldlang.h (lang_afile_asection_pair_statement_enum): Delete.
2467+ (lang_afile_asection_pair_statement_type): Delete.
2468+ (lang_statement_union_type): Delete afile_asection_pair_statement.
2469+ * ldlang.c (lang_insert_orphan): Delete case handling the above.
2470+ (map_input_to_output_sections, print_statement): Likewise.
2471+
2472+2008-01-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2473+
2474+ * emulparams/shlelf_linux.sh (DATA_START_SYMBOLS): Use PROVIDE
2475+ with __data_start.
2476+ * emulparams/shelf_nbsd.sh (DATA_START_SYMBOLS): Likewise.
2477+
2478+2008-01-15 Alan Modra <amodra@bigpond.net.au>
2479+
2480+ PR 5604
2481+ * ldlang.c (lang_gc_sections): Move code to set SEC_KEEP on entry
2482+ syms to _bfd_elf_gc_keep.
2483+ * emultempl/ppc64elf.em (ppc_before_allocation): Don't call
2484+ ppc64_elf_edit_opd if no_opd_opt.
2485+
2486+2008-01-11 Tristan Gingold <gingold@adacore.com>
2487+ Eric Botcazou <ebotcazou@adacore.com>
2488+
2489+ * ldlang.c (lang_end): Warns if the entry point is not found when
2490+ --gc-sections.
2491+ Emit an error if no root is specified when --gc-sections -r.
2492+ * ld.texinfo (Options): Document that --gc-sections is compatible
2493+ with -r and -q.
2494+ * ldmain.c (main): Do not error out if -r and --gc-sections.
2495+ * scripttempl/elf.sc: Emit ENTRY command only if relocating.
2496+
2497+2008-01-10 Daniel Jacobowitz <drow@sources.redhat.com>
2498+
2499+ PR ld/5533
2500+ * ldlang.c (lang_end): Issue a warning for a missing start symbol
2501+ of a shared library if the symbol was specified on the command
2502+ line.
2503+
2504+2008-01-10 Alan Modra <amodra@bigpond.net.au>
2505+
2506+ * ld.texinfo (--gc-sections): Describe linker behaviour.
2507+
2508+For older changes see ChangeLog-2007
2509+
2510
2511+Local Variables:
2512+mode: change-log
2513+left-margin: 8
2514+fill-column: 74
2515+version-control: never
2516+End:
2517diff -Naur binutils-2.19.orig/ld/Makefile.am binutils-2.19/ld/Makefile.am
2518--- binutils-2.19.orig/ld/Makefile.am 2008-09-09 01:02:19.000000000 -0700
2519+++ binutils-2.19/ld/Makefile.am 2008-12-23 05:56:10.000000000 -0800
2520@@ -758,9 +758,9 @@
2521 $(srcdir)/emultempl/spu_ovl.o_c: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
2522 if ../gas/as-new --version \
2523 | grep 'target.*spu' >/dev/null 2>/dev/null; then \
2524- cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
2525+ cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s; \
2526 ../gas/as-new -o spu_ovl.o spu_ovl.s; \
2527- ../binutils/bin2c <spu_ovl.o >$@
2528+ ../binutils/bin2c <spu_ovl.o >$@; \
2529 fi
2530 eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
2531 $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2532@@ -1914,7 +1914,8 @@
2533
2534 # Stuff that should be included in a distribution. The diststuff
2535 # target is run by the taz target in ../Makefile.in.
2536-EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o_c $(man_MANS)
2537+EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o_c \
2538+ deffilep.c deffilep.h $(man_MANS)
2539 diststuff: info $(EXTRA_DIST)
2540 all: info ld.1
2541
2542diff -Naur binutils-2.19.orig/ld/Makefile.in binutils-2.19/ld/Makefile.in
2543--- binutils-2.19.orig/ld/Makefile.in 2008-09-09 01:02:19.000000000 -0700
2544+++ binutils-2.19/ld/Makefile.in 2008-12-23 05:56:10.000000000 -0800
2545@@ -730,7 +730,9 @@
2546
2547 # Stuff that should be included in a distribution. The diststuff
2548 # target is run by the taz target in ../Makefile.in.
2549-EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o_c $(man_MANS)
2550+EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o_c \
2551+ deffilep.c deffilep.h $(man_MANS)
2552+
2553 DISTCLEANFILES = tdirs site.exp site.bak stringify.sed $(am__append_1)
2554 all: config.h
2555 $(MAKE) $(AM_MAKEFLAGS) all-recursive
2556@@ -1588,9 +1590,9 @@
2557 $(srcdir)/emultempl/spu_ovl.o_c: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
2558 if ../gas/as-new --version \
2559 | grep 'target.*spu' >/dev/null 2>/dev/null; then \
2560- cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
2561+ cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s; \
2562 ../gas/as-new -o spu_ovl.o spu_ovl.s; \
2563- ../binutils/bin2c <spu_ovl.o >$@
2564+ ../binutils/bin2c <spu_ovl.o >$@; \
2565 fi
2566 eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
2567 $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2568diff -Naur binutils-2.19.orig/ld/pe-dll.c binutils-2.19/ld/pe-dll.c
2569--- binutils-2.19.orig/ld/pe-dll.c 2008-08-16 20:12:50.000000000 -0700
2570+++ binutils-2.19/ld/pe-dll.c 2009-01-08 06:39:45.000000000 -0800
2571@@ -1,6 +1,6 @@
2572 /* Routines to help build PEI-format DLLs (Win32 etc)
2573 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2574- 2008 Free Software Foundation, Inc.
2575+ 2008, 2009 Free Software Foundation, Inc.
2576 Written by DJ Delorie <dj@cygnus.com>
2577
2578 This file is part of the GNU Binutils.
2579@@ -314,6 +314,7 @@
2580 { STRING_COMMA_LEN ("libcegcc") },
2581 { STRING_COMMA_LEN ("libcygwin") },
2582 { STRING_COMMA_LEN ("libgcc") },
2583+ { STRING_COMMA_LEN ("libgcc_s") },
2584 { STRING_COMMA_LEN ("libstdc++") },
2585 { STRING_COMMA_LEN ("libmingw32") },
2586 { STRING_COMMA_LEN ("libmingwex") },
2587@@ -324,6 +325,37 @@
2588 { NULL, 0 }
2589 };
2590
2591+/* Regardless of the suffix issue mentioned above, we must ensure that
2592+ we do not falsely match on a leading substring, such as when libtool
2593+ builds libstdc++ as a DLL using libsupc++convenience.a as an intermediate.
2594+ This routine ensures that the leading part of the name matches and that
2595+ it is followed by only an optional version suffix and a file extension,
2596+ returning zero if so or -1 if not. */
2597+static int libnamencmp (const char *libname, const autofilter_entry_type *afptr)
2598+{
2599+ if (strncmp (libname, afptr->name, afptr->len))
2600+ return -1;
2601+
2602+ libname += afptr->len;
2603+
2604+ /* Be liberal in interpreting what counts as a version suffix; we
2605+ accept anything that has a dash to separate it from the name and
2606+ begins with a digit. */
2607+ if (libname[0] == '-')
2608+ {
2609+ if (!ISDIGIT (*++libname))
2610+ return -1;
2611+ /* Ensure the filename has an extension. */
2612+ while (*++libname != '.')
2613+ if (!*libname)
2614+ return -1;
2615+ }
2616+ else if (libname[0] != '.')
2617+ return -1;
2618+
2619+ return 0;
2620+}
2621+
2622 static const autofilter_entry_type autofilter_objlist[] =
2623 {
2624 { STRING_COMMA_LEN ("crt0.o") },
2625@@ -501,7 +533,7 @@
2626
2627 while (afptr->name)
2628 {
2629- if (strncmp (libname, afptr->name, afptr->len) == 0 )
2630+ if (libnamencmp (libname, afptr) == 0 )
2631 return 0;
2632 afptr++;
2633 }
2634diff -Naur binutils-2.19.orig/ld/testsuite/ChangeLog binutils-2.19/ld/testsuite/ChangeLog
2635--- binutils-2.19.orig/ld/testsuite/ChangeLog 2008-10-02 03:08:04.000000000 -0700
2636+++ binutils-2.19/ld/testsuite/ChangeLog 2009-01-14 01:13:49.000000000 -0800
2637@@ -1,3 +1,8 @@
2638+2009-01-14 Joseph Myers <joseph@codesourcery.com>
2639+
2640+ * ld-arm/thumb2-bl-undefweak.d, ld-arm/thumb2-bl-undefweak.s: New.
2641+ * ld-arm/arm-elf.exp: Run thumb2-bl-undefweak test.
2642+
2643 2008-09-30 Alan Modra <amodra@bigpond.net.au>
2644
2645 * ld-elf/extract-symbol-1sec.d: Correct section lma.
2646diff -Naur binutils-2.19.orig/ld/testsuite/ld-arm/arm-elf.exp binutils-2.19/ld/testsuite/ld-arm/arm-elf.exp
2647--- binutils-2.19.orig/ld/testsuite/ld-arm/arm-elf.exp 2008-08-26 04:46:41.000000000 -0700
2648+++ binutils-2.19/ld/testsuite/ld-arm/arm-elf.exp 2009-01-14 01:13:49.000000000 -0800
2649@@ -184,6 +184,7 @@
2650 run_dump_test "group-relocs-ldr-bad"
2651 run_dump_test "group-relocs-ldrs-bad"
2652 run_dump_test "group-relocs-ldc-bad"
2653+run_dump_test "thumb2-bl-undefweak"
2654 run_dump_test "emit-relocs1"
2655
2656 # Exclude non-ARM-EABI targets.
2657diff -Naur binutils-2.19.orig/opcodes/ChangeLog binutils-2.19/opcodes/ChangeLog
2658--- binutils-2.19.orig/opcodes/ChangeLog 2008-10-02 01:07:19.000000000 -0700
2659+++ binutils-2.19/opcodes/ChangeLog 2008-11-27 02:51:53.000000000 -0800
2660@@ -1,3 +1,20 @@
2661+2008-11-27 Alan Modra <amodra@bigpond.net.au>
2662+
2663+ * ppc-opc.c (extract_sprg): Correct operand range check.
2664+
2665+2008-11-26 Andreas Schwab <schwab@suse.de>
2666+
2667+ * m68k-dis.c (NEXTBYTE, NEXTWORD, NEXTLONG, NEXTULONG, NEXTSINGLE)
2668+ (NEXTDOUBLE, NEXTEXTEND, NEXTPACKED): Fix error handling.
2669+ (save_printer, save_print_address): Remove.
2670+ (fetch_data): Don't use them.
2671+ (match_insn_m68k): Always restore printing functions.
2672+ (print_insn_m68k): Don't save/restore printing functions.
2673+
2674+2008-11-25 Nick Clifton <nickc@redhat.com>
2675+
2676+ * m68k-dis.c: Rewrite to remove use of setjmp/longjmp.
2677+
2678 2008-09-29 Nick Clifton <nickc@redhat.com>
2679
2680 * po/vi.po: Updated Vietnamese translation.
2681diff -Naur binutils-2.19.orig/opcodes/m68k-dis.c binutils-2.19/opcodes/m68k-dis.c
2682--- binutils-2.19.orig/opcodes/m68k-dis.c 2007-09-27 04:14:10.000000000 -0700
2683+++ binutils-2.19/opcodes/m68k-dis.c 2008-11-26 02:45:27.000000000 -0800
2684@@ -60,46 +60,103 @@
2685 #endif
2686
2687 /* Get a 1 byte signed integer. */
2688-#define NEXTBYTE(p) (p += 2, FETCH_DATA (info, p), COERCE_SIGNED_CHAR(p[-1]))
2689+#define NEXTBYTE(p, val) \
2690+ do \
2691+ { \
2692+ p += 2; \
2693+ if (!FETCH_DATA (info, p)) \
2694+ return -3; \
2695+ val = COERCE_SIGNED_CHAR (p[-1]); \
2696+ } \
2697+ while (0)
2698
2699 /* Get a 2 byte signed integer. */
2700 #define COERCE16(x) ((int) (((x) ^ 0x8000) - 0x8000))
2701-#define NEXTWORD(p) \
2702- (p += 2, FETCH_DATA (info, p), \
2703- COERCE16 ((p[-2] << 8) + p[-1]))
2704+
2705+#define NEXTWORD(p, val, ret_val) \
2706+ do \
2707+ { \
2708+ p += 2; \
2709+ if (!FETCH_DATA (info, p)) \
2710+ return ret_val; \
2711+ val = COERCE16 ((p[-2] << 8) + p[-1]); \
2712+ } \
2713+ while (0)
2714
2715 /* Get a 4 byte signed integer. */
2716 #define COERCE32(x) ((bfd_signed_vma) ((x) ^ 0x80000000) - 0x80000000)
2717-#define NEXTLONG(p) \
2718- (p += 4, FETCH_DATA (info, p), \
2719- (COERCE32 ((((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1])))
2720+
2721+#define NEXTLONG(p, val, ret_val) \
2722+ do \
2723+ { \
2724+ p += 4; \
2725+ if (!FETCH_DATA (info, p)) \
2726+ return ret_val; \
2727+ val = COERCE32 ((((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1]); \
2728+ } \
2729+ while (0)
2730
2731 /* Get a 4 byte unsigned integer. */
2732-#define NEXTULONG(p) \
2733- (p += 4, FETCH_DATA (info, p), \
2734- (unsigned int) ((((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1]))
2735+#define NEXTULONG(p, val) \
2736+ do \
2737+ { \
2738+ p += 4; \
2739+ if (!FETCH_DATA (info, p)) \
2740+ return -3; \
2741+ val = (unsigned int) ((((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1]); \
2742+ } \
2743+ while (0)
2744
2745 /* Get a single precision float. */
2746-#define NEXTSINGLE(val, p) \
2747- (p += 4, FETCH_DATA (info, p), \
2748- floatformat_to_double (&floatformat_ieee_single_big, (char *) p - 4, &val))
2749+#define NEXTSINGLE(val, p) \
2750+ do \
2751+ { \
2752+ p += 4; \
2753+ if (!FETCH_DATA (info, p)) \
2754+ return -3; \
2755+ floatformat_to_double (& floatformat_ieee_single_big, \
2756+ (char *) p - 4, & val); \
2757+ } \
2758+ while (0)
2759
2760 /* Get a double precision float. */
2761-#define NEXTDOUBLE(val, p) \
2762- (p += 8, FETCH_DATA (info, p), \
2763- floatformat_to_double (&floatformat_ieee_double_big, (char *) p - 8, &val))
2764+#define NEXTDOUBLE(val, p) \
2765+ do \
2766+ { \
2767+ p += 8; \
2768+ if (!FETCH_DATA (info, p)) \
2769+ return -3; \
2770+ floatformat_to_double (& floatformat_ieee_double_big, \
2771+ (char *) p - 8, & val); \
2772+ } \
2773+ while (0)
2774
2775 /* Get an extended precision float. */
2776-#define NEXTEXTEND(val, p) \
2777- (p += 12, FETCH_DATA (info, p), \
2778- floatformat_to_double (&floatformat_m68881_ext, (char *) p - 12, &val))
2779+#define NEXTEXTEND(val, p) \
2780+ do \
2781+ { \
2782+ p += 12; \
2783+ if (!FETCH_DATA (info, p)) \
2784+ return -3; \
2785+ floatformat_to_double (& floatformat_m68881_ext, \
2786+ (char *) p - 12, & val); \
2787+ } \
2788+ while (0)
2789
2790 /* Need a function to convert from packed to double
2791 precision. Actually, it's easier to print a
2792 packed number than a double anyway, so maybe
2793 there should be a special case to handle this... */
2794-#define NEXTPACKED(p) \
2795- (p += 12, FETCH_DATA (info, p), 0.0)
2796+#define NEXTPACKED(p, val) \
2797+ do \
2798+ { \
2799+ p += 12; \
2800+ if (!FETCH_DATA (info, p)) \
2801+ return -3; \
2802+ val = 0.0; \
2803+ } \
2804+ while (0)
2805+
2806
2807
2808 /* Maximum length of an instruction. */
2809 #define MAXLEN 22
2810@@ -112,12 +169,10 @@
2811 bfd_byte *max_fetched;
2812 bfd_byte the_buffer[MAXLEN];
2813 bfd_vma insn_start;
2814- jmp_buf bailout;
2815 };
2816
2817 /* Make sure that bytes from INFO->PRIVATE_DATA->BUFFER (inclusive)
2818- to ADDR (exclusive) are valid. Returns 1 for success, longjmps
2819- on error. */
2820+ to ADDR (exclusive) are valid. Returns 1 for success, 0 on error. */
2821 #define FETCH_DATA(info, addr) \
2822 ((addr) <= ((struct private *) (info->private_data))->max_fetched \
2823 ? 1 : fetch_data ((info), (addr)))
2824@@ -136,7 +191,7 @@
2825 if (status != 0)
2826 {
2827 (*info->memory_error_func) (status, start, info);
2828- longjmp (priv->bailout, 1);
2829+ return 0;
2830 }
2831 else
2832 priv->max_fetched = addr;
2833@@ -161,7 +216,8 @@
2834 /* Fetch BITS bits from a position in the instruction specified by CODE.
2835 CODE is a "place to put an argument", or 'x' for a destination
2836 that is a general address (mode and register).
2837- BUFFER contains the instruction. */
2838+ BUFFER contains the instruction.
2839+ Returns -1 on failure. */
2840
2841 static int
2842 fetch_arg (unsigned char *buffer,
2843@@ -216,64 +272,75 @@
2844 break;
2845
2846 case 'k':
2847- FETCH_DATA (info, buffer + 3);
2848+ if (! FETCH_DATA (info, buffer + 3))
2849+ return -1;
2850 val = (buffer[3] >> 4);
2851 break;
2852
2853 case 'C':
2854- FETCH_DATA (info, buffer + 3);
2855+ if (! FETCH_DATA (info, buffer + 3))
2856+ return -1;
2857 val = buffer[3];
2858 break;
2859
2860 case '1':
2861- FETCH_DATA (info, buffer + 3);
2862+ if (! FETCH_DATA (info, buffer + 3))
2863+ return -1;
2864 val = (buffer[2] << 8) + buffer[3];
2865 val >>= 12;
2866 break;
2867
2868 case '2':
2869- FETCH_DATA (info, buffer + 3);
2870+ if (! FETCH_DATA (info, buffer + 3))
2871+ return -1;
2872 val = (buffer[2] << 8) + buffer[3];
2873 val >>= 6;
2874 break;
2875
2876 case '3':
2877 case 'j':
2878- FETCH_DATA (info, buffer + 3);
2879+ if (! FETCH_DATA (info, buffer + 3))
2880+ return -1;
2881 val = (buffer[2] << 8) + buffer[3];
2882 break;
2883
2884 case '4':
2885- FETCH_DATA (info, buffer + 5);
2886+ if (! FETCH_DATA (info, buffer + 5))
2887+ return -1;
2888 val = (buffer[4] << 8) + buffer[5];
2889 val >>= 12;
2890 break;
2891
2892 case '5':
2893- FETCH_DATA (info, buffer + 5);
2894+ if (! FETCH_DATA (info, buffer + 5))
2895+ return -1;
2896 val = (buffer[4] << 8) + buffer[5];
2897 val >>= 6;
2898 break;
2899
2900 case '6':
2901- FETCH_DATA (info, buffer + 5);
2902+ if (! FETCH_DATA (info, buffer + 5))
2903+ return -1;
2904 val = (buffer[4] << 8) + buffer[5];
2905 break;
2906
2907 case '7':
2908- FETCH_DATA (info, buffer + 3);
2909+ if (! FETCH_DATA (info, buffer + 3))
2910+ return -1;
2911 val = (buffer[2] << 8) + buffer[3];
2912 val >>= 7;
2913 break;
2914
2915 case '8':
2916- FETCH_DATA (info, buffer + 3);
2917+ if (! FETCH_DATA (info, buffer + 3))
2918+ return -1;
2919 val = (buffer[2] << 8) + buffer[3];
2920 val >>= 10;
2921 break;
2922
2923 case '9':
2924- FETCH_DATA (info, buffer + 3);
2925+ if (! FETCH_DATA (info, buffer + 3))
2926+ return -1;
2927 val = (buffer[2] << 8) + buffer[3];
2928 val >>= 5;
2929 break;
2930@@ -283,7 +350,8 @@
2931 break;
2932
2933 case 'E':
2934- FETCH_DATA (info, buffer + 3);
2935+ if (! FETCH_DATA (info, buffer + 3))
2936+ return -1;
2937 val = (buffer[2] >> 1);
2938 break;
2939
2940@@ -450,7 +518,8 @@
2941
2942 /* Print an indexed argument. The base register is BASEREG (-1 for pc).
2943 P points to extension word, in buffer.
2944- ADDR is the nominal core address of that extension word. */
2945+ ADDR is the nominal core address of that extension word.
2946+ Returns NULL upon error. */
2947
2948 static unsigned char *
2949 print_indexed (int basereg,
2950@@ -465,7 +534,7 @@
2951 char buf[40];
2952 char vmabuf[50];
2953
2954- word = NEXTWORD (p);
2955+ NEXTWORD (p, word, NULL);
2956
2957 /* Generate the text for the index register.
2958 Where this will be output is not yet determined. */
2959@@ -503,10 +572,10 @@
2960 switch ((word >> 4) & 3)
2961 {
2962 case 2:
2963- base_disp = NEXTWORD (p);
2964+ NEXTWORD (p, base_disp, NULL);
2965 break;
2966 case 3:
2967- base_disp = NEXTLONG (p);
2968+ NEXTLONG (p, base_disp, NULL);
2969 }
2970 if (basereg == -1)
2971 base_disp += addr;
2972@@ -526,10 +595,10 @@
2973 switch (word & 3)
2974 {
2975 case 2:
2976- outer_disp = NEXTWORD (p);
2977+ NEXTWORD (p, outer_disp, NULL);
2978 break;
2979 case 3:
2980- outer_disp = NEXTLONG (p);
2981+ NEXTLONG (p, outer_disp, NULL);
2982 }
2983
2984 print_base (basereg, base_disp, info);
2985@@ -547,9 +616,18 @@
2986 return p;
2987 }
2988
2989+#define FETCH_ARG(size, val) \
2990+ do \
2991+ { \
2992+ val = fetch_arg (buffer, place, size, info); \
2993+ if (val < 0) \
2994+ return -3; \
2995+ } \
2996+ while (0)
2997+
2998 /* Returns number of bytes "eaten" by the operand, or
2999 return -1 if an invalid operand was found, or -2 if
3000- an opcode tabe error was found.
3001+ an opcode tabe error was found or -3 to simply abort.
3002 ADDR is the pc for this arg to be relative to. */
3003
3004 static int
3005@@ -575,23 +653,21 @@
3006 case 'c': /* Cache identifier. */
3007 {
3008 static char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };
3009- val = fetch_arg (buffer, place, 2, info);
3010- (*info->fprintf_func) (info->stream, cacheFieldName[val]);
3011+ FETCH_ARG (2, val);
3012+ (*info->fprintf_func) (info->stream, cacheFieldName[val]);
3013 break;
3014 }
3015
3016 case 'a': /* Address register indirect only. Cf. case '+'. */
3017 {
3018- (*info->fprintf_func)
3019- (info->stream,
3020- "%s@",
3021- reg_names[fetch_arg (buffer, place, 3, info) + 8]);
3022+ FETCH_ARG (3, val);
3023+ (*info->fprintf_func) (info->stream, "%s@", reg_names[val + 8]);
3024 break;
3025 }
3026
3027 case '_': /* 32-bit absolute address for move16. */
3028 {
3029- uval = NEXTULONG (p);
3030+ NEXTULONG (p, uval);
3031 (*info->print_address_func) (uval, info);
3032 break;
3033 }
3034@@ -643,7 +719,7 @@
3035 /* Fido added these. */
3036 {"%cac", 0xffe}, {"%mbo", 0xfff}};
3037
3038- val = fetch_arg (buffer, place, 12, info);
3039+ FETCH_ARG (12, val);
3040 for (regno = sizeof names / sizeof names[0] - 1; regno >= 0; regno--)
3041 if (names[regno].value == val)
3042 {
3043@@ -656,7 +732,7 @@
3044 break;
3045
3046 case 'Q':
3047- val = fetch_arg (buffer, place, 3, info);
3048+ FETCH_ARG (3, val);
3049 /* 0 means 8, except for the bkpt instruction... */
3050 if (val == 0 && d[1] != 's')
3051 val = 8;
3052@@ -664,7 +740,7 @@
3053 break;
3054
3055 case 'x':
3056- val = fetch_arg (buffer, place, 3, info);
3057+ FETCH_ARG (3, val);
3058 /* 0 means -1. */
3059 if (val == 0)
3060 val = -1;
3061@@ -672,12 +748,12 @@
3062 break;
3063
3064 case 'j':
3065- val = fetch_arg (buffer, place, 3, info);
3066+ FETCH_ARG (3, val);
3067 (*info->fprintf_func) (info->stream, "#%d", val+1);
3068 break;
3069
3070 case 'K':
3071- val = fetch_arg (buffer, place, 9, info);
3072+ FETCH_ARG (9, val);
3073 (*info->fprintf_func) (info->stream, "#%d", val);
3074 break;
3075
3076@@ -685,12 +761,13 @@
3077 if (place == 'h')
3078 {
3079 static char *const scalefactor_name[] = { "<<", ">>" };
3080- val = fetch_arg (buffer, place, 1, info);
3081+
3082+ FETCH_ARG (1, val);
3083 (*info->fprintf_func) (info->stream, scalefactor_name[val]);
3084 }
3085 else
3086 {
3087- val = fetch_arg (buffer, place, 8, info);
3088+ FETCH_ARG (8, val);
3089 if (val & 0x80)
3090 val = val - 0x100;
3091 (*info->fprintf_func) (info->stream, "#%d", val);
3092@@ -698,29 +775,27 @@
3093 break;
3094
3095 case 'T':
3096- val = fetch_arg (buffer, place, 4, info);
3097+ FETCH_ARG (4, val);
3098 (*info->fprintf_func) (info->stream, "#%d", val);
3099 break;
3100
3101 case 'D':
3102- (*info->fprintf_func) (info->stream, "%s",
3103- reg_names[fetch_arg (buffer, place, 3, info)]);
3104+ FETCH_ARG (3, val);
3105+ (*info->fprintf_func) (info->stream, "%s", reg_names[val]);
3106 break;
3107
3108 case 'A':
3109- (*info->fprintf_func)
3110- (info->stream, "%s",
3111- reg_names[fetch_arg (buffer, place, 3, info) + 010]);
3112+ FETCH_ARG (3, val);
3113+ (*info->fprintf_func) (info->stream, "%s", reg_names[val + 010]);
3114 break;
3115
3116 case 'R':
3117- (*info->fprintf_func)
3118- (info->stream, "%s",
3119- reg_names[fetch_arg (buffer, place, 4, info)]);
3120+ FETCH_ARG (4, val);
3121+ (*info->fprintf_func) (info->stream, "%s", reg_names[val]);
3122 break;
3123
3124 case 'r':
3125- regno = fetch_arg (buffer, place, 4, info);
3126+ FETCH_ARG (4, regno);
3127 if (regno > 7)
3128 (*info->fprintf_func) (info->stream, "%s@", reg_names[regno]);
3129 else
3130@@ -728,13 +803,12 @@
3131 break;
3132
3133 case 'F':
3134- (*info->fprintf_func)
3135- (info->stream, "%%fp%d",
3136- fetch_arg (buffer, place, 3, info));
3137+ FETCH_ARG (3, val);
3138+ (*info->fprintf_func) (info->stream, "%%fp%d", val);
3139 break;
3140
3141 case 'O':
3142- val = fetch_arg (buffer, place, 6, info);
3143+ FETCH_ARG (6, val);
3144 if (val & 0x20)
3145 (*info->fprintf_func) (info->stream, "%s", reg_names[val & 7]);
3146 else
3147@@ -742,78 +816,78 @@
3148 break;
3149
3150 case '+':
3151- (*info->fprintf_func)
3152- (info->stream, "%s@+",
3153- reg_names[fetch_arg (buffer, place, 3, info) + 8]);
3154+ FETCH_ARG (3, val);
3155+ (*info->fprintf_func) (info->stream, "%s@+", reg_names[val + 8]);
3156 break;
3157
3158 case '-':
3159- (*info->fprintf_func)
3160- (info->stream, "%s@-",
3161- reg_names[fetch_arg (buffer, place, 3, info) + 8]);
3162+ FETCH_ARG (3, val);
3163+ (*info->fprintf_func) (info->stream, "%s@-", reg_names[val + 8]);
3164 break;
3165
3166 case 'k':
3167 if (place == 'k')
3168- (*info->fprintf_func)
3169- (info->stream, "{%s}",
3170- reg_names[fetch_arg (buffer, place, 3, info)]);
3171+ {
3172+ FETCH_ARG (3, val);
3173+ (*info->fprintf_func) (info->stream, "{%s}", reg_names[val]);
3174+ }
3175 else if (place == 'C')
3176 {
3177- val = fetch_arg (buffer, place, 7, info);
3178+ FETCH_ARG (7, val);
3179 if (val > 63) /* This is a signed constant. */
3180 val -= 128;
3181 (*info->fprintf_func) (info->stream, "{#%d}", val);
3182 }
3183 else
3184- return -2;
3185+ return -1;
3186 break;
3187
3188 case '#':
3189 case '^':
3190 p1 = buffer + (*d == '#' ? 2 : 4);
3191 if (place == 's')
3192- val = fetch_arg (buffer, place, 4, info);
3193+ FETCH_ARG (4, val);
3194 else if (place == 'C')
3195- val = fetch_arg (buffer, place, 7, info);
3196+ FETCH_ARG (7, val);
3197 else if (place == '8')
3198- val = fetch_arg (buffer, place, 3, info);
3199+ FETCH_ARG (3, val);
3200 else if (place == '3')
3201- val = fetch_arg (buffer, place, 8, info);
3202+ FETCH_ARG (8, val);
3203 else if (place == 'b')
3204- val = NEXTBYTE (p1);
3205+ NEXTBYTE (p1, val);
3206 else if (place == 'w' || place == 'W')
3207- val = NEXTWORD (p1);
3208+ NEXTWORD (p1, val, -3);
3209 else if (place == 'l')
3210- val = NEXTLONG (p1);
3211+ NEXTLONG (p1, val, -3);
3212 else
3213 return -2;
3214+
3215 (*info->fprintf_func) (info->stream, "#%d", val);
3216 break;
3217
3218 case 'B':
3219 if (place == 'b')
3220- disp = NEXTBYTE (p);
3221+ NEXTBYTE (p, disp);
3222 else if (place == 'B')
3223 disp = COERCE_SIGNED_CHAR (buffer[1]);
3224 else if (place == 'w' || place == 'W')
3225- disp = NEXTWORD (p);
3226+ NEXTWORD (p, disp, -3);
3227 else if (place == 'l' || place == 'L' || place == 'C')
3228- disp = NEXTLONG (p);
3229+ NEXTLONG (p, disp, -3);
3230 else if (place == 'g')
3231 {
3232- disp = NEXTBYTE (buffer);
3233+ NEXTBYTE (buffer, disp);
3234 if (disp == 0)
3235- disp = NEXTWORD (p);
3236+ NEXTWORD (p, disp, -3);
3237 else if (disp == -1)
3238- disp = NEXTLONG (p);
3239+ NEXTLONG (p, disp, -3);
3240 }
3241 else if (place == 'c')
3242 {
3243 if (buffer[1] & 0x40) /* If bit six is one, long offset. */
3244- disp = NEXTLONG (p);
3245+ NEXTLONG (p, disp, -3);
3246 else
3247- disp = NEXTWORD (p);
3248+ NEXTWORD (p, disp, -3);
3249 }
3250 else
3251 return -2;
3252@@ -822,29 +896,32 @@
3253 break;
3254
3255 case 'd':
3256- val = NEXTWORD (p);
3257- (*info->fprintf_func)
3258- (info->stream, "%s@(%d)",
3259- reg_names[fetch_arg (buffer, place, 3, info) + 8], val);
3260- break;
3261+ {
3262+ int val1;
3263+
3264+ NEXTWORD (p, val, -3);
3265+ FETCH_ARG (3, val1);
3266+ (*info->fprintf_func) (info->stream, "%s@(%d)", reg_names[val1 + 8], val);
3267+ break;
3268+ }
3269
3270 case 's':
3271- (*info->fprintf_func) (info->stream, "%s",
3272- fpcr_names[fetch_arg (buffer, place, 3, info)]);
3273+ FETCH_ARG (3, val);
3274+ (*info->fprintf_func) (info->stream, "%s", fpcr_names[val]);
3275 break;
3276
3277 case 'e':
3278- val = fetch_arg(buffer, place, 2, info);
3279+ FETCH_ARG (2, val);
3280 (*info->fprintf_func) (info->stream, "%%acc%d", val);
3281 break;
3282
3283 case 'g':
3284- val = fetch_arg(buffer, place, 1, info);
3285- (*info->fprintf_func) (info->stream, "%%accext%s", val==0 ? "01" : "23");
3286+ FETCH_ARG (1, val);
3287+ (*info->fprintf_func) (info->stream, "%%accext%s", val == 0 ? "01" : "23");
3288 break;
3289
3290 case 'i':
3291- val = fetch_arg(buffer, place, 2, info);
3292+ FETCH_ARG (2, val);
3293 if (val == 1)
3294 (*info->fprintf_func) (info->stream, "<<");
3295 else if (val == 3)
3296@@ -856,7 +933,8 @@
3297 case 'I':
3298 /* Get coprocessor ID... */
3299 val = fetch_arg (buffer, 'd', 3, info);
3300-
3301+ if (val < 0)
3302+ return -3;
3303 if (val != 1) /* Unusual coprocessor ID? */
3304 (*info->fprintf_func) (info->stream, "(cpid=%d) ", val);
3305 break;
3306@@ -888,10 +966,16 @@
3307 if (place == 'd')
3308 {
3309 val = fetch_arg (buffer, 'x', 6, info);
3310+ if (val < 0)
3311+ return -3;
3312 val = ((val & 7) << 3) + ((val >> 3) & 7);
3313 }
3314 else
3315- val = fetch_arg (buffer, 's', 6, info);
3316+ {
3317+ val = fetch_arg (buffer, 's', 6, info);
3318+ if (val < 0)
3319+ return -3;
3320+ }
3321
3322 /* If the <ea> is invalid for *d, then reject this match. */
3323 if (!m68k_valid_ea (*d, val))
3324@@ -923,29 +1007,31 @@
3325 break;
3326
3327 case 5:
3328- val = NEXTWORD (p);
3329+ NEXTWORD (p, val, -3);
3330 (*info->fprintf_func) (info->stream, "%s@(%d)", regname, val);
3331 break;
3332
3333 case 6:
3334 p = print_indexed (regno, p, addr, info);
3335+ if (p == NULL)
3336+ return -3;
3337 break;
3338
3339 case 7:
3340 switch (val & 7)
3341 {
3342 case 0:
3343- val = NEXTWORD (p);
3344+ NEXTWORD (p, val, -3);
3345 (*info->print_address_func) (val, info);
3346 break;
3347
3348 case 1:
3349- uval = NEXTULONG (p);
3350+ NEXTULONG (p, uval);
3351 (*info->print_address_func) (uval, info);
3352 break;
3353
3354 case 2:
3355- val = NEXTWORD (p);
3356+ NEXTWORD (p, val, -3);
3357 (*info->fprintf_func) (info->stream, "%%pc@(");
3358 (*info->print_address_func) (addr + val, info);
3359 (*info->fprintf_func) (info->stream, ")");
3360@@ -953,6 +1039,8 @@
3361
3362 case 3:
3363 p = print_indexed (-1, p, addr, info);
3364+ if (p == NULL)
3365+ return -3;
3366 break;
3367
3368 case 4:
3369@@ -960,17 +1048,17 @@
3370 switch (place)
3371 {
3372 case 'b':
3373- val = NEXTBYTE (p);
3374+ NEXTBYTE (p, val);
3375 flt_p = 0;
3376 break;
3377
3378 case 'w':
3379- val = NEXTWORD (p);
3380+ NEXTWORD (p, val, -3);
3381 flt_p = 0;
3382 break;
3383
3384 case 'l':
3385- val = NEXTLONG (p);
3386+ NEXTLONG (p, val, -3);
3387 flt_p = 0;
3388 break;
3389
3390@@ -987,7 +1075,7 @@
3391 break;
3392
3393 case 'p':
3394- flval = NEXTPACKED (p);
3395+ NEXTPACKED (p, flval);
3396 break;
3397
3398 default:
3399@@ -1009,7 +1097,7 @@
3400 mask bit and if set, add a '&' to the arg. */
3401 if (place == '/')
3402 {
3403- val = fetch_arg (buffer, place, 1, info);
3404+ FETCH_ARG (1, val);
3405 if (val)
3406 info->fprintf_func (info->stream, "&");
3407 }
3408@@ -1021,7 +1109,7 @@
3409 {
3410 char doneany;
3411 p1 = buffer + 2;
3412- val = NEXTWORD (p1);
3413+ NEXTWORD (p1, val, -3);
3414 /* Move the pointer ahead if this point is farther ahead
3415 than the last. */
3416 p = p1 > p ? p1 : p;
3417@@ -1062,7 +1150,8 @@
3418 {
3419 /* `fmovem' insn. */
3420 char doneany;
3421- val = fetch_arg (buffer, place, 8, info);
3422+
3423+ FETCH_ARG (8, val);
3424 if (val == 0)
3425 {
3426 (*info->fprintf_func) (info->stream, "#0");
3427@@ -1096,10 +1185,9 @@
3428 }
3429 else if (place == '8')
3430 {
3431+ FETCH_ARG (3, val);
3432 /* fmoveml for FP status registers. */
3433- (*info->fprintf_func) (info->stream, "%s",
3434- fpcr_names[fetch_arg (buffer, place, 3,
3435- info)]);
3436+ (*info->fprintf_func) (info->stream, "%s", fpcr_names[val]);
3437 }
3438 else
3439 return -2;
3440@@ -1115,9 +1203,10 @@
3441 case '2':
3442 case '3':
3443 {
3444- int val = fetch_arg (buffer, place, 5, info);
3445+ int val;
3446 char *name = 0;
3447
3448+ FETCH_ARG (5, val);
3449 switch (val)
3450 {
3451 case 2: name = "%tt0"; break;
3452@@ -1152,8 +1241,9 @@
3453
3454 case 'f':
3455 {
3456- int fc = fetch_arg (buffer, place, 5, info);
3457+ int fc;
3458
3459+ FETCH_ARG (5, fc);
3460 if (fc == 1)
3461 (*info->fprintf_func) (info->stream, "%%dfc");
3462 else if (fc == 0)
3463@@ -1170,8 +1260,9 @@
3464
3465 case 't':
3466 {
3467- int level = fetch_arg (buffer, place, 3, info);
3468+ int level;
3469
3470+ FETCH_ARG (3, level);
3471 (*info->fprintf_func) (info->stream, "%d", level);
3472 }
3473 break;
3474@@ -1179,8 +1270,9 @@
3475 case 'u':
3476 {
3477 short is_upper = 0;
3478- int reg = fetch_arg (buffer, place, 5, info);
3479+ int reg;
3480
3481+ FETCH_ARG (5, reg);
3482 if (reg & 0x10)
3483 {
3484 is_upper = 1;
3485@@ -1303,7 +1395,7 @@
3486
3487 if (eaten >= 0)
3488 p += eaten;
3489- else if (eaten == -1)
3490+ else if (eaten == -1 || eaten == -3)
3491 {
3492 info->fprintf_func = save_printer;
3493 info->print_address_func = save_print_address;
3494@@ -1318,7 +1410,7 @@
3495 info->fprintf_func (info->stream,
3496 /* xgettext:c-format */
3497 _("<internal error in opcode table: %s %s>\n"),
3498- best->name, best->args);
3499+ best->name, best->args);
3500 return 2;
3501 }
3502 }
3503@@ -1439,6 +1531,8 @@
3504 if (d[0] == 's' && d[1] == '8')
3505 {
3506 val = fetch_arg (buffer, d[1], 3, info);
3507+ if (val < 0)
3508+ return 0;
3509 if ((val & (val - 1)) != 0)
3510 break;
3511 }
3512@@ -1479,13 +1573,7 @@
3513
3514 bfd_byte *buffer = priv.the_buffer;
3515
3516- /* Save these printing functions in case we need to restore them
3517- later. */
3518- fprintf_ftype save_printer = info->fprintf_func;
3519- void (* save_print_address) (bfd_vma, struct disassemble_info *)
3520- = info->print_address_func;
3521-
3522- info->private_data = (PTR) &priv;
3523+ info->private_data = & priv;
3524 /* Tell objdump to use two bytes per chunk
3525 and six bytes per line for displaying raw data. */
3526 info->bytes_per_chunk = 2;
3527@@ -1494,49 +1582,23 @@
3528 priv.max_fetched = priv.the_buffer;
3529 priv.insn_start = memaddr;
3530
3531- if (setjmp (priv.bailout) != 0)
3532- {
3533- /* longjmp may be called while these printing functions are
3534- temporarily replaced with dummy functions. Restore them
3535- before we leave.
3536-
3537- Admittedly, this save-and-restore operation is somewhat ugly
3538- in that we are exposing the fact that match_insn_m68k
3539- temporarily replaces insn->fprintf_func and
3540- insn->print_address_func. Perhaps, a real fix is to report a
3541- FETCH_DATA failure with a return value of some sort, without
3542- using setjmp/longjmp. A better fix may be to teach the m68k
3543- disassembler do its job without temporarily replacing
3544- insn->fprintf_func and insn->print_address_func, but that's a
3545- task for another day. */
3546- info->fprintf_func = save_printer;
3547- info->print_address_func = save_print_address;
3548-
3549- /* Error return. */
3550- return -1;
3551- }
3552-
3553 arch_mask = bfd_m68k_mach_to_features (info->mach);
3554 if (!arch_mask)
3555 {
3556 /* First try printing an m680x0 instruction. Try printing a Coldfire
3557 one if that fails. */
3558 val = m68k_scan_mask (memaddr, info, m68k_mask);
3559- if (val)
3560- return val;
3561-
3562- val = m68k_scan_mask (memaddr, info, mcf_mask);
3563- if (val)
3564- return val;
3565+ if (val == 0)
3566+ val = m68k_scan_mask (memaddr, info, mcf_mask);
3567 }
3568 else
3569 {
3570 val = m68k_scan_mask (memaddr, info, arch_mask);
3571- if (val)
3572- return val;
3573 }
3574
3575- /* Handle undefined instructions. */
3576- info->fprintf_func (info->stream, "0%o", (buffer[0] << 8) + buffer[1]);
3577- return 2;
3578+ if (val == 0)
3579+ /* Handle undefined instructions. */
3580+ info->fprintf_func (info->stream, "0%o", (buffer[0] << 8) + buffer[1]);
3581+
3582+ return val ? val : 2;
3583 }
3584diff -Naur binutils-2.19.orig/opcodes/ppc-opc.c binutils-2.19/opcodes/ppc-opc.c
3585--- binutils-2.19.orig/opcodes/ppc-opc.c 2008-08-14 06:56:00.000000000 -0700
3586+++ binutils-2.19/opcodes/ppc-opc.c 2008-11-27 02:51:53.000000000 -0800
3587@@ -1281,10 +1281,10 @@
3588
3589 /* mfsprg can use 260..263 and 272..279. mtsprg only uses spr 272..279
3590 If not BOOKE or 405, then both use only 272..275. */
3591- if (val <= 3
3592- || (val < 0x10 && (insn & 0x100) != 0)
3593- || (val - 0x10 > 3
3594- && (dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_403)) == 0))
3595+ if ((val - 0x10 > 3 && (dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_405)) == 0)
3596+ || (val - 0x10 > 7 && (insn & 0x100) != 0)
3597+ || val <= 3
3598+ || (val & 8) != 0)
3599 *invalid = 1;
3600 return val & 7;
3601 }
Note: See TracBrowser for help on using the repository browser.