source: patches/binutils-2.19-branch_update-3.patch@ 7d6d5d8

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 7d6d5d8 was 4594517, checked in by Jim Gifford <clfs@…>, 16 years ago

Updated Binutils Patch to -3.

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