1 diff -rNU3 dist/bfd/ChangeLog dist.nbsd/bfd/ChangeLog
2 --- dist/bfd/ChangeLog Wed Nov 7 11:43:32 2012
3 +++ dist.nbsd/bfd/ChangeLog Wed Nov 7 11:13:53 2012
5 +2011-12-11 John Davis Anglin <dave.anglin@nrc-cnrc.gc.ca>
8 + * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
9 + R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations to
10 + R_PARISC_DPREL21L when not doing a shared link. Likewise convert
11 + R_PARISC_TLS_GD14R, R_PARISC_TLS_LDM14R and R_PARISC_TLS_IE14R to
12 + R_PARISC_DPREL14R. Handle R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L
13 + and R_PARISC_TLS_IE21L with R_PARISC_DLTIND21L.
15 2011-06-27 Tristan Gingold <gingold@adacore.com>
17 * configure.in: Bump version to 2.21.1
18 diff -rNU3 dist/bfd/archive.c dist.nbsd/bfd/archive.c
19 --- dist/bfd/archive.c Wed Nov 7 11:43:32 2012
20 +++ dist.nbsd/bfd/archive.c Wed Nov 7 11:13:53 2012
22 #define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen)
24 #define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
26 +static const char * normalize (bfd *, const char *);
28 #define arch_hdr(bfd) ((struct ar_hdr *) arch_eltdata (bfd)->arch_header)
30 /* True iff NAME designated a BSD 4.4 extended name. */
32 /* Pad to an even boundary...
33 Note that last_file->origin can be odd in the case of
34 BSD-4.4-style element with a long odd size. */
35 - filestart += filestart % 2;
36 + if (!strncmp(arch_hdr (last_file)->ar_name, "#1/", 3))
37 + size += strlen(normalize(last_file, last_file->filename));
38 + filestart += size % 2;
41 return _bfd_get_elt_at_filepos (archive, filestart);
42 @@ -2068,11 +2073,22 @@
43 current = current->archive_next)
45 char buffer[DEFAULT_BUFFERSIZE];
46 - unsigned int remaining = arelt_size (current);
47 + unsigned int saved_size = arelt_size (current);
48 + unsigned int remaining = saved_size;
49 + struct ar_hdr *hdr = arch_hdr (current);
51 /* Write ar header. */
52 if (!_bfd_write_ar_hdr (arch, current))
54 + /* Write filename if it is a 4.4BSD extended file, and add to size. */
55 + if (!strncmp (hdr->ar_name, "#1/", 3))
57 + const char *normal = normalize (current, current->filename);
58 + unsigned int thislen = strlen (normal);
59 + if (bfd_write (normal, 1, thislen, arch) != thislen)
61 + saved_size += thislen;
63 if (bfd_is_thin_archive (arch))
65 if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
66 @@ -2343,11 +2359,11 @@
70 - struct areltdata *ared = arch_eltdata (current);
72 - firstreal += (ared->parsed_size + ared->extra_size
73 - + sizeof (struct ar_hdr));
74 - firstreal += firstreal % 2;
75 + unsigned int size = arelt_size (current);
76 + if (!strncmp(arch_hdr (current)->ar_name, "#1/", 3))
77 + size += strlen(normalize(current, current->filename));
78 + firstreal += size + sizeof (struct ar_hdr);
79 + firstreal += size % 2;
80 current = current->archive_next;
82 while (current != map[count].u.abfd);
83 diff -rNU3 dist/bfd/bfd-in2.h dist.nbsd/bfd/bfd-in2.h
84 --- dist/bfd/bfd-in2.h Wed Nov 7 11:43:32 2012
85 +++ dist.nbsd/bfd/bfd-in2.h Wed Nov 7 11:13:53 2012
86 @@ -5072,6 +5072,11 @@
87 /* This BFD has been created by the linker and doesn't correspond
89 #define BFD_LINKER_CREATED 0x2000
90 + /* This may be set before writing out a BFD to request that it
91 + be written using values for UIDs, GIDs, timestamps, etc. that
92 + will be consistent from run to run. */
93 +#define BFD_DETERMINISTIC_OUTPUT 0x4000
96 /* This may be set before writing out a BFD to request that it
97 be written using values for UIDs, GIDs, timestamps, etc. that
98 diff -rNU3 dist/bfd/coff-alpha.c dist.nbsd/bfd/coff-alpha.c
99 --- dist/bfd/coff-alpha.c Wed Nov 7 11:43:32 2012
100 +++ dist.nbsd/bfd/coff-alpha.c Wed Nov 7 11:13:53 2012
102 case ALPHA_R_OP_STORE:
103 /* The STORE reloc needs the size and offset fields. We store
104 them in the addend. */
106 BFD_ASSERT (intern->r_offset <= 256);
108 rptr->addend = (intern->r_offset << 8) + intern->r_size;
111 diff -rNU3 dist/bfd/config.bfd dist.nbsd/bfd/config.bfd
112 --- dist/bfd/config.bfd Wed Nov 7 11:43:32 2012
113 +++ dist.nbsd/bfd/config.bfd Wed Nov 7 11:13:53 2012
114 @@ -218,15 +218,15 @@
117 targ_defvec=bfd_elf32_bigarm_vec
118 - targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec"
119 + targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec"
122 targ_defvec=bfd_elf32_littlearm_vec
123 - targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec"
124 + targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec"
126 arm-*-netbsd* | arm-*-openbsd*)
127 targ_defvec=armnetbsd_vec
128 - targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
129 + targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec armcoff_little_vec armcoff_big_vec"
131 targ_cflags=-D__QNXTARGET__
134 # targ_selvecs=m68kmach3_vec
135 # targ_cflags=-DSTAT_FOR_EXEC
139 targ_defvec=m68k4knetbsd_vec
140 - targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
141 + targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec bfd_elf32_m68k_vec"
146 targ_defvec=ecoff_big_vec
147 targ_selvecs=ecoff_little_vec
150 + mips64*el-*-netbsd*)
151 + targ_defvec=bfd_elf32_ntradlittlemips_vec
152 + targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec"
155 + targ_defvec=bfd_elf32_ntradbigmips_vec
156 + targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec"
160 targ_defvec=bfd_elf32_tradlittlemips_vec
161 targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec"
162 @@ -1288,6 +1298,8 @@
169 targ_defvec=bfd_elf32_shlnbsd_vec
170 targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
171 @@ -1298,8 +1310,6 @@
172 targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
178 targ_defvec=bfd_elf32_shnbsd_vec
179 targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
180 @@ -1389,11 +1399,11 @@
183 targ_defvec=bfd_elf32_sparc_vec
184 - targ_selvecs=sparcnetbsd_vec
185 + targ_selvecs="sparcnetbsd_vec sunos_big_vec"
187 - sparc-*-netbsdaout* | sparc-*-netbsd*)
189 targ_defvec=sparcnetbsd_vec
190 - targ_selvecs=bfd_elf32_sparc_vec
191 + targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
194 sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1])
195 @@ -1440,6 +1450,10 @@
196 targ_defvec=bfd_elf64_sparc_vec
197 targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
201 + targ_defvec=bfd_elf64_sparc_vec
202 + targ_selvecs="bfd_elf32_sparc_vec sparcnetbsd_vec sunos_big_vec"
204 sparc64-*-elf* | sparc64-*-rtems* )
205 targ_defvec=bfd_elf64_sparc_vec
206 diff -rNU3 dist/bfd/configure dist.nbsd/bfd/configure
207 --- dist/bfd/configure Wed Nov 7 11:43:32 2012
208 +++ dist.nbsd/bfd/configure Wed Nov 7 11:13:54 2012
209 @@ -12109,10 +12109,10 @@
210 withval=$with_pkgversion; case "$withval" in
211 yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
213 - *) PKGVERSION="($withval) " ;;
214 + *) PKGVERSION="($withval)\ " ;;
217 - PKGVERSION="(GNU Binutils) "
218 + PKGVERSION="(GNU Binutils)\ "
222 @@ -13850,6 +13850,7 @@
223 COREFILE=netbsd-core.lo
225 arm-*-riscix) COREFILE=trad-core.lo ;;
226 + arm*-*-netbsd*) COREFILE=netbsd-core.lo ;;
227 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
228 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
229 hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
230 @@ -13912,7 +13913,7 @@
231 COREFILE=trad-core.lo
232 TRAD_HEADER='"hosts/i860mach3.h"'
234 - mips-*-netbsd* | mips*-*-openbsd*)
235 + mips*-*-netbsd* | mips*-*-openbsd*)
236 COREFILE=netbsd-core.lo
239 diff -rNU3 dist/bfd/configure.host dist.nbsd/bfd/configure.host
240 --- dist/bfd/configure.host Wed Nov 7 11:43:32 2012
241 +++ dist.nbsd/bfd/configure.host Wed Nov 7 11:13:53 2012
244 m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;;
246 +sparc64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;;
248 +x86_64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;;
250 +*-*-aix*) HOST_64BIT_TYPE="long long"
251 + HOST_U_64BIT_TYPE="unsigned long long"
254 +*-*-solaris*) HOST_64BIT_TYPE="long long"
255 + HOST_U_64BIT_TYPE="unsigned long long"
258 # Some Solaris systems (osol0906 at least) have a libc that doesn't recognise
259 # the "MS-ANSI" code page name, so we define an override for CP_ACP (sets the
260 # default code page used by windres/windmc when not specified by a commandline
261 diff -rNU3 dist/bfd/configure.in dist.nbsd/bfd/configure.in
262 --- dist/bfd/configure.in Wed Nov 7 11:43:32 2012
263 +++ dist.nbsd/bfd/configure.in Wed Nov 7 11:13:53 2012
265 COREFILE=netbsd-core.lo
267 arm-*-riscix) COREFILE=trad-core.lo ;;
268 + arm*-*-netbsd*) COREFILE=netbsd-core.lo ;;
269 hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
270 hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
271 hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
273 COREFILE=trad-core.lo
274 TRAD_HEADER='"hosts/i860mach3.h"'
276 - mips-*-netbsd* | mips*-*-openbsd*)
277 + mips*-*-netbsd* | mips*-*-openbsd*)
278 COREFILE=netbsd-core.lo
281 diff -rNU3 dist/bfd/doc/Makefile.in dist.nbsd/bfd/doc/Makefile.in
282 --- dist/bfd/doc/Makefile.in Wed Nov 7 11:43:32 2012
283 +++ dist.nbsd/bfd/doc/Makefile.in Wed Nov 7 11:13:53 2012
288 -bfd.info: bfd.texinfo $(bfd_TEXINFOS)
290 + @echo "NOT REBUILDING $@"
291 +NetBSD_DISABLED_bfd.info: bfd.texinfo $(bfd_TEXINFOS)
292 restore=: && backupdir="$(am__leading_dot)am$$$$" && \
293 rm -rf $$backupdir && mkdir $$backupdir && \
294 if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
295 diff -rNU3 dist/bfd/doc/bfdver.texi dist.nbsd/bfd/doc/bfdver.texi
296 --- dist/bfd/doc/bfdver.texi Wed Nov 7 11:43:32 2012
297 +++ dist.nbsd/bfd/doc/bfdver.texi Wed Nov 7 11:13:53 2012
300 -@set VERSION_PACKAGE (GNU Binutils)
301 -@set UPDATED June 2011
302 +@set VERSION_PACKAGE (GNU Binutils)\
303 +@set UPDATED September 2011
304 @set BUGURL @uref{http://www.sourceware.org/bugzilla/}
305 diff -rNU3 dist/bfd/doc/reloc.texi dist.nbsd/bfd/doc/reloc.texi
306 --- dist/bfd/doc/reloc.texi Wed Nov 7 11:43:32 2012
307 +++ dist.nbsd/bfd/doc/reloc.texi Wed Nov 7 11:13:53 2012
309 @deffnx {} BFD_RELOC_68K_TLS_LE8
310 Relocations used by 68K ELF.
312 +@deffn {} BFD_RELOC_VAX_GLOB_DAT
313 +@deffnx {} BFD_RELOC_VAX_GLOB_REF
314 +@deffnx {} BFD_RELOC_VAX_JMP_SLOT
315 +@deffnx {} BFD_RELOC_VAX_RELATIVE
316 +Relocations used by VAX ELF.
318 @deffn {} BFD_RELOC_32_BASEREL
319 @deffnx {} BFD_RELOC_16_BASEREL
320 @deffnx {} BFD_RELOC_LO16_BASEREL
321 diff -rNU3 dist/bfd/elf.c dist.nbsd/bfd/elf.c
322 --- dist/bfd/elf.c Wed Nov 7 11:43:32 2012
323 +++ dist.nbsd/bfd/elf.c Wed Nov 7 11:13:53 2012
324 @@ -8502,6 +8502,23 @@
328 + /* On SuperH, PT_GETREGS == mach+3 and PT_GETFPREGS == mach+5.
329 + There's also old PT___GETREGS40 == mach + 1 for old reg
330 + structure which lacks GBR. */
333 + switch (note->type)
335 + case NT_NETBSDCORE_FIRSTMACH+3:
336 + return elfcore_make_note_pseudosection (abfd, ".reg", note);
338 + case NT_NETBSDCORE_FIRSTMACH+5:
339 + return elfcore_make_note_pseudosection (abfd, ".reg2", note);
345 /* On all other arch's, PT_GETREGS == mach+1 and
346 PT_GETFPREGS == mach+3. */
348 diff -rNU3 dist/bfd/elf32-arm.c dist.nbsd/bfd/elf32-arm.c
349 --- dist/bfd/elf32-arm.c Wed Nov 7 11:43:32 2012
350 +++ dist.nbsd/bfd/elf32-arm.c Wed Nov 7 11:13:53 2012
351 @@ -11783,6 +11783,10 @@
353 struct bfd_link_info *info = (struct bfd_link_info *) inf;
355 + if (info->warn_shared_textrel)
356 + (*_bfd_error_handler)
357 + (_("warning: dynamic relocation in readonly section `%s'"),
358 + h->root.root.string);
359 info->flags |= DF_TEXTREL;
361 /* Not an error, just cut short the traversal. */
362 diff -rNU3 dist/bfd/elf32-hppa.c dist.nbsd/bfd/elf32-hppa.c
363 --- dist/bfd/elf32-hppa.c Wed Nov 7 11:43:32 2012
364 +++ dist.nbsd/bfd/elf32-hppa.c Wed Nov 7 11:13:53 2012
365 @@ -2201,6 +2201,10 @@
367 struct bfd_link_info *info = inf;
369 + if (info->warn_shared_textrel)
370 + (*_bfd_error_handler)
371 + (_("warning: dynamic relocation in readonly section `%s'"),
372 + eh->root.root.string);
373 info->flags |= DF_TEXTREL;
375 /* Not an error, just cut short the traversal. */
376 @@ -3352,10 +3356,16 @@
379 case R_PARISC_DLTIND21L:
380 + case R_PARISC_TLS_GD21L:
381 + case R_PARISC_TLS_LDM21L:
382 + case R_PARISC_TLS_IE21L:
383 r_type = R_PARISC_DPREL21L;
386 case R_PARISC_DLTIND14R:
387 + case R_PARISC_TLS_GD14R:
388 + case R_PARISC_TLS_LDM14R:
389 + case R_PARISC_TLS_IE14R:
390 r_type = R_PARISC_DPREL14R;
393 @@ -3421,53 +3431,48 @@
394 case R_PARISC_DPREL21L:
395 case R_PARISC_DPREL14R:
396 case R_PARISC_DPREL14F:
397 - case R_PARISC_TLS_GD21L:
398 - case R_PARISC_TLS_LDM21L:
399 - case R_PARISC_TLS_IE21L:
400 /* Convert instructions that use the linkage table pointer (r19) to
401 instructions that use the global data pointer (dp). This is the
402 most efficient way of using PIC code in an incomplete executable,
403 but the user must follow the standard runtime conventions for
404 accessing data for this to work. */
405 - if (orig_r_type == R_PARISC_DLTIND21L
407 - && (r_type == R_PARISC_TLS_GD21L
408 - || r_type == R_PARISC_TLS_LDM21L
409 - || r_type == R_PARISC_TLS_IE21L)))
410 + if (orig_r_type != r_type)
412 - /* Convert addil instructions if the original reloc was a
413 - DLTIND21L. GCC sometimes uses a register other than r19 for
414 - the operation, so we must convert any addil instruction
415 - that uses this relocation. */
416 - if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26))
419 - /* We must have a ldil instruction. It's too hard to find
420 - and convert the associated add instruction, so issue an
422 - (*_bfd_error_handler)
423 - (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
429 + if (r_type == R_PARISC_DPREL21L)
431 + /* GCC sometimes uses a register other than r19 for the
432 + operation, so we must convert any addil instruction
433 + that uses this relocation. */
434 + if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26))
437 + /* We must have a ldil instruction. It's too hard to find
438 + and convert the associated add instruction, so issue an
440 + (*_bfd_error_handler)
441 + (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
448 + else if (r_type == R_PARISC_DPREL14F)
450 + /* This must be a format 1 load/store. Change the base
452 + insn = (insn & 0xfc1ffff) | (27 << 21);
455 - else if (orig_r_type == R_PARISC_DLTIND14F)
457 - /* This must be a format 1 load/store. Change the base
459 - insn = (insn & 0xfc1ffff) | (27 << 21);
462 - /* For all the DP relative relocations, we need to examine the symbol's
463 - section. If it has no section or if it's a code section, then
464 - "data pointer relative" makes no sense. In that case we don't
465 - adjust the "value", and for 21 bit addil instructions, we change the
466 - source addend register from %dp to %r0. This situation commonly
467 - arises for undefined weak symbols and when a variable's "constness"
468 - is declared differently from the way the variable is defined. For
469 - instance: "extern int foo" with foo defined as "const int foo". */
470 + /* For all the DP relative relocations, we need to examine the symbol's
471 + section. If it has no section or if it's a code section, then
472 + "data pointer relative" makes no sense. In that case we don't
473 + adjust the "value", and for 21 bit addil instructions, we change the
474 + source addend register from %dp to %r0. This situation commonly
475 + arises for undefined weak symbols and when a variable's "constness"
476 + is declared differently from the way the variable is defined. For
477 + instance: "extern int foo" with foo defined as "const int foo". */
478 if (sym_sec == NULL || (sym_sec->flags & SEC_CODE) != 0)
480 if ((insn & ((0x3f << 26) | (0x1f << 21)))
481 @@ -3484,6 +3489,9 @@
482 case R_PARISC_DLTIND21L:
483 case R_PARISC_DLTIND14R:
484 case R_PARISC_DLTIND14F:
485 + case R_PARISC_TLS_GD21L:
486 + case R_PARISC_TLS_LDM21L:
487 + case R_PARISC_TLS_IE21L:
488 case R_PARISC_TLS_GD14R:
489 case R_PARISC_TLS_LDM14R:
490 case R_PARISC_TLS_IE14R:
491 diff -rNU3 dist/bfd/elf32-i386.c dist.nbsd/bfd/elf32-i386.c
492 --- dist/bfd/elf32-i386.c Wed Nov 7 11:43:32 2012
493 +++ dist.nbsd/bfd/elf32-i386.c Wed Nov 7 11:13:53 2012
495 /* The name of the dynamic interpreter. This is put in the .interp
498 -#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
499 +#define ELF_DYNAMIC_INTERPRETER "/libexec/ld.elf_so"
501 /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
502 copying dynamic variables from a shared lib into an app's dynbss
503 @@ -2391,7 +2391,10 @@
504 if (s != NULL && (s->flags & SEC_READONLY) != 0)
506 struct bfd_link_info *info = (struct bfd_link_info *) inf;
508 + if (info->warn_shared_textrel)
509 + (*_bfd_error_handler)
510 + (_("warning: dynamic relocation in readonly section `%s'"),
511 + h->root.root.string);
512 info->flags |= DF_TEXTREL;
514 /* Not an error, just cut short the traversal. */
515 diff -rNU3 dist/bfd/elf32-m68k.c dist.nbsd/bfd/elf32-m68k.c
516 --- dist/bfd/elf32-m68k.c Wed Nov 7 11:43:32 2012
517 +++ dist.nbsd/bfd/elf32-m68k.c Wed Nov 7 11:13:54 2012
518 @@ -2567,7 +2567,7 @@
519 if (ind->got_entry_key != 0)
521 BFD_ASSERT (dir->got_entry_key == 0);
522 - /* Assert that GOTs aren't partioned yet. */
523 + /* Assert that GOTs aren't partitioned yet. */
524 BFD_ASSERT (ind->glist == NULL);
526 dir->got_entry_key = ind->got_entry_key;
527 diff -rNU3 dist/bfd/elf32-ppc.c dist.nbsd/bfd/elf32-ppc.c
528 --- dist/bfd/elf32-ppc.c Wed Nov 7 11:43:32 2012
529 +++ dist.nbsd/bfd/elf32-ppc.c Wed Nov 7 11:13:53 2012
530 @@ -3506,7 +3506,7 @@
531 sec->has_tls_get_addr_call = 1;
535 + switch ((int)r_type)
539 @@ -7219,7 +7219,7 @@
541 if (r_type < R_PPC_max)
542 howto = ppc_elf_howto_table[r_type];
544 + switch ((int)r_type)
547 (*_bfd_error_handler)
548 diff -rNU3 dist/bfd/elf32-sh.c dist.nbsd/bfd/elf32-sh.c
549 --- dist/bfd/elf32-sh.c Wed Nov 7 11:43:32 2012
550 +++ dist.nbsd/bfd/elf32-sh.c Wed Nov 7 11:13:53 2012
551 @@ -3333,6 +3333,10 @@
553 struct bfd_link_info *info = (struct bfd_link_info *) inf;
555 + if (info->warn_shared_textrel)
556 + (*_bfd_error_handler)
557 + (_("warning: dynamic relocation in readonly section `%s'"),
558 + h->root.root.string);
559 info->flags |= DF_TEXTREL;
561 /* Not an error, just cut short the traversal. */
562 diff -rNU3 dist/bfd/elf32-vax.c dist.nbsd/bfd/elf32-vax.c
563 --- dist/bfd/elf32-vax.c Wed Nov 7 11:43:32 2012
564 +++ dist.nbsd/bfd/elf32-vax.c Wed Nov 7 11:13:54 2012
567 static bfd_boolean elf32_vax_set_private_flags (bfd *, flagword);
568 static bfd_boolean elf32_vax_merge_private_bfd_data (bfd *, bfd *);
569 -static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, PTR);
570 +static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, void *);
572 static reloc_howto_type howto_table[] = {
573 HOWTO (R_VAX_NONE, /* type */
575 #define elf_vax_link_hash_traverse(table, func, info) \
576 (elf_link_hash_traverse \
578 - (bfd_boolean (*) (struct elf_link_hash_entry *, PTR)) (func), \
579 + (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
582 /* Create an entry in an VAX ELF linker hash table. */
587 +/* Copy vax-specific data from one module to another */
589 +elf32_vax_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
593 + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
594 + || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
597 + in_flags = elf_elfheader (ibfd)->e_flags;
599 + elf_elfheader (obfd)->e_flags = in_flags;
600 + elf_flags_init (obfd) = TRUE;
605 /* Merge backend specific data from an object file to the output
606 object file when linking. */
610 /* Display the flags field */
612 -elf32_vax_print_private_bfd_data (bfd *abfd, PTR ptr)
613 +elf32_vax_print_private_bfd_data (bfd *abfd, void * ptr)
615 FILE *file = (FILE *) ptr;
617 @@ -622,14 +640,13 @@
618 srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
621 + flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
622 + | SEC_IN_MEMORY | SEC_LINKER_CREATED
625 srelgot = bfd_make_section_with_flags (dynobj,
631 - | SEC_LINKER_CREATED
635 || !bfd_set_section_alignment (dynobj, srelgot, 2))
640 if (sec->flags & SEC_READONLY)
641 - info->flags |= DF_TEXTREL;
643 + if (info->warn_shared_textrel)
644 + (*_bfd_error_handler)
645 + (_("warning: dynamic relocation in readonly section `%s'"),
647 + info->flags |= DF_TEXTREL;
651 sreloc->size += sizeof (Elf32_External_Rela);
652 @@ -933,39 +956,21 @@
653 if (h->type == STT_FUNC
659 - /* We must always create the plt entry if it was referenced
660 - by a PLTxxO relocation. In this case we already recorded
661 - it as a dynamic symbol. */
662 - && h->dynindx == -1)
663 + if (h->plt.refcount <= 0
664 + || SYMBOL_CALLS_LOCAL (info, h)
665 + || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
666 + && h->root.type == bfd_link_hash_undefweak))
668 /* This case can occur if we saw a PLTxx reloc in an input
669 file, but the symbol was never referred to by a dynamic
670 - object. In such a case, we don't actually need to build
671 - a procedure linkage table, and we can just do a PCxx
673 - BFD_ASSERT (h->needs_plt);
674 + object, or if all references were garbage collected. In
675 + such a case, we don't actually need to build a procedure
676 + linkage table, and we can just do a PCxx reloc instead. */
677 h->plt.offset = (bfd_vma) -1;
681 - /* GC may have rendered this entry unused. */
682 - if (h->plt.refcount <= 0)
685 - h->plt.offset = (bfd_vma) -1;
689 - /* Make sure this symbol is output as a dynamic symbol. */
690 - if (h->dynindx == -1)
692 - if (! bfd_elf_link_record_dynamic_symbol (info, h))
696 s = bfd_get_section_by_name (dynobj, ".plt");
697 BFD_ASSERT (s != NULL);
699 @@ -1035,13 +1040,6 @@
705 - (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
706 - h->root.root.string);
710 /* We must allocate the symbol in our .dynbss section, which will
711 become part of the .bss section of the executable. There will be
712 an entry for this symbol in the .dynsym section. The dynamic
713 @@ -1059,7 +1057,7 @@
714 copy the initial value out of the dynamic object and into the
715 runtime process image. We need to remember the offset into the
716 .rela.bss section we are going to use. */
717 - if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
718 + if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
722 @@ -1129,7 +1127,7 @@
723 instantiate (allocate space for them). */
724 elf_link_hash_traverse (elf_hash_table (info),
725 elf_vax_instantiate_got_entries,
729 /* The check_relocs and adjust_dynamic_symbol entry points have
730 determined the sizes of the various dynamic sections. Allocate
731 @@ -1211,7 +1209,12 @@
734 /* Allocate memory for the section contents. */
735 - s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
736 + /* FIXME: This should be a call to bfd_alloc not bfd_zalloc.
737 + Unused entries should be reclaimed before the section's contents
738 + are written out, but at the moment this does not happen. Thus in
739 + order to prevent writing out garbage, we initialise the section's
740 + contents to zero. */
741 + s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
742 if (s->contents == NULL)
745 @@ -1268,7 +1271,7 @@
748 elf_vax_discard_copies (struct elf_vax_link_hash_entry *h,
749 - PTR ignore ATTRIBUTE_UNUSED)
750 + void * ignore ATTRIBUTE_UNUSED)
752 struct elf_vax_pcrel_relocs_copied *s;
754 @@ -1659,9 +1662,9 @@
757 outrel.r_info = ELF32_R_INFO (0, R_VAX_RELATIVE);
758 - BFD_ASSERT (bfd_get_signed_32 (input_bfd,
759 - &contents[rel->r_offset]) == 0);
760 - outrel.r_addend = relocation + rel->r_addend;
761 + outrel.r_addend = bfd_get_signed_32(input_bfd,
762 + &contents[rel->r_offset])
763 + + relocation + rel->r_addend;
767 @@ -1700,14 +1703,15 @@
771 - if (!strcmp (bfd_get_section_name (input_bfd, input_section),
774 - && ELF32_R_TYPE(outrel.r_info) != R_VAX_32
775 - && ELF32_R_TYPE(outrel.r_info) != R_VAX_RELATIVE
776 - && ELF32_R_TYPE(outrel.r_info) != R_VAX_COPY
777 - && ELF32_R_TYPE(outrel.r_info) != R_VAX_JMP_SLOT
778 - && ELF32_R_TYPE(outrel.r_info) != R_VAX_GLOB_DAT))
779 + if (input_section->flags & SEC_READONLY)
780 + info->flags |= DF_TEXTREL;
782 + if ((input_section->flags & SEC_READONLY) != 0
783 + || (ELF32_R_TYPE (outrel.r_info) != R_VAX_32
784 + && ELF32_R_TYPE (outrel.r_info) != R_VAX_RELATIVE
785 + && ELF32_R_TYPE (outrel.r_info) != R_VAX_COPY
786 + && ELF32_R_TYPE (outrel.r_info) != R_VAX_JMP_SLOT
787 + && ELF32_R_TYPE (outrel.r_info) != R_VAX_GLOB_DAT))
790 (*_bfd_error_handler)
791 @@ -2082,12 +2086,15 @@
792 #define TARGET_LITTLE_SYM bfd_elf32_vax_vec
793 #define TARGET_LITTLE_NAME "elf32-vax"
794 #define ELF_MACHINE_CODE EM_VAX
795 -#define ELF_MAXPAGESIZE 0x1000
796 +#define ELF_MAXPAGESIZE 0x10000
798 #define elf_backend_create_dynamic_sections \
799 _bfd_elf_create_dynamic_sections
800 #define bfd_elf32_bfd_link_hash_table_create \
801 elf_vax_link_hash_table_create
802 +#define bfd_elf32_bfd_copy_private_bfd_data \
803 + elf32_vax_copy_private_bfd_data
805 #define bfd_elf32_bfd_final_link bfd_elf_gc_common_final_link
807 #define elf_backend_check_relocs elf_vax_check_relocs
808 diff -rNU3 dist/bfd/elf64-alpha.c dist.nbsd/bfd/elf64-alpha.c
809 --- dist/bfd/elf64-alpha.c Wed Nov 7 11:43:32 2012
810 +++ dist.nbsd/bfd/elf64-alpha.c Wed Nov 7 11:13:53 2012
812 #define PLT_ENTRY_SIZE \
813 (elf64_alpha_use_secureplt ? NEW_PLT_ENTRY_SIZE : OLD_PLT_ENTRY_SIZE)
815 +/* ld --traditional-format uses this older format instead. */
816 +#define OLD_PLT_ENTRY_WORD1 0x279f0000 /* ldah $28, 0($31) */
817 +#define OLD_PLT_ENTRY_WORD2 0x239c0000 /* lda $28, 0($28) */
818 +#define OLD_PLT_ENTRY_WORD3 0xc3e00000 /* br $31, plt0 */
820 #define MAX_GOT_SIZE (64*1024)
822 #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
823 @@ -4726,6 +4731,32 @@
825 plt_index = ((gotent->plt_offset - NEW_PLT_HEADER_SIZE)
826 / NEW_PLT_ENTRY_SIZE);
828 + else if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
832 + /* decompose the reloc offset for the plt for ldah+lda */
833 + hi = plt_index * sizeof(Elf64_External_Rela);
834 + lo = ((hi & 0xffff) ^ 0x8000) - 0x8000;
835 + hi = (hi - lo) >> 16;
837 + insn = INSN_ABO (INSN_LDAH, 28, 31, hi);
838 + bfd_put_32 (output_bfd, insn,
839 + splt->contents + gotent->plt_offset);
841 + insn = INSN_ABO (INSN_LDA, 28, 28, lo);
842 + bfd_put_32 (output_bfd, insn,
843 + splt->contents + gotent->plt_offset + 4);
845 + disp = -(gotent->plt_offset + 12);
846 + insn = INSN_AD (INSN_BR, 31, disp);
848 + bfd_put_32 (output_bfd, insn,
849 + splt->contents + gotent->plt_offset + 8);
851 + plt_index = ((gotent->plt_offset - OLD_PLT_HEADER_SIZE)
852 + / OLD_PLT_ENTRY_SIZE);
856 diff -rNU3 dist/bfd/elf64-mips.c dist.nbsd/bfd/elf64-mips.c
857 --- dist/bfd/elf64-mips.c Wed Nov 7 11:43:32 2012
858 +++ dist.nbsd/bfd/elf64-mips.c Wed Nov 7 11:13:54 2012
860 (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *);
861 static bfd_boolean mips_elf64_object_p
863 +static bfd_boolean mips_elf64_is_local_label_name
864 + (bfd *, const char *);
865 static irix_compat_t elf64_mips_irix_compat
867 static bfd_boolean elf64_mips_grok_prstatus
868 @@ -3052,7 +3054,18 @@
869 bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach);
873 +/* MIPS ELF local labels start with "$L". */
875 +mips_elf64_is_local_label_name (bfd *abfd, const char *name)
877 + if (name[0] == '$' && name[1] == 'L')
880 + /* We accept the generic ELF local label syntax as well. */
881 + return _bfd_elf_is_local_label_name (abfd, name);
884 /* Depending on the target vector we generate some version of Irix
885 executables or "normal" MIPS ELF ABI executables. */
887 @@ -3276,9 +3289,8 @@
889 #define elf_backend_write_section _bfd_mips_elf_write_section
891 -/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit
892 - MIPS-specific function only applies to IRIX5, which had no 64-bit
894 +#define bfd_elf64_bfd_is_local_label_name \
895 + mips_elf64_is_local_label_name
896 #define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line
897 #define bfd_elf64_find_inliner_info _bfd_mips_elf_find_inliner_info
898 #define bfd_elf64_new_section_hook _bfd_mips_elf_new_section_hook
899 diff -rNU3 dist/bfd/elf64-ppc.c dist.nbsd/bfd/elf64-ppc.c
900 --- dist/bfd/elf64-ppc.c Wed Nov 7 11:43:32 2012
901 +++ dist.nbsd/bfd/elf64-ppc.c Wed Nov 7 11:13:53 2012
902 @@ -8877,6 +8877,10 @@
904 struct bfd_link_info *info = inf;
906 + if (info->warn_shared_textrel)
907 + (*_bfd_error_handler)
908 + (_("warning: dynamic relocation in readonly section `%s'"),
909 + h->root.root.string);
910 info->flags |= DF_TEXTREL;
912 /* Not an error, just cut short the traversal. */
913 diff -rNU3 dist/bfd/elf64-x86-64.c dist.nbsd/bfd/elf64-x86-64.c
914 --- dist/bfd/elf64-x86-64.c Wed Nov 7 11:43:32 2012
915 +++ dist.nbsd/bfd/elf64-x86-64.c Wed Nov 7 11:13:53 2012
916 @@ -2196,6 +2196,10 @@
918 struct bfd_link_info *info = (struct bfd_link_info *) inf;
920 + if (info->warn_shared_textrel)
921 + (*_bfd_error_handler)
922 + (_("warning: dynamic relocation in readonly section `%s'"),
923 + h->root.root.string);
924 info->flags |= DF_TEXTREL;
926 /* Not an error, just cut short the traversal. */
927 diff -rNU3 dist/bfd/elflink.c dist.nbsd/bfd/elflink.c
928 --- dist/bfd/elflink.c Wed Nov 7 11:43:32 2012
929 +++ dist.nbsd/bfd/elflink.c Wed Nov 7 11:13:53 2012
930 @@ -10047,7 +10047,14 @@
931 if (bed->s->arch_size == 32)
932 irel[0].r_info = ELF32_R_INFO (indx, howto->type);
934 - irel[0].r_info = ELF64_R_INFO (indx, howto->type);
937 + bfd_uint64_t indx64 = indx;
938 + irel[0].r_info = ELF64_R_INFO (indx64, howto->type);
944 rel_hdr = reldata->hdr;
945 erel = rel_hdr->contents;
946 diff -rNU3 dist/bfd/elfn32-mips.c dist.nbsd/bfd/elfn32-mips.c
947 --- dist/bfd/elfn32-mips.c Wed Nov 7 11:43:32 2012
948 +++ dist.nbsd/bfd/elfn32-mips.c Wed Nov 7 11:13:53 2012
950 (bfd *, Elf_Internal_Note *);
951 static bfd_boolean elf32_mips_grok_psinfo
952 (bfd *, Elf_Internal_Note *);
953 +static bfd_boolean mips_elf_n32_is_local_label_name
954 + (bfd *, const char *);
955 static irix_compat_t elf_n32_mips_irix_compat
958 @@ -2376,6 +2378,17 @@
962 +/* MIPS ELF local labels start with "$L". */
964 +mips_elf_n32_is_local_label_name (bfd *abfd, const char *name)
966 + if (name[0] == '$' && name[1] == 'L')
969 + /* We accept the generic ELF local label syntax as well. */
970 + return _bfd_elf_is_local_label_name (abfd, name);
973 /* Depending on the target vector we generate some version of Irix
974 executables or "normal" MIPS ELF ABI executables. */
976 @@ -2499,6 +2512,8 @@
977 #define elf_backend_write_section _bfd_mips_elf_write_section
978 #define elf_backend_mips_irix_compat elf_n32_mips_irix_compat
979 #define elf_backend_mips_rtype_to_howto mips_elf_n32_rtype_to_howto
980 +#define bfd_elf32_bfd_is_local_label_name \
981 + mips_elf_n32_is_local_label_name
982 #define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
983 #define bfd_elf32_find_inliner_info _bfd_mips_elf_find_inliner_info
984 #define bfd_elf32_new_section_hook _bfd_mips_elf_new_section_hook
985 diff -rNU3 dist/bfd/elfxx-mips.c dist.nbsd/bfd/elfxx-mips.c
986 --- dist/bfd/elfxx-mips.c Wed Nov 7 11:43:32 2012
987 +++ dist.nbsd/bfd/elfxx-mips.c Wed Nov 7 11:13:53 2012
988 @@ -5138,7 +5138,10 @@
989 || ((r_type == R_MIPS_26 || r_type == R_MIPS_JALR)
990 && target_is_16_bit_code_p));
992 - local_p = h == NULL || SYMBOL_REFERENCES_LOCAL (info, &h->root);
993 + local_p = h == NULL
994 + || (h->got_only_for_calls
995 + ? SYMBOL_CALLS_LOCAL (info, &h->root)
996 + : SYMBOL_REFERENCES_LOCAL (info, &h->root));
998 gp0 = _bfd_get_gp_value (input_bfd);
999 gp = _bfd_get_gp_value (abfd);
1000 @@ -7813,10 +7816,24 @@
1001 reloc types into the output file as R_MIPS_REL32
1002 relocs. Make room for this reloc in .rel(a).dyn. */
1003 mips_elf_allocate_dynamic_relocations (dynobj, info, 1);
1004 - if (MIPS_ELF_READONLY_SECTION (sec))
1005 - /* We tell the dynamic linker that there are
1006 - relocations against the text segment. */
1007 - info->flags |= DF_TEXTREL;
1008 + /* In the N32 and 64-bit ABIs there may be multiple
1009 + consecutive relocations for the same offset. If we have
1010 + a R_MIPS_GPREL32 followed by a R_MIPS_64 then that
1011 + relocation is complete and needs no futher adjustment. */
1012 + if ((rel == relocs
1013 + || rel[-1].r_offset != rel->r_offset
1014 + || r_type != R_MIPS_64
1015 + || ELF_R_TYPE(abfd, rel[-1].r_info) != R_MIPS_GPREL32)
1016 + && MIPS_ELF_READONLY_SECTION (sec))
1018 + /* We tell the dynamic linker that there are
1019 + relocations against the text segment. */
1020 + info->flags |= DF_TEXTREL;
1021 + info->callbacks->warning
1023 + _("relocation emitted against readonly section"),
1024 + NULL, abfd, sec, rel->r_offset);
1029 diff -rNU3 dist/bfd/elfxx-sparc.c dist.nbsd/bfd/elfxx-sparc.c
1030 --- dist/bfd/elfxx-sparc.c Wed Nov 7 11:43:32 2012
1031 +++ dist.nbsd/bfd/elfxx-sparc.c Wed Nov 7 11:13:53 2012
1032 @@ -2438,6 +2438,10 @@
1034 struct bfd_link_info *info = (struct bfd_link_info *) inf;
1036 + if (info->warn_shared_textrel)
1037 + (*_bfd_error_handler)
1038 + (_("warning: dynamic relocation in readonly section `%s'"),
1039 + h->root.root.string);
1040 info->flags |= DF_TEXTREL;
1042 /* Not an error, just cut short the traversal. */
1043 @@ -3388,10 +3392,8 @@
1044 memset (&outrel, 0, sizeof outrel);
1045 /* h->dynindx may be -1 if the symbol was marked to
1047 - else if (h != NULL &&
1051 + else if (h != NULL && h->dynindx != -1 && ! is_plt
1053 || !SYMBOLIC_BIND (info, h)
1054 || !h->def_regular))
1056 diff -rNU3 dist/bfd/libbfd.h dist.nbsd/bfd/libbfd.h
1057 --- dist/bfd/libbfd.h Wed Nov 7 11:43:32 2012
1058 +++ dist.nbsd/bfd/libbfd.h Wed Nov 7 11:13:54 2012
1059 @@ -2150,6 +2150,7 @@
1060 "BFD_RELOC_XC16X_SEG",
1061 "BFD_RELOC_XC16X_SOF",
1062 "BFD_RELOC_VAX_GLOB_DAT",
1063 + "BFD_RELOC_VAX_GLOB_REF",
1064 "BFD_RELOC_VAX_JMP_SLOT",
1065 "BFD_RELOC_VAX_RELATIVE",
1066 "BFD_RELOC_MT_PC16",
1067 diff -rNU3 dist/bfd/reloc.c dist.nbsd/bfd/reloc.c
1068 --- dist/bfd/reloc.c Wed Nov 7 11:43:32 2012
1069 +++ dist.nbsd/bfd/reloc.c Wed Nov 7 11:13:53 2012
1070 @@ -1775,6 +1775,17 @@
1071 Relocations used by 68K ELF.
1074 + BFD_RELOC_VAX_GLOB_DAT
1076 + BFD_RELOC_VAX_GLOB_REF
1078 + BFD_RELOC_VAX_JMP_SLOT
1080 + BFD_RELOC_VAX_RELATIVE
1082 + Relocations used by VAX ELF.
1085 BFD_RELOC_32_BASEREL
1087 BFD_RELOC_16_BASEREL
1088 diff -rNU3 dist/binutils/Makefile.in dist.nbsd/binutils/Makefile.in
1089 --- dist/binutils/Makefile.in Wed Nov 7 11:43:32 2012
1090 +++ dist.nbsd/binutils/Makefile.in Wed Nov 7 11:13:54 2012
1092 -# Makefile.in generated by automake 1.11.1 from Makefile.am.
1093 +# Makefile.in generated by automake 1.11 from Makefile.am.
1096 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
1098 DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \
1099 $(srcdir)/Makefile.am $(top_srcdir)/configure \
1100 $(am__configure_deps) $(srcdir)/config.in \
1101 - $(srcdir)/../mkinstalldirs $(top_srcdir)/po/Make-in arparse.h \
1102 - arparse.c arlex.c defparse.h defparse.c deflex.c nlmheader.h \
1103 - nlmheader.c arparse.h arparse.c arlex.c mcparse.h mcparse.c \
1104 - rcparse.h rcparse.c $(srcdir)/../depcomp $(srcdir)/../ylwrap
1105 + $(srcdir)/../mkinstalldirs $(srcdir)/../mkinstalldirs \
1106 + $(top_srcdir)/po/Make-in arparse.h arparse.c arlex.c \
1107 + defparse.h defparse.c deflex.c nlmheader.h nlmheader.c \
1108 + arparse.h arparse.c arlex.c mcparse.h mcparse.c rcparse.h \
1109 + rcparse.c $(srcdir)/../depcomp $(srcdir)/../depcomp \
1110 + $(srcdir)/../ylwrap $(srcdir)/../ylwrap
1111 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
1112 am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
1113 $(top_srcdir)/../config/zlib.m4 \
1115 libexecdir = @libexecdir@
1116 localedir = @localedir@
1117 localstatedir = @localstatedir@
1118 +lt_ECHO = @lt_ECHO@
1121 oldincludedir = @oldincludedir@
1123 # (which will cause the Makefiles to be regenerated when you run `make');
1124 # (2) otherwise, pass the desired values on the `make' command line.
1125 $(RECURSIVE_TARGETS):
1126 - @fail= failcom='exit 1'; \
1127 + @failcom='exit 1'; \
1128 for f in x $$MAKEFLAGS; do \
1132 fi; test -z "$$fail"
1134 $(RECURSIVE_CLEAN_TARGETS):
1135 - @fail= failcom='exit 1'; \
1136 + @failcom='exit 1'; \
1137 for f in x $$MAKEFLAGS; do \
1140 diff -rNU3 dist/binutils/aclocal.m4 dist.nbsd/binutils/aclocal.m4
1141 --- dist/binutils/aclocal.m4 Wed Nov 7 11:43:32 2012
1142 +++ dist.nbsd/binutils/aclocal.m4 Wed Nov 7 11:13:54 2012
1144 -# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
1145 +# generated automatically by aclocal 1.11 -*- Autoconf -*-
1147 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1148 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
1150 If you have problems, you may need to regenerate the build system entirely.
1151 To do so, use the procedure documented by the package, typically `autoreconf'.])])
1153 +# isc-posix.m4 serial 2 (gettext-0.11.2)
1154 +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
1155 +dnl This file is free software; the Free Software Foundation
1156 +dnl gives unlimited permission to copy and/or distribute it,
1157 +dnl with or without modifications, as long as this notice is preserved.
1159 +# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
1161 +# This test replaces the one in autoconf.
1162 +# Currently this macro should have the same name as the autoconf macro
1163 +# because gettext's gettext.m4 (distributed in the automake package)
1164 +# still uses it. Otherwise, the use in gettext.m4 makes autoheader
1165 +# give these diagnostics:
1166 +# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
1167 +# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
1169 +undefine([AC_ISC_POSIX])
1171 +AC_DEFUN([AC_ISC_POSIX],
1173 + dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
1174 + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
1178 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1180 # This file is free software; the Free Software Foundation
1182 [am__api_version='1.11'
1183 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1184 dnl require some minimum version. Point them to the right macro.
1185 -m4_if([$1], [1.11.1], [],
1186 +m4_if([$1], [1.11], [],
1187 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1191 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1192 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1193 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1194 -[AM_AUTOMAKE_VERSION([1.11.1])dnl
1195 +[AM_AUTOMAKE_VERSION([1.11])dnl
1196 m4_ifndef([AC_AUTOCONF_VERSION],
1197 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1198 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1199 diff -rNU3 dist/binutils/bucomm.c dist.nbsd/binutils/bucomm.c
1200 --- dist/binutils/bucomm.c Wed Nov 7 11:43:32 2012
1201 +++ dist.nbsd/binutils/bucomm.c Wed Nov 7 11:13:54 2012
1202 @@ -576,7 +576,14 @@
1203 file_name, strerror (errno));
1205 else if (! S_ISREG (statbuf.st_mode))
1206 - non_fatal (_("Warning: '%s' is not an ordinary file"), file_name);
1208 + if (!S_ISCHR(statbuf.st_mode))
1210 + non_fatal (_("Warning: '%s' is not an ordinary file"), file_name);
1213 + return statbuf.st_size ? statbuf.st_size : 1;
1215 else if (statbuf.st_size < 0)
1216 non_fatal (_("Warning: '%s' has negative size, probably it is too large"),
1218 diff -rNU3 dist/binutils/doc/Makefile.am dist.nbsd/binutils/doc/Makefile.am
1219 --- dist/binutils/doc/Makefile.am Wed Nov 7 11:43:32 2012
1220 +++ dist.nbsd/binutils/doc/Makefile.am Wed Nov 7 11:13:54 2012
1223 # Man page generation from texinfo
1224 addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1225 + @echo "NOT REBUILDING $@"
1226 +NetBSD_DISABLED_addr2line.1:
1228 -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
1229 -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1233 ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1234 + @echo "NOT REBUILDING $@"
1235 +NetBSD_DISABLED_ar.1:
1237 -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
1238 -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1242 dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1243 + @echo "NOT REBUILDING $@"
1244 +NetBSD_DISABLED_dlltool.1:
1246 -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
1247 -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1251 nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1252 + @echo "NOT REBUILDING $@"
1253 +NetBSD_DISABLED_nlmconv.1:
1255 -$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
1256 -($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1260 nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1261 + @echo "NOT REBUILDING $@"
1262 +NetBSD_DISABLED_nm.1:
1264 -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
1265 -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1269 objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1270 + @echo "NOT REBUILDING $@"
1271 +NetBSD_DISABLED_objcopy.1:
1273 -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
1274 -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1278 objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1279 + @echo "NOT REBUILDING $@"
1280 +NetBSD_DISABLED_objdump.1:
1282 -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
1283 -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1287 ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1288 + @echo "NOT REBUILDING $@"
1289 +NetBSD_DISABLED_ranlib.1:
1291 -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
1292 -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1296 readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1297 + @echo "NOT REBUILDING $@"
1298 +NetBSD_DISABLED_readelf.1:
1300 -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
1301 -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1305 size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1306 + @echo "NOT REBUILDING $@"
1307 +NetBSD_DISABLED_size.1:
1309 -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
1310 -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1314 strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1315 + @echo "NOT REBUILDING $@"
1316 +NetBSD_DISABLED_strings.1:
1318 -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
1319 -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1323 strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1324 + @echo "NOT REBUILDING $@"
1325 +NetBSD_DISABLED_strip.1:
1327 -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
1328 -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1332 windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1333 + @echo "NOT REBUILDING $@"
1334 +NetBSD_DISABLED_windres.1:
1336 -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
1337 -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1341 windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1342 + @echo "NOT REBUILDING $@"
1343 +NetBSD_DISABLED_windmc.1:
1345 -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
1346 -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1350 cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
1351 + @echo "NOT REBUILDING $@"
1352 +NetBSD_DISABLED_cxxfilt.man:
1354 -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
1355 -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1356 diff -rNU3 dist/binutils/doc/Makefile.in dist.nbsd/binutils/doc/Makefile.in
1357 --- dist/binutils/doc/Makefile.in Wed Nov 7 11:43:32 2012
1358 +++ dist.nbsd/binutils/doc/Makefile.in Wed Nov 7 11:13:54 2012
1360 -# Makefile.in generated by automake 1.11.1 from Makefile.am.
1361 +# Makefile.in generated by automake 1.11 from Makefile.am.
1364 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
1366 libexecdir = @libexecdir@
1367 localedir = @localedir@
1368 localstatedir = @localstatedir@
1369 +lt_ECHO = @lt_ECHO@
1372 oldincludedir = @oldincludedir@
1376 binutils.info: binutils.texi
1377 + @echo "NOT REBUILDING $@"
1378 +NetBSD_DISABLED_binutils.info: binutils.texi
1379 restore=: && backupdir="$(am__leading_dot)am$$$$" && \
1380 rm -rf $$backupdir && mkdir $$backupdir && \
1381 if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
1384 # Man page generation from texinfo
1385 addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1386 + @echo "NOT REBUILDING $@"
1387 +NetBSD_DISABLED_addr2line.1:
1389 -$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
1390 -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1394 ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1395 + @echo "NOT REBUILDING $@"
1396 +NetBSD_DISABLED_ar.1:
1398 -$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
1399 -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1403 dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1404 + @echo "NOT REBUILDING $@"
1405 +NetBSD_DISABLED_dlltool.1:
1407 -$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
1408 -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1412 nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1413 + @echo "NOT REBUILDING $@"
1414 +NetBSD_DISABLED_nlmconv.1:
1416 -$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
1417 -($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1421 nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1422 + @echo "NOT REBUILDING $@"
1423 +NetBSD_DISABLED_nm.1:
1425 -$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
1426 -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1430 objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1431 + @echo "NOT REBUILDING $@"
1432 +NetBSD_DISABLED_objcopy.1:
1434 -$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
1435 -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1439 objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1440 + @echo "NOT REBUILDING $@"
1441 +NetBSD_DISABLED_objdump.1:
1443 -$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
1444 -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1448 ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1449 + @echo "NOT REBUILDING $@"
1450 +NetBSD_DISABLED_ranlib.1:
1452 -$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
1453 -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1457 readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1458 + @echo "NOT REBUILDING $@"
1459 +NetBSD_DISABLED_readelf.1:
1461 -$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
1462 -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1466 size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1467 + @echo "NOT REBUILDING $@"
1468 +NetBSD_DISABLED_size.1:
1470 -$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
1471 -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1475 strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1476 + @echo "NOT REBUILDING $@"
1477 +NetBSD_DISABLED_strings.1:
1479 -$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
1480 -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1484 strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1485 + @echo "NOT REBUILDING $@"
1486 +NetBSD_DISABLED_strip.1:
1488 -$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
1489 -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1493 elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1494 + @echo "NOT REBUILDING $@"
1495 +NetBSD_DISABLED_elfedit.1:
1497 -$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod
1498 -($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1502 windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1503 + @echo "NOT REBUILDING $@"
1504 +NetBSD_DISABLED_windres.1:
1506 -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
1507 -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1511 windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
1512 + @echo "NOT REBUILDING $@"
1513 +NetBSD_DISABLED_windmc.1:
1515 -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
1516 -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1520 cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
1521 + @echo "NOT REBUILDING $@"
1522 +NetBSD_DISABLED_cxxfilt.man:
1524 -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
1525 -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
1526 diff -rNU3 dist/binutils/doc/elfedit.1 dist.nbsd/binutils/doc/elfedit.1
1527 --- dist/binutils/doc/elfedit.1 Wed Nov 7 11:43:32 2012
1528 +++ dist.nbsd/binutils/doc/elfedit.1 Wed Nov 7 11:13:54 2012
1530 -.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
1531 +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
1533 .\" Standard preamble:
1534 .\" ========================================================================
1535 -.de Sh \" Subsection heading
1543 .de Sp \" Vertical space (when we can't use .PP)
1549 .\" If the F register is turned on, we'll generate index entries on stderr for
1550 -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
1551 +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
1552 .\" entries marked with X<> in POD. Of course, you'll have to process the
1553 .\" output yourself in some meaningful fashion.
1556 .\" ========================================================================
1558 .IX Title "ELFEDIT 1"
1559 -.TH ELFEDIT 1 "2011-06-27" "binutils-2.21.1" "GNU Development Tools"
1560 +.TH ELFEDIT 1 "2011-09-24" "binutils-2.21.1" "GNU Development Tools"
1561 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
1562 .\" way too many mistakes in technical documents.
1564 diff -rNU3 dist/binutils/doc/strings.1 dist.nbsd/binutils/doc/strings.1
1565 --- dist/binutils/doc/strings.1 Wed Nov 7 11:43:32 2012
1566 +++ dist.nbsd/binutils/doc/strings.1 Wed Nov 7 11:13:54 2012
1568 characters (\s-1ASCII\s0, \s-1ISO\s0 8859, etc., default), \fBS\fR =
1569 single\-8\-bit\-byte characters, \fBb\fR = 16\-bit bigendian, \fBl\fR =
1570 16\-bit littleendian, \fBB\fR = 32\-bit bigendian, \fBL\fR = 32\-bit
1571 -littleendian. Useful for finding wide character strings. (\fBl\fR
1572 +littleendian. Useful for finding wide-character strings. (\fBl\fR
1573 and \fBb\fR apply to, for example, Unicode \s-1UTF\-16/UCS\-2\s0 encodings).
1574 .IP "\fB\-T\fR \fIbfdname\fR" 4
1575 .IX Item "-T bfdname"
1576 diff -rNU3 dist/binutils/objcopy.c dist.nbsd/binutils/objcopy.c
1577 --- dist/binutils/objcopy.c Wed Nov 7 11:43:32 2012
1578 +++ dist.nbsd/binutils/objcopy.c Wed Nov 7 11:13:54 2012
1580 #include "fnmatch.h"
1581 #include "elf-bfd.h"
1582 #include <sys/stat.h>
1585 #include "coff/internal.h"
1586 #include "libcoff.h"
1587 diff -rNU3 dist/binutils/readelf.c dist.nbsd/binutils/readelf.c
1588 --- dist/binutils/readelf.c Wed Nov 7 11:43:31 2012
1589 +++ dist.nbsd/binutils/readelf.c Wed Nov 7 11:13:54 2012
1590 @@ -11933,6 +11933,23 @@
1594 + /* On SuperH, PT_GETREGS == mach+3 and PT_GETFPREGS == mach+5.
1595 + There's also old PT___GETREGS40 == mach + 1 for old reg
1596 + structure which lacks GBR. */
1600 + case NT_NETBSDCORE_FIRSTMACH + 1:
1601 + return _("PT___GETREGS40 (old reg structure)");
1602 + case NT_NETBSDCORE_FIRSTMACH + 3:
1603 + return _("PT_GETREGS (reg structure)");
1604 + case NT_NETBSDCORE_FIRSTMACH + 5:
1605 + return _("PT_GETFPREGS (fpreg structure)");
1611 /* On all other arch's, PT_GETREGS == mach+1 and
1612 PT_GETFPREGS == mach+3. */
1614 diff -rNU3 dist/binutils/strings.c dist.nbsd/binutils/strings.c
1615 --- dist/binutils/strings.c Wed Nov 7 11:43:31 2012
1616 +++ dist.nbsd/binutils/strings.c Wed Nov 7 11:13:54 2012
1619 #elif !BFD_HOST_64BIT_LONG
1620 if (start != (unsigned long) start)
1621 - printf ("++%7ld ", (unsigned long) start);
1622 + printf ("++%7llu ", (unsigned long) start);
1625 printf ("%7ld ", (long) start);
1626 diff -rNU3 dist/config.guess dist.nbsd/config.guess
1627 --- dist/config.guess Wed Nov 7 11:43:31 2012
1628 +++ dist.nbsd/config.guess Wed Nov 7 11:13:54 2012
1630 sparc:Linux:*:* | sparc64:Linux:*:*)
1631 echo ${UNAME_MACHINE}-unknown-linux-gnu
1634 + echo ${UNAME_MACHINE}-unknown-linux-gnu
1637 echo ${UNAME_MACHINE}-dec-linux-gnu
1639 diff -rNU3 dist/config.sub dist.nbsd/config.sub
1640 --- dist/config.sub Wed Nov 7 11:43:31 2012
1641 +++ dist.nbsd/config.sub Wed Nov 7 11:13:54 2012
1643 # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
1644 # Free Software Foundation, Inc.
1646 -timestamp='2010-05-21'
1647 +timestamp='2009-12-31'
1649 # This file is (in principle) common to ALL GNU software.
1650 # The presence of a machine in this file suggests that SOME GNU software
1652 # Here we must recognize all the valid KERNEL-OS combinations.
1653 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
1655 - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
1656 - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
1657 - knetbsd*-gnu* | netbsd*-gnu* | \
1658 + nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
1659 + uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | \
1660 + netbsd*-gnu* | netbsd*-eabi* | \
1661 kopensolaris*-gnu* | \
1662 storm-chaos* | os2-emx* | rtmk-nova*)
1665 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
1666 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
1668 - | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
1669 + | tahoe | thumb | tic4x | tic80 | tron \
1673 @@ -304,15 +304,6 @@
1675 basic_machine=$basic_machine-unknown
1678 - basic_machine=tic54x-unknown
1681 - basic_machine=tic55x-unknown
1684 - basic_machine=tic6x-unknown
1686 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
1687 # Motorola 68HC11/12.
1688 basic_machine=$basic_machine-unknown
1690 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
1692 | bfin-* | bs2000-* \
1693 - | c[123]* | c30-* | [cjt]90-* | c4x-* \
1694 + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
1695 | clipper-* | craynv-* | cydra-* \
1696 | d10v-* | d30v-* | dlx-* \
1700 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
1701 | tahoe-* | thumb-* \
1702 - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
1703 - | tile-* | tilegx-* \
1704 + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
1707 | v850-* | v850e-* | vax-* \
1708 @@ -492,15 +482,6 @@
1709 basic_machine=powerpc-ibm
1713 - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
1716 - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
1719 - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
1722 basic_machine=c90-cray
1724 @@ -1094,11 +1075,18 @@
1725 basic_machine=t90-cray
1728 - # This must be matched before tile*.
1730 - basic_machine=tilegx-unknown
1733 + basic_machine=tic54x-unknown
1737 + basic_machine=tic55x-unknown
1741 + basic_machine=tic6x-unknown
1745 basic_machine=tile-unknown
1747 @@ -1308,8 +1296,7 @@
1748 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1749 | -chorusos* | -chorusrdb* | -cegcc* \
1750 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1751 - | -mingw32* | -linux-gnu* | -linux-android* \
1752 - | -linux-newlib* | -linux-uclibc* \
1753 + | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1754 | -uxpv* | -beos* | -mpeix* | -udk* \
1755 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1756 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1757 @@ -1491,15 +1478,6 @@
1771 # This must come before the *-dec entry.
1773 diff -rNU3 dist/configure dist.nbsd/configure
1774 --- dist/configure Wed Nov 7 11:43:31 2012
1775 +++ dist.nbsd/configure Wed Nov 7 11:13:54 2012
1776 @@ -2670,7 +2670,7 @@
1777 # binutils, gas and ld appear in that order because it makes sense to run
1778 # "make check" in that particular order.
1779 # If --enable-gold is used, "gold" may replace "ld".
1780 -host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc cgen 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"
1781 +host_tools="byacc flex bison binutils gas ld fixincludes gcc cgen 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"
1783 # libgcj represents the runtime libraries only used by gcj.
1784 libgcj="target-libffi \
1785 diff -rNU3 dist/gas/atof-generic.c dist.nbsd/gas/atof-generic.c
1786 --- dist/gas/atof-generic.c Wed Nov 7 11:43:31 2012
1787 +++ dist.nbsd/gas/atof-generic.c Wed Nov 7 11:13:45 2012
1788 @@ -121,6 +121,32 @@
1790 switch (first_digit[0])
1794 + if (!strncasecmp ("snan", first_digit, 4))
1796 + address_of_generic_floating_point_number->sign = 0;
1797 + address_of_generic_floating_point_number->exponent = 0;
1798 + address_of_generic_floating_point_number->leader =
1799 + address_of_generic_floating_point_number->low;
1800 + *address_of_string_pointer = first_digit + 4;
1807 + if (!strncasecmp ("qnan", first_digit, 4))
1809 + address_of_generic_floating_point_number->sign = 0;
1810 + address_of_generic_floating_point_number->exponent = 0;
1811 + address_of_generic_floating_point_number->leader =
1812 + address_of_generic_floating_point_number->low;
1813 + *address_of_string_pointer = first_digit + 4;
1820 if (!strncasecmp ("nan", first_digit, 3))
1821 diff -rNU3 dist/gas/config/atof-vax.c dist.nbsd/gas/config/atof-vax.c
1822 --- dist/gas/config/atof-vax.c Wed Nov 7 11:43:31 2012
1823 +++ dist.nbsd/gas/config/atof-vax.c Wed Nov 7 11:13:46 2012
1824 @@ -268,10 +268,27 @@
1825 int exponent_skippage;
1826 LITTLENUM_TYPE word1;
1828 - /* JF: Deal with new Nan, +Inf and -Inf codes. */
1829 if (f->sign != '-' && f->sign != '+')
1831 - make_invalid_floating_point_number (words);
1834 + /* All NaNs are 0. */
1835 + memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision);
1837 + else if (f->sign == 'P')
1839 + /* Positive Infinity. */
1840 + memset (words, 0xff, sizeof (LITTLENUM_TYPE) * precision);
1841 + words[0] &= 0x7fff;
1843 + else if (f->sign == 'N')
1845 + /* Negative Infinity. */
1846 + memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision);
1847 + words[0] = 0x0080;
1850 + make_invalid_floating_point_number (words);
1851 return return_value;
1854 diff -rNU3 dist/gas/config/tc-arm.c dist.nbsd/gas/config/tc-arm.c
1855 --- dist/gas/config/tc-arm.c Wed Nov 7 11:43:31 2012
1856 +++ dist.nbsd/gas/config/tc-arm.c Wed Nov 7 11:13:46 2012
1857 @@ -16133,12 +16133,16 @@
1860 for (sect = stdoutput->sections; sect != NULL; sect = sect->next)
1861 - if (seg_info (sect)->tc_segment_info_data.current_it.state
1862 - == MANUAL_IT_BLOCK)
1864 - as_warn (_("section '%s' finished with an open IT block."),
1868 + segment_info_type *seginfo = seg_info (sect);
1870 + if (seginfo && seginfo->tc_segment_info_data.current_it.state
1871 + == MANUAL_IT_BLOCK)
1873 + as_warn (_("section '%s' finished with an open IT block."),
1878 if (now_it.state == MANUAL_IT_BLOCK)
1879 as_warn (_("file finished with an open IT block."));
1880 diff -rNU3 dist/gas/config/tc-mips.c dist.nbsd/gas/config/tc-mips.c
1881 --- dist/gas/config/tc-mips.c Wed Nov 7 11:43:31 2012
1882 +++ dist.nbsd/gas/config/tc-mips.c Wed Nov 7 11:13:46 2012
1884 NUM_FIX_VR4120_CLASSES
1887 +/* ...likewise -mtrap-zero-jump. */
1888 +static bfd_boolean mips_trap_zero_jump;
1890 /* ...likewise -mfix-loongson2f-jump. */
1891 static bfd_boolean mips_fix_loongson2f_jump;
1894 efficient expansion. */
1896 static int mips_relax_branch;
1898 +static int mips_fix_loongson2f_btb;
1900 /* The expansion of many macros depends on the type of symbol that
1901 they refer to. For example, when generating position-dependent code,
1902 @@ -1068,6 +1073,7 @@
1903 static void mips16_macro_build
1904 (expressionS *, const char *, const char *, va_list *);
1905 static void load_register (int, expressionS *, int);
1906 +static void macro_build (expressionS *, const char *, const char *, ...);
1907 static void macro_start (void);
1908 static void macro_end (void);
1909 static void macro (struct mips_cl_insn * ip);
1910 @@ -2744,6 +2750,35 @@
1915 +trap_zero_jump (struct mips_cl_insn * ip)
1917 + if (strcmp (ip->insn_mo->name, "j") == 0
1918 + || strcmp (ip->insn_mo->name, "jr") == 0
1919 + || strcmp (ip->insn_mo->name, "jalr") == 0)
1923 + if (mips_opts.warn_about_macros)
1926 + sreg = EXTRACT_OPERAND (RS, *ip);
1927 + if (mips_opts.isa == ISA_MIPS32
1928 + || mips_opts.isa == ISA_MIPS32R2
1929 + || mips_opts.isa == ISA_MIPS64
1930 + || mips_opts.isa == ISA_MIPS64R2)
1933 + ep.X_op = O_constant;
1934 + ep.X_add_number = 4096;
1935 + macro_build (&ep, "tltiu", "s,j", sreg, BFD_RELOC_LO16);
1937 + else if (mips_opts.isa != ISA_UNKNOWN
1938 + && mips_opts.isa != ISA_MIPS1)
1939 + macro_build (NULL, "teq", "s,t", sreg, 0);
1943 /* Fix NOP issue: Replace nops by "or at,at,zero". */
1946 @@ -2779,6 +2814,12 @@
1947 ep.X_add_number = 0xffff;
1948 macro_build (&ep, "ori", "t,r,i", ATREG, ATREG, BFD_RELOC_LO16);
1949 macro_build (NULL, "and", "d,v,t", sreg, sreg, ATREG);
1950 + /* Hide these three instructions to avoid getting a ``macro expanded into
1951 + multiple instructions'' warning. */
1952 + if (mips_relax.sequence != 2)
1953 + mips_macro_warning.sizes[0] -= 3 * 4;
1954 + if (mips_relax.sequence != 1)
1955 + mips_macro_warning.sizes[1] -= 3 * 4;
1959 @@ -2807,6 +2848,8 @@
1961 if (mips_fix_loongson2f)
1962 fix_loongson2f (ip);
1963 + if (mips_trap_zero_jump)
1964 + trap_zero_jump (ip);
1966 /* Mark instruction labels in mips16 mode. */
1967 mips16_mark_labels ();
1968 @@ -3602,6 +3645,41 @@
1969 r[i] = (bfd_reloc_code_real_type) va_arg (*args, int);
1972 +/* Fix jump through register issue on loongson2f processor for kernel code:
1973 + force a BTB clear before the jump to prevent it from being incorrectly
1974 + prefetched by the branch prediction engine. */
1977 +macro_build_jrpatch (expressionS *ep, unsigned int sreg)
1979 + if (!mips_fix_loongson2f_btb)
1982 + if (sreg == ZERO || sreg == KT0 || sreg == KT1 || sreg == AT)
1985 + if (!mips_opts.at)
1987 + as_warn (_("unable to apply loongson2f BTB workaround when .set noat"));
1991 + /* li $at, COP_0_BTB_CLEAR | COP_0_RAS_DISABLE */
1992 + ep->X_op = O_constant;
1993 + ep->X_add_number = 3;
1994 + macro_build (ep, "ori", "t,r,i", AT, ZERO, BFD_RELOC_LO16);
1996 + /* dmtc0 $at, COP_0_DIAG */
1997 + macro_build (NULL, "dmtc0", "t,G", AT, 22);
1999 + /* Hide these two instructions to avoid getting a ``macro expanded into
2000 + multiple instructions'' warning. */
2001 + if (mips_relax.sequence != 2)
2002 + mips_macro_warning.sizes[0] -= 2 * 4;
2003 + if (mips_relax.sequence != 1)
2004 + mips_macro_warning.sizes[1] -= 2 * 4;
2007 /* Build an instruction created by a macro expansion. This is passed
2008 a pointer to the count of instructions created so far, an
2009 expression, the name of the instruction to build, an operand format
2010 @@ -3999,6 +4077,7 @@
2014 + macro_build_jrpatch (ep, PIC_CALL_REG);
2015 macro_build (NULL, "jalr", "d,s", RA, PIC_CALL_REG);
2016 if (MIPS_JALR_HINT_P (ep))
2017 fix_new_exp (frag_now, f - frag_now->fr_literal,
2018 @@ -6138,6 +6217,26 @@
2019 macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t", treg, tempreg, breg);
2023 + macro_build_jrpatch (&expr1, sreg);
2024 + macro_build (NULL, "jr", "s", sreg);
2025 + return; /* didn't modify $at */
2028 + macro_build_jrpatch (&expr1, sreg);
2029 + macro_build (NULL, "j", "s", sreg);
2030 + return; /* didn't modify $at */
2033 + macro_build_jrpatch (&expr1, sreg);
2034 + macro_build (NULL, "jalr", "s", sreg);
2035 + return; /* didn't modify $at */
2038 + macro_build_jrpatch (&expr1, sreg);
2039 + macro_build (NULL, "jalr", "d,s", dreg, sreg);
2040 + return; /* didn't modify $at */
2044 unsigned long temp = (treg << 16) | (0x01);
2045 @@ -6193,12 +6292,16 @@
2048 if (mips_pic == NO_PIC)
2049 - macro_build (NULL, "jalr", "d,s", dreg, sreg);
2051 + macro_build_jrpatch (&expr1, sreg);
2052 + macro_build (NULL, "jalr", "d,s", dreg, sreg);
2056 if (sreg != PIC_CALL_REG)
2057 as_warn (_("MIPS PIC call to register other than $25"));
2059 + macro_build_jrpatch (&expr1, sreg);
2060 macro_build (NULL, "jalr", "d,s", dreg, sreg);
2061 if (mips_pic == SVR4_PIC && !HAVE_NEWABI)
2063 @@ -11243,6 +11346,8 @@
2064 OPTION_SINGLE_FLOAT,
2065 OPTION_DOUBLE_FLOAT,
2067 + OPTION_TRAP_ZERO_JUMP,
2068 + OPTION_NO_TRAP_ZERO_JUMP,
2072 @@ -11257,6 +11362,8 @@
2074 OPTION_MVXWORKS_PIC,
2075 #endif /* OBJ_ELF */
2076 + OPTION_FIX_LOONGSON2F_BTB,
2077 + OPTION_NO_FIX_LOONGSON2F_BTB,
2081 @@ -11310,6 +11417,8 @@
2082 {"mno-fix-loongson2f-jump", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_JUMP},
2083 {"mfix-loongson2f-nop", no_argument, NULL, OPTION_FIX_LOONGSON2F_NOP},
2084 {"mno-fix-loongson2f-nop", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_NOP},
2085 + {"mfix-loongson2f-btb", no_argument, NULL, OPTION_FIX_LOONGSON2F_BTB},
2086 + {"mno-fix-loongson2f-btb", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_BTB},
2087 {"mfix-vr4120", no_argument, NULL, OPTION_FIX_VR4120},
2088 {"mno-fix-vr4120", no_argument, NULL, OPTION_NO_FIX_VR4120},
2089 {"mfix-vr4130", no_argument, NULL, OPTION_FIX_VR4130},
2090 @@ -11348,6 +11457,9 @@
2091 make testing easier. */
2092 {"32", no_argument, NULL, OPTION_32},
2094 + {"mtrap-zero-jump", no_argument, NULL, OPTION_TRAP_ZERO_JUMP},
2095 + {"mno-trap-zero-jump", no_argument, NULL, OPTION_NO_TRAP_ZERO_JUMP},
2097 /* ELF-specific options. */
2099 {"KPIC", no_argument, NULL, OPTION_CALL_SHARED},
2100 @@ -11611,6 +11723,14 @@
2101 mips_fix_vr4130 = 0;
2104 + case OPTION_FIX_LOONGSON2F_BTB:
2105 + mips_fix_loongson2f_btb = 1;
2108 + case OPTION_NO_FIX_LOONGSON2F_BTB:
2109 + mips_fix_loongson2f_btb = 0;
2112 case OPTION_FIX_CN63XXP1:
2113 mips_fix_cn63xxp1 = TRUE;
2115 @@ -11643,6 +11763,14 @@
2116 mips_opts.sym32 = FALSE;
2119 + case OPTION_TRAP_ZERO_JUMP:
2120 + mips_trap_zero_jump = TRUE;
2123 + case OPTION_NO_TRAP_ZERO_JUMP:
2124 + mips_trap_zero_jump = FALSE;
2128 /* When generating ELF code, we permit -KPIC and -call_shared to
2129 select SVR4_PIC, and -non_shared to select no PIC. This is
2130 @@ -15587,6 +15715,7 @@
2131 fprintf (stream, _("\
2132 -mfix-loongson2f-jump work around Loongson2F JUMP instructions\n\
2133 -mfix-loongson2f-nop work around Loongson2F NOP errata\n\
2134 +-mfix-loongson2f-btb work around Loongson2F BTB errata\n\
2135 -mfix-vr4120 work around certain VR4120 errata\n\
2136 -mfix-vr4130 work around VR4130 mflo/mfhi errata\n\
2137 -mfix-24k insert a nop after ERET and DERET instructions\n\
2138 diff -rNU3 dist/gas/config/tc-vax.c dist.nbsd/gas/config/tc-vax.c
2139 --- dist/gas/config/tc-vax.c Wed Nov 7 11:43:31 2012
2140 +++ dist.nbsd/gas/config/tc-vax.c Wed Nov 7 11:13:46 2012
2142 && (PLT_symbol == NULL || fragP->fr_symbol != PLT_symbol)
2143 && fragP->fr_symbol != NULL
2146 + && ELF_ST_VISIBILITY (S_GET_OTHER (fragP->fr_symbol)) != STV_HIDDEN
2148 && (!S_IS_DEFINED (fragP->fr_symbol)
2149 || S_IS_WEAK (fragP->fr_symbol)
2150 || S_IS_EXTERNAL (fragP->fr_symbol)))
2151 @@ -1073,6 +1076,154 @@
2156 +#ifndef BFD_ASSEMBLER
2158 +tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
2161 + relax_addressT segment_address_in_file;
2164 + * In: length of relocation (or of address) in chars: 1, 2 or 4.
2165 + * Out: GNU LD relocation length code: 0, 1, or 2.
2168 + static const unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2};
2172 + know (fixP->fx_addsy != NULL);
2174 + md_number_to_chars (where,
2175 + fixP->fx_frag->fr_address + fixP->fx_where - segment_address_in_file,
2178 + r_symbolnum = (S_IS_DEFINED (fixP->fx_addsy)
2179 + ? S_GET_TYPE (fixP->fx_addsy)
2180 + : fixP->fx_addsy->sy_number);
2181 + r_flags = (fixP->fx_pcrel ? 1 : 0)
2182 + | (!S_IS_DEFINED (fixP->fx_addsy) ? 8 : 0) /* extern */
2183 + | ((nbytes_r_length[fixP->fx_size] & 3) << 1);
2186 + r_flags |= ((!S_IS_DEFINED(fixP->fx_addsy)
2188 + && fixP->fx_addsy != GOT_symbol
2189 + && fixP->fx_addsy != PLT_symbol
2190 + && flags_want_pic) ? 0x10 : 0);
2193 + switch (fixP->fx_r_type) {
2198 + r_flags |= 0x80; /* setting the copy bit */
2199 + /* says we can convert */
2200 + /* to gotslot if needed */
2203 + if (flag_want_pic && S_IS_EXTERNAL(fixP->fx_addsy)) {
2204 + r_symbolnum = fixP->fx_addsy->sy_number;
2205 + r_flags |= 8; /* set extern bit */
2208 + case RELOC_JMP_SLOT:
2209 + if (flag_want_pic) {
2210 + r_flags |= 0x20; /* set jmptable */
2211 + r_flags &= ~0x08; /* clear extern bit */
2214 + case RELOC_JMP_TBL:
2215 + if (flag_want_pic) {
2216 + r_flags |= 0x20; /* set jmptable */
2217 + r_flags |= 0x08; /* set extern bit */
2220 + case RELOC_GLOB_DAT:
2221 + if (flag_want_pic) {
2222 + r_flags |= 0x10; /* set baserel bit */
2223 + r_symbolnum = fixP->fx_addsy->sy_number;
2224 + if (S_IS_EXTERNAL(fixP->fx_addsy))
2225 + r_flags |= 8; /* set extern bit */
2230 + where[4] = (r_symbolnum >> 0) & 0xff;
2231 + where[5] = (r_symbolnum >> 8) & 0xff;
2232 + where[6] = (r_symbolnum >> 16) & 0xff;
2233 + where[7] = r_flags;
2235 +#endif /* !BFD_ASSEMBLER */
2236 +#endif /* OBJ_AOUT */
2239 + * BUGS, GRIPES, APOLOGIA, etc.
2241 + * The opcode table 'votstrs' needs to be sorted on opcode frequency.
2242 + * That is, AFTER we hash it with hash_...(), we want most-used opcodes
2243 + * to come out of the hash table faster.
2245 + * I am sorry to inflict yet another VAX assembler on the world, but
2246 + * RMS says we must do everything from scratch, to prevent pin-heads
2247 + * restricting this software.
2251 + * This is a vaguely modular set of routines in C to parse VAX
2252 + * assembly code using DEC mnemonics. It is NOT un*x specific.
2254 + * The idea here is that the assembler has taken care of all:
2259 + * line continuation
2261 + * condensing any whitespace down to exactly one space
2262 + * and all we have to do is parse 1 line into a vax instruction
2263 + * partially formed. We will accept a line, and deliver:
2264 + * an error message (hopefully empty)
2265 + * a skeleton VAX instruction (tree structure)
2266 + * textual pointers to all the operand expressions
2267 + * a warning message that notes a silly operand (hopefully empty)
2271 + * E D I T H I S T O R Y
2273 + * 17may86 Dean Elsner. Bug if line ends immediately after opcode.
2274 + * 30apr86 Dean Elsner. New vip_op() uses arg block so change call.
2275 + * 6jan86 Dean Elsner. Crock vip_begin() to call vip_op_defaults().
2276 + * 2jan86 Dean Elsner. Invent synthetic opcodes.
2277 + * Widen vax_opcodeT to 32 bits. Use a bit for VIT_OPCODE_SYNTHETIC,
2278 + * which means this is not a real opcode, it is like a macro; it will
2279 + * be relax()ed into 1 or more instructions.
2280 + * Use another bit for VIT_OPCODE_SPECIAL if the op-code is not optimised
2281 + * like a regular branch instruction. Option added to vip_begin():
2282 + * exclude synthetic opcodes. Invent synthetic_votstrs[].
2283 + * 31dec85 Dean Elsner. Invent vit_opcode_nbytes.
2284 + * Also make vit_opcode into a char[]. We now have n-byte vax opcodes,
2285 + * so caller's don't have to know the difference between a 1-byte & a
2286 + * 2-byte op-code. Still need vax_opcodeT concept, so we know how
2287 + * big an object must be to hold an op.code.
2288 + * 30dec85 Dean Elsner. Widen typedef vax_opcodeT in "vax-inst.h"
2289 + * because vax opcodes may be 16 bits. Our crufty C compiler was
2290 + * happily initialising 8-bit vot_codes with 16-bit numbers!
2291 + * (Wouldn't the 'phone company like to compress data so easily!)
2292 + * 29dec85 Dean Elsner. New static table vax_operand_width_size[].
2293 + * Invented so we know hw many bytes a "I^#42" needs in its immediate
2294 + * operand. Revised struct vop in "vax-inst.h": explicitly include
2295 + * byte length of each operand, and it's letter-code datum type.
2296 + * 17nov85 Dean Elsner. Name Change.
2297 + * Due to ar(1) truncating names, we learned the hard way that
2298 + * "vax-inst-parse.c" -> "vax-inst-parse." dropping the "o" off
2299 + * the archived object name. SO... we shortened the name of this
2300 + * source file, and changed the makefile.
2303 /* Parse a vax operand in DEC assembler notation.
2304 For speed, expect a string of whitespace to be reduced to a single ' '.
2305 This is the case for GNU AS, and is easy for other DEC-compatible
2306 @@ -3150,7 +3301,7 @@
2307 if (flag_want_pic && operandP->vop_mode == 8
2308 && this_add_symbol != NULL)
2310 - as_warn (_("Symbol %s used as immediate operand in PIC mode."),
2311 + as_warn (_("Symbol '%s' used as immediate operand in PIC mode."),
2312 S_GET_NAME (this_add_symbol));
2315 @@ -3226,7 +3377,15 @@
2320 + if (flag_want_pic && this_add_symbol != NULL)
2322 + as_warn (_("Symbol '%s' used as displacement in PIC mode."),
2323 + S_GET_NAME (this_add_symbol));
2326 p = frag_more (1 + length);
2327 + know (operandP->vop_reg != 0xf);
2328 know (operandP->vop_reg >= 0);
2329 p[0] = operandP->vop_reg
2330 | ((at | "?\12\14?\16"[length]) << 4);
2331 diff -rNU3 dist/gas/config/vax-inst.h dist.nbsd/gas/config/vax-inst.h
2332 --- dist/gas/config/vax-inst.h Wed Nov 7 11:43:31 2012
2333 +++ dist.nbsd/gas/config/vax-inst.h Wed Nov 7 11:13:46 2012
2335 #define VAX_WIDEN_WORD (0x20) /* Add this to byte branch to get word br. */
2336 #define VAX_WIDEN_LONG (0x6) /* Add this to byte branch to get long jmp.*/
2337 /* Needs VAX_PC_RELATIVE_MODE byte after it*/
2338 +#define VAX_CALLS (0xFB) /* Call with arg list on stack */
2339 +#define VAX_CALLG (0xFA) /* Call with arg list in memory */
2341 struct vit /* vax instruction tree */
2343 diff -rNU3 dist/gas/doc/Makefile.am dist.nbsd/gas/doc/Makefile.am
2344 --- dist/gas/doc/Makefile.am Wed Nov 7 11:43:31 2012
2345 +++ dist.nbsd/gas/doc/Makefile.am Wed Nov 7 11:13:46 2012
2347 -I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
2349 asconfig.texi: $(CONFIG).texi
2350 + @echo "NOT REBUILDING $@"
2351 +NetBSD_DISABLED_asconfig.text:
2353 cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
2354 chmod u+w ./asconfig.texi
2356 # The sed command removes the no-adjust Nroff command so that
2357 # the man output looks standard.
2358 as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
2359 + @echo "NOT REBUILDING $@"
2360 +NetBSD_DISABLED_as.1:
2362 -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
2363 -($(POD2MAN) as.pod | \
2364 diff -rNU3 dist/gas/doc/Makefile.in dist.nbsd/gas/doc/Makefile.in
2365 --- dist/gas/doc/Makefile.in Wed Nov 7 11:43:31 2012
2366 +++ dist.nbsd/gas/doc/Makefile.in Wed Nov 7 11:13:46 2012
2370 as.info: as.texinfo $(as_TEXINFOS)
2371 + @echo "NOT REBUILDING $@"
2372 +NetBSD_DISABLED_as.info: as.texinfo $(as_TEXINFOS)
2373 restore=: && backupdir="$(am__leading_dot)am$$$$" && \
2374 rm -rf $$backupdir && mkdir $$backupdir && \
2375 if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
2379 asconfig.texi: $(CONFIG).texi
2380 + @echo "NOT REBUILDING $@"
2381 +NetBSD_DISABLED_asconfig.texi:
2383 cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
2384 chmod u+w ./asconfig.texi
2386 # The sed command removes the no-adjust Nroff command so that
2387 # the man output looks standard.
2388 as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
2389 + @echo "NOT REBUILDING $@"
2390 +NetBSD_DISABLED_as.1:
2392 -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
2393 -($(POD2MAN) as.pod | \
2394 Binary files dist/gas/doc/as.info and dist.nbsd/gas/doc/as.info differ
2395 diff -rNU3 dist/gas/doc/c-mips.texi dist.nbsd/gas/doc/c-mips.texi
2396 --- dist/gas/doc/c-mips.texi Wed Nov 7 11:43:31 2012
2397 +++ dist.nbsd/gas/doc/c-mips.texi Wed Nov 7 11:13:46 2012
2398 @@ -196,6 +196,14 @@
2399 @itemx -mno-fix-vr4130
2400 Insert nops to work around the VR4130 @samp{mflo}/@samp{mfhi} errata.
2402 +@item -mfix-loongson2f-btb
2403 +@itemx -mno-fix-loongson2f-btb
2404 +Clear the Branch Target Buffer before any jump through a register. This
2405 +option is intended to be used on kernel code for the Loongson 2F processor
2406 +only; userland code compiled with this option will fault, and kernel code
2407 +compiled with this option run on another processor than Loongson 2F will
2408 +yield unpredictable results.
2412 Insert nops to work around the 24K @samp{eret}/@samp{deret} errata.
2413 diff -rNU3 dist/gas/remap.c dist.nbsd/gas/remap.c
2414 --- dist/gas/remap.c Wed Nov 7 11:43:31 2012
2415 +++ dist.nbsd/gas/remap.c Wed Nov 7 11:13:50 2012
2418 name = filename + map->old_len;
2419 name_len = strlen (name) + 1;
2420 - s = (char *) alloca (name_len + map->new_len);
2421 + s = (char *) xmalloc (name_len + map->new_len);
2422 memcpy (s, map->new_prefix, map->new_len);
2423 memcpy (s + map->new_len, name, name_len);
2424 - return xstrdup (s);
2427 diff -rNU3 dist/gprof/corefile.c dist.nbsd/gprof/corefile.c
2428 --- dist/gprof/corefile.c Wed Nov 7 11:43:28 2012
2429 +++ dist.nbsd/gprof/corefile.c Wed Nov 7 11:13:50 2012
2431 #include "corefile.h"
2432 #include "safe-ctype.h"
2434 +#include <stdlib.h>
2437 static int core_num_syms;
2438 static asymbol **core_syms;
2439 diff -rNU3 dist/gprof/gprof.1 dist.nbsd/gprof/gprof.1
2440 --- dist/gprof/gprof.1 Wed Nov 7 11:43:28 2012
2441 +++ dist.nbsd/gprof/gprof.1 Wed Nov 7 11:13:50 2012
2443 -.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
2444 +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
2446 .\" Standard preamble:
2447 .\" ========================================================================
2448 -.de Sh \" Subsection heading
2456 .de Sp \" Vertical space (when we can't use .PP)
2462 .\" If the F register is turned on, we'll generate index entries on stderr for
2463 -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
2464 +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
2465 .\" entries marked with X<> in POD. Of course, you'll have to process the
2466 .\" output yourself in some meaningful fashion.
2469 .\" ========================================================================
2472 -.TH GPROF 1 "2011-06-27" "binutils-2.21.1" "GNU"
2473 +.TH GPROF 1 "2011-09-24" "binutils-2.21.1" "GNU"
2474 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
2475 .\" way too many mistakes in technical documents.
2478 compilers have different mangling styles. The optional demangling style
2479 argument can be used to choose an appropriate demangling style for your
2481 -.Sh "Analysis Options"
2482 +.SS "Analysis Options"
2483 .IX Subsection "Analysis Options"
2484 .ie n .IP """\-a""" 4
2485 .el .IP "\f(CW\-a\fR" 4
2487 functions in the flat profile, even those that were never called, and
2488 that had no time spent in them. This is useful in conjunction with the
2489 \&\fB\-c\fR option for discovering which routines were never called.
2490 -.Sh "Miscellaneous Options"
2491 +.SS "Miscellaneous Options"
2492 .IX Subsection "Miscellaneous Options"
2493 .ie n .IP """\-d[\f(CInum\f(CW]""" 4
2494 .el .IP "\f(CW\-d[\f(CInum\f(CW]\fR" 4
2497 The \fB\-v\fR flag causes \f(CW\*(C`gprof\*(C'\fR to print the current version
2498 number, and then exit.
2499 -.Sh "Deprecated Options"
2500 +.SS "Deprecated Options"
2501 .IX Subsection "Deprecated Options"
2502 These options have been replaced with newer versions that use symspecs.
2503 .ie n .IP """\-e \f(CIfunction_name\f(CW""" 4
2504 diff -rNU3 dist/gprof/gprof.c dist.nbsd/gprof/gprof.c
2505 --- dist/gprof/gprof.c Wed Nov 7 11:43:28 2012
2506 +++ dist.nbsd/gprof/gprof.c Wed Nov 7 11:13:50 2012
2509 static void usage (FILE *, int) ATTRIBUTE_NORETURN;
2511 +#include <stdlib.h>
2513 const char * whoami;
2514 const char * function_mapping_file;
2515 static const char * external_symbol_table;
2516 Binary files dist/gprof/gprof.info and dist.nbsd/gprof/gprof.info differ
2517 diff -rNU3 dist/include/bfdlink.h dist.nbsd/include/bfdlink.h
2518 --- dist/include/bfdlink.h Wed Nov 7 11:43:28 2012
2519 +++ dist.nbsd/include/bfdlink.h Wed Nov 7 11:13:45 2012
2520 @@ -403,6 +403,10 @@
2521 option). If this is NULL, no symbols are being wrapped. */
2522 struct bfd_hash_table *wrap_hash;
2524 + /* Hash table of symbols which may be left unresolved during
2525 + a link. If this is NULL, no symbols can be left unresolved. */
2526 + struct bfd_hash_table *ignore_hash;
2528 /* The output BFD. */
2531 diff -rNU3 dist/include/opcode/mips.h dist.nbsd/include/opcode/mips.h
2532 --- dist/include/opcode/mips.h Wed Nov 7 11:43:28 2012
2533 +++ dist.nbsd/include/opcode/mips.h Wed Nov 7 11:13:45 2012
2534 @@ -768,7 +768,11 @@
2546 diff -rNU3 dist/ld/Makefile.am dist.nbsd/ld/Makefile.am
2547 --- dist/ld/Makefile.am Wed Nov 7 11:43:28 2012
2548 +++ dist.nbsd/ld/Makefile.am Wed Nov 7 11:13:51 2012
2549 @@ -144,11 +144,13 @@
2551 earmelf_linux_eabi.c \
2553 + earmelf_nbsd_eabi.c \
2557 earmelfb_linux_eabi.c \
2559 + earmelfb_nbsd_eabi.c \
2563 @@ -684,6 +686,11 @@
2564 $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
2565 $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2566 ${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
2567 +earmelf_nbsd_abi.c: $(srcdir)/emulparams/armelf_nbsd_abi.sh \
2568 + $(srcdir)/emulparams/armelf.sh \
2569 + $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
2570 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2571 + ${GENSCRIPTS} armelf_nbsd_abi "$(tdir_armelf_nbsd_abi)"
2572 earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
2573 $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
2574 $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
2575 @@ -711,6 +718,12 @@
2576 $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
2577 $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2578 ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
2579 +earmelfb_nbsd_abi.c: $(srcdir)/emulparams/armelfb_nbsd_abi.sh \
2580 + $(srcdir)/emulparams/armelf_nbsd_abi.sh \
2581 + $(srcdir)/emulparams/armelf.sh \
2582 + $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
2583 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2584 + ${GENSCRIPTS} armelfb_nbsd_abi "$(tdir_armelfb_nbsd_abi)"
2585 earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
2586 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
2587 ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
2588 @@ -2009,6 +2022,8 @@
2589 # because almost all configs use "gen" version of manual.
2590 # Set DOCVER above to change.
2591 configdoc.texi: ${DOCVER}-doc.texi
2592 + @echo "NOT REBUILDING $@"
2593 +NetBSD_DISABLED_configdoc.texi:
2594 cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
2595 chmod u+w ./configdoc.texi
2597 @@ -2016,6 +2031,8 @@
2598 # The sed command removes the no-adjust Nroff command so that
2599 # the man output looks standard.
2600 ld.1: $(srcdir)/ld.texinfo configdoc.texi
2601 + @echo "NOT REBUILDING $@"
2602 +NetBSD_DISABLED_ld.1:
2604 -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
2605 -($(POD2MAN) ld.pod | \
2606 diff -rNU3 dist/ld/Makefile.in dist.nbsd/ld/Makefile.in
2607 --- dist/ld/Makefile.in Wed Nov 7 11:43:28 2012
2608 +++ dist.nbsd/ld/Makefile.in Wed Nov 7 11:13:51 2012
2609 @@ -449,11 +449,13 @@
2611 earmelf_linux_eabi.c \
2613 + earmelf_nbsd_eabi.c \
2617 earmelfb_linux_eabi.c \
2619 + earmelfb_nbsd_eabi.c \
2623 @@ -1031,11 +1033,13 @@
2624 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Po@am__quote@
2625 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Po@am__quote@
2626 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Po@am__quote@
2627 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd_abi.Po@am__quote@
2628 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_vxworks.Po@am__quote@
2629 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb.Po@am__quote@
2630 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux.Po@am__quote@
2631 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_eabi.Po@am__quote@
2632 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd.Po@am__quote@
2633 +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd_eabi.Po@am__quote@
2634 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnbsd.Po@am__quote@
2635 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnto.Po@am__quote@
2636 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmpe.Po@am__quote@
2637 @@ -1415,6 +1419,8 @@
2638 -rm -f libtool config.lt
2640 ld.info: ld.texinfo $(ld_TEXINFOS)
2641 + @echo "NOT REBUILDING $@"
2642 +NetBSD_DISABLED_ld.info: ld.texinfo $(ld_TEXINFOS)
2643 restore=: && backupdir="$(am__leading_dot)am$$$$" && \
2644 rm -rf $$backupdir && mkdir $$backupdir && \
2645 if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
2646 @@ -2119,6 +2125,11 @@
2647 $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
2648 $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2649 ${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
2650 +earmelf_nbsd_eabi.c: $(srcdir)/emulparams/armelf_nbsd_eabi.sh \
2651 + $(srcdir)/emulparams/armelf.sh \
2652 + $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
2653 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2654 + ${GENSCRIPTS} armelf_nbsd_eabi "$(tdir_armelf_nbsd_eabi)"
2655 earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
2656 $(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
2657 $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
2658 @@ -2146,6 +2157,12 @@
2659 $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
2660 $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2661 ${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
2662 +earmelfb_nbsd_eabi.c: $(srcdir)/emulparams/armelfb_nbsd_eabi.sh \
2663 + $(srcdir)/emulparams/armelf_nbsd_eabi.sh \
2664 + $(srcdir)/emulparams/armelf.sh \
2665 + $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
2666 + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
2667 + ${GENSCRIPTS} armelfb_nbsd_eabi "$(tdir_armelfb_nbsd_eabi)"
2668 earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
2669 $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
2670 ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
2671 @@ -3387,6 +3404,8 @@
2672 # because almost all configs use "gen" version of manual.
2673 # Set DOCVER above to change.
2674 configdoc.texi: ${DOCVER}-doc.texi
2675 + @echo "NOT REBUILDING $@"
2676 +NetBSD_DISABLED_configdoc.texi:
2677 cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
2678 chmod u+w ./configdoc.texi
2680 @@ -3394,6 +3413,8 @@
2681 # The sed command removes the no-adjust Nroff command so that
2682 # the man output looks standard.
2683 ld.1: $(srcdir)/ld.texinfo configdoc.texi
2684 + @echo "NOT REBUILDING $@"
2685 +NetBSD_DISABLED_ld.1:
2687 -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
2688 -($(POD2MAN) ld.pod | \
2689 diff -rNU3 dist/ld/configure.tgt dist.nbsd/ld/configure.tgt
2690 --- dist/ld/configure.tgt Wed Nov 7 11:43:28 2012
2691 +++ dist.nbsd/ld/configure.tgt Wed Nov 7 11:13:51 2012
2693 arm-*-freebsd* | arm-*-kfreebsd*-gnu)
2694 targ_emul=armelf_fbsd
2695 targ_extra_emuls="armelf" ;;
2696 +armeb-*-netbsdelf*-eabi*)
2697 + targ_emul=armelfb_nbsd_eabi;
2698 + targ_extra_emuls="armelf_nbsd_eabi armelf armnbsd" ;;
2699 +arm-*-netbsdelf*-eabi*) targ_emul=armelf_nbsd_eabi;
2700 + targ_extra_emuls="armelfb_nbsd_eabi armelf armnbsd" ;;
2701 armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
2702 targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
2703 arm-*-netbsdelf*) targ_emul=armelf_nbsd;
2704 @@ -379,12 +384,18 @@
2705 mips*-sgi-irix*) targ_emul=mipsbig ;;
2706 mips*el-*-ecoff*) targ_emul=mipsidtl ;;
2707 mips*-*-ecoff*) targ_emul=mipsidt ;;
2708 +mips64*el-*-netbsd*) targ_emul=elf32ltsmipn32
2709 + targ_extra_emuls="elf64btsmip elf64ltsmip elf32ltsmip elf32btsmipn32 elf32btsmip"
2711 +mips64*-*-netbsd*) targ_emul=elf32btsmipn32
2712 + targ_extra_emuls="elf64ltsmip elf64btsmip elf32btsmip elf32ltsmipn32 elf32ltsmip"
2714 mips*el-*-netbsd*) targ_emul=elf32ltsmip
2715 targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
2717 mips*-*-netbsd*) targ_emul=elf32btsmip
2718 targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
2721 mips*-*-bsd*) targ_emul=mipsbig ;;
2722 mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;;
2723 mips*vr4300-*-elf*) targ_emul=elf32b4300 ;;
2724 @@ -600,10 +611,15 @@
2725 tdir_sparclinux=${targ_alias}aout
2726 tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
2727 tdir_sun4=sparc-sun-sunos4 ;;
2728 -sparc64-*-netbsd* | sparc64-*-openbsd*)
2729 - targ_emul=elf64_sparc
2730 - targ_extra_emuls="elf32_sparc" ;;
2731 -sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;;
2732 +sparc64-*-netbsd*) targ_emul=elf64_sparc
2733 + targ_extra_emuls="elf32_sparc sparcnbsd"
2735 +sparc64-*-openbsd*) targ_emul=elf64_sparc
2736 + targ_extra_emuls="elf32_sparc"
2738 +sparc*-*-netbsd*elf*) targ_emul=elf32_sparc
2739 + targ_extra_emuls=sparcnbsd
2741 sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
2742 sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
2743 targ_emul=elf32_sparc_sol2
2744 diff -rNU3 dist/ld/emulparams/armelf_nbsd.sh dist.nbsd/ld/emulparams/armelf_nbsd.sh
2745 --- dist/ld/emulparams/armelf_nbsd.sh Wed Nov 7 11:43:28 2012
2746 +++ dist.nbsd/ld/emulparams/armelf_nbsd.sh Wed Nov 7 11:13:50 2012
2748 TEXT_START_ADDR=0x00008000
2749 TARGET2_TYPE=got-rel
2751 +unset DATA_START_SYMBOLS
2756 + arm*-*-netbsdelf*-eabi*)
2757 + LIB_PATH='=/usr/lib/oabi'
2760 diff -rNU3 dist/ld/emulparams/armelf_nbsd_eabi.sh dist.nbsd/ld/emulparams/armelf_nbsd_eabi.sh
2761 --- dist/ld/emulparams/armelf_nbsd_eabi.sh Thu Jan 1 00:00:00 1970
2762 +++ dist.nbsd/ld/emulparams/armelf_nbsd_eabi.sh Wed Nov 7 11:13:50 2012
2764 +. ${srcdir}/emulparams/armelf_nbsd.sh
2766 +# Use the ARM ABI-compliant exception-handling sections.
2767 +OTHER_READONLY_SECTIONS="
2768 + .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
2769 + ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
2770 + .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
2771 + ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }"
2776 + arm*-*-netbsdelf*-eabi*)
2778 + arm*-*-netbsdelf*)
2779 + LIB_PATH='=/usr/lib/eabi'
2782 diff -rNU3 dist/ld/emulparams/armelfb_nbsd_eabi.sh dist.nbsd/ld/emulparams/armelfb_nbsd_eabi.sh
2783 --- dist/ld/emulparams/armelfb_nbsd_eabi.sh Thu Jan 1 00:00:00 1970
2784 +++ dist.nbsd/ld/emulparams/armelfb_nbsd_eabi.sh Wed Nov 7 11:13:50 2012
2786 +. ${srcdir}/emulparams/armelf_nbsd_eabi.sh
2787 +OUTPUT_FORMAT="elf32-bigarm"
2788 diff -rNU3 dist/ld/emulparams/elf32_sparc.sh dist.nbsd/ld/emulparams/elf32_sparc.sh
2789 --- dist/ld/emulparams/elf32_sparc.sh Wed Nov 7 11:43:28 2012
2790 +++ dist.nbsd/ld/emulparams/elf32_sparc.sh Wed Nov 7 11:13:50 2012
2794 GENERATE_SHLIB_SCRIPT=yes
2796 GENERATE_PIE_SCRIPT=yes
2799 diff -rNU3 dist/ld/emulparams/elf32bmipn32-defs.sh dist.nbsd/ld/emulparams/elf32bmipn32-defs.sh
2800 --- dist/ld/emulparams/elf32bmipn32-defs.sh Wed Nov 7 11:43:28 2012
2801 +++ dist.nbsd/ld/emulparams/elf32bmipn32-defs.sh Wed Nov 7 11:13:50 2012
2804 # Handle both big- and little-ended 32-bit MIPS objects.
2807 OUTPUT_FORMAT="elf32-bigmips"
2808 BIG_OUTPUT_FORMAT="elf32-bigmips"
2809 LITTLE_OUTPUT_FORMAT="elf32-littlemips"
2810 diff -rNU3 dist/ld/emulparams/elf64alpha_nbsd.sh dist.nbsd/ld/emulparams/elf64alpha_nbsd.sh
2811 --- dist/ld/emulparams/elf64alpha_nbsd.sh Wed Nov 7 11:43:28 2012
2812 +++ dist.nbsd/ld/emulparams/elf64alpha_nbsd.sh Wed Nov 7 11:13:50 2012
2814 . ${srcdir}/emulparams/elf64alpha.sh
2818 +# XXX binutils 2.13
2819 +# Note that the number is always big-endian, thus we have to
2820 +# reverse the digit string.
2821 +#NOP=0x0000fe2f1f04ff47 # unop; nop
2822 diff -rNU3 dist/ld/emulparams/elf_i386.sh dist.nbsd/ld/emulparams/elf_i386.sh
2823 --- dist/ld/emulparams/elf_i386.sh Wed Nov 7 11:43:28 2012
2824 +++ dist.nbsd/ld/emulparams/elf_i386.sh Wed Nov 7 11:13:50 2012
2828 GENERATE_SHLIB_SCRIPT=yes
2830 GENERATE_PIE_SCRIPT=yes
2837 + LIB_PATH='=/usr/lib/i386'
2840 diff -rNU3 dist/ld/emulparams/hppalinux.sh dist.nbsd/ld/emulparams/hppalinux.sh
2841 --- dist/ld/emulparams/hppalinux.sh Wed Nov 7 11:43:28 2012
2842 +++ dist.nbsd/ld/emulparams/hppalinux.sh Wed Nov 7 11:13:50 2012
2844 # If you change this file, please also look at files which source this one:
2846 +# hppanbsd.sh hppaobsd.sh
2850 diff -rNU3 dist/ld/emulparams/hppaobsd.sh dist.nbsd/ld/emulparams/hppaobsd.sh
2851 --- dist/ld/emulparams/hppaobsd.sh Wed Nov 7 11:43:28 2012
2852 +++ dist.nbsd/ld/emulparams/hppaobsd.sh Wed Nov 7 11:13:50 2012
2854 -. ${srcdir}/emulparams/hppanbsd.sh
2855 +. ${srcdir}/emulparams/hppalinux.sh
2857 OUTPUT_FORMAT="elf32-hppa"
2858 TEXT_START_ADDR=0x1000
2859 diff -rNU3 dist/ld/emulparams/m68kelf.sh dist.nbsd/ld/emulparams/m68kelf.sh
2860 --- dist/ld/emulparams/m68kelf.sh Wed Nov 7 11:43:28 2012
2861 +++ dist.nbsd/ld/emulparams/m68kelf.sh Wed Nov 7 11:13:50 2012
2864 EXTRA_EM_FILE=m68kelf
2865 GENERATE_SHLIB_SCRIPT=yes
2867 GENERATE_PIE_SCRIPT=yes
2869 diff -rNU3 dist/ld/emulparams/m68kelfnbsd.sh dist.nbsd/ld/emulparams/m68kelfnbsd.sh
2870 --- dist/ld/emulparams/m68kelfnbsd.sh Wed Nov 7 11:43:28 2012
2871 +++ dist.nbsd/ld/emulparams/m68kelfnbsd.sh Wed Nov 7 11:13:50 2012
2873 . ${srcdir}/emulparams/m68kelf.sh
2874 TEXT_START_ADDR=0x2000
2875 TARGET_PAGE_SIZE=0x2000
2877 +NONPAGED_TEXT_START_ADDR=${TEXT_START_ADDR}
2878 diff -rNU3 dist/ld/emulparams/sh.sh dist.nbsd/ld/emulparams/sh.sh
2879 --- dist/ld/emulparams/sh.sh Wed Nov 7 11:43:28 2012
2880 +++ dist.nbsd/ld/emulparams/sh.sh Wed Nov 7 11:13:50 2012
2884 OUTPUT_FORMAT="coff-sh"
2885 -TEXT_START_ADDR=0x8000
2886 -TARGET_PAGE_SIZE=128
2887 +TEXT_START_ADDR=0x1000
2888 +TARGET_PAGE_SIZE=0x1000
2890 diff -rNU3 dist/ld/emulparams/shelf_nbsd.sh dist.nbsd/ld/emulparams/shelf_nbsd.sh
2891 --- dist/ld/emulparams/shelf_nbsd.sh Wed Nov 7 11:43:28 2012
2892 +++ dist.nbsd/ld/emulparams/shelf_nbsd.sh Wed Nov 7 11:13:50 2012
2895 DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
2901 unset OTHER_SECTIONS
2903 +OTHER_READWRITE_SECTIONS='
2904 + .note.ABI-tag : { *(.note.ABI-tag) }
2906 diff -rNU3 dist/ld/ldlex.c dist.nbsd/ld/ldlex.c
2907 --- dist/ld/ldlex.c Wed Nov 7 11:43:28 2012
2908 +++ dist.nbsd/ld/ldlex.c Wed Nov 7 11:13:50 2012
2910 /* First, we deal with platform-specific or compiler-specific issues. */
2912 /* begin standard C headers. */
2914 +#include "namespace.h"
2921 /* end standard C headers. */
2923 +/* $NetBSD: ldlex.c,v 1.2 2011/09/25 04:32:43 christos Exp $ */
2925 /* flex integer type definitions */
2928 @@ -152,13 +157,8 @@
2929 typedef struct yy_buffer_state *YY_BUFFER_STATE;
2932 -#ifndef YY_TYPEDEF_YY_SIZE_T
2933 -#define YY_TYPEDEF_YY_SIZE_T
2934 -typedef size_t yy_size_t;
2938 -extern yy_size_t yyleng;
2940 extern FILE *yyin, *yyout;
2942 #define EOB_ACT_CONTINUE_SCAN 0
2943 @@ -183,6 +183,11 @@
2945 #define unput(c) yyunput( c, (yytext_ptr) )
2947 +#ifndef YY_TYPEDEF_YY_SIZE_T
2948 +#define YY_TYPEDEF_YY_SIZE_T
2949 +typedef size_t yy_size_t;
2952 #ifndef YY_STRUCT_YY_BUFFER_STATE
2953 #define YY_STRUCT_YY_BUFFER_STATE
2954 struct yy_buffer_state
2956 /* Number of characters read into yy_ch_buf, not including EOB
2959 - yy_size_t yy_n_chars;
2962 /* Whether we "own" the buffer - i.e., we know we created it,
2963 * and can realloc() it to grow it, and should free() it to
2966 /* yy_hold_char holds the character lost when yytext is formed. */
2967 static char yy_hold_char;
2968 -static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
2970 +static int yy_n_chars; /* number of characters read into yy_ch_buf */
2973 /* Points to current character in buffer. */
2974 static char *yy_c_buf_p = (char *) 0;
2977 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
2978 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
2979 -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
2980 +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
2982 void *yyalloc (yy_size_t );
2983 void *yyrealloc (void *,yy_size_t );
2985 static yy_state_type yy_get_previous_state (void );
2986 static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
2987 static int yy_get_next_buffer (void );
2988 +#if defined(__GNUC__) && __GNUC__ >= 3
2989 +__attribute__((__noreturn__))
2991 static void yy_fatal_error (yyconst char msg[] );
2993 /* Done after the current pattern has been matched and before the
2994 @@ -1621,10 +1629,6 @@
2996 #define YY_INPUT(buf,result,max_size) result = yy_input (buf, max_size)
2998 -#ifndef YY_NO_UNPUT
2999 -#define YY_NO_UNPUT
3002 #define MAX_INCLUDE_DEPTH 10
3003 static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
3004 static const char *file_name_stack[MAX_INCLUDE_DEPTH];
3005 @@ -1660,7 +1664,7 @@
3009 -#line 1664 "ldlex.c"
3010 +#line 1668 "ldlex.c"
3014 @@ -1701,19 +1705,19 @@
3016 FILE *yyget_in (void );
3018 -void yyset_in (FILE * in_str );
3019 +void yyset_in (FILE * _in_str );
3021 FILE *yyget_out (void );
3023 -void yyset_out (FILE * out_str );
3024 +void yyset_out (FILE * _out_str );
3026 -yy_size_t yyget_leng (void );
3027 +int yyget_leng (void );
3029 char *yyget_text (void );
3031 int yyget_lineno (void );
3033 -void yyset_lineno (int line_number );
3034 +void yyset_lineno (int _line_number );
3036 /* Macros after this point can all be overridden by user definitions in
3038 @@ -1727,6 +1731,10 @@
3042 +#ifndef YY_NO_UNPUT
3047 static void yy_flex_strncpy (char *,yyconst char *,int );
3049 @@ -1766,7 +1774,7 @@
3050 if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
3055 for ( n = 0; n < max_size && \
3056 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
3057 buf[n] = (char) c; \
3058 @@ -1848,7 +1856,7 @@
3059 register char *yy_cp, *yy_bp;
3060 register int yy_act;
3062 -#line 120 "ldlex.l"
3063 +#line 118 "ldlex.l"
3066 if (parser_input != input_selected)
3067 @@ -1867,7 +1875,7 @@
3071 -#line 1871 "ldlex.c"
3072 +#line 1879 "ldlex.c"
3076 @@ -1952,32 +1960,32 @@
3080 -#line 138 "ldlex.l"
3081 +#line 136 "ldlex.l"
3086 -#line 141 "ldlex.l"
3087 +#line 139 "ldlex.l"
3092 -#line 142 "ldlex.l"
3093 +#line 140 "ldlex.l"
3098 -#line 143 "ldlex.l"
3099 +#line 141 "ldlex.l"
3100 { yylval.name = xstrdup (yytext); return NAME; }
3104 -#line 144 "ldlex.l"
3105 +#line 142 "ldlex.l"
3110 -#line 146 "ldlex.l"
3111 +#line 144 "ldlex.l"
3113 yylval.integer = bfd_scan_vma (yytext + 1, 0, 16);
3114 yylval.bigint.str = NULL;
3115 @@ -1986,7 +1994,7 @@
3119 -#line 152 "ldlex.l"
3120 +#line 150 "ldlex.l"
3123 switch (yytext[yyleng - 1]) {
3124 @@ -2015,7 +2023,7 @@
3128 -#line 177 "ldlex.l"
3129 +#line 175 "ldlex.l"
3133 @@ -2048,794 +2056,794 @@
3137 -#line 206 "ldlex.l"
3138 +#line 204 "ldlex.l"
3143 -#line 207 "ldlex.l"
3144 +#line 205 "ldlex.l"
3149 -#line 208 "ldlex.l"
3150 +#line 206 "ldlex.l"
3151 { RTOKEN(LSHIFTEQ);}
3155 -#line 209 "ldlex.l"
3156 +#line 207 "ldlex.l"
3157 { RTOKEN(RSHIFTEQ);}
3161 -#line 210 "ldlex.l"
3162 +#line 208 "ldlex.l"
3167 -#line 211 "ldlex.l"
3168 +#line 209 "ldlex.l"
3173 -#line 212 "ldlex.l"
3174 +#line 210 "ldlex.l"
3179 -#line 213 "ldlex.l"
3180 +#line 211 "ldlex.l"
3185 -#line 214 "ldlex.l"
3186 +#line 212 "ldlex.l"
3191 -#line 215 "ldlex.l"
3192 +#line 213 "ldlex.l"
3197 -#line 216 "ldlex.l"
3198 +#line 214 "ldlex.l"
3203 -#line 217 "ldlex.l"
3204 +#line 215 "ldlex.l"
3209 -#line 218 "ldlex.l"
3210 +#line 216 "ldlex.l"
3215 -#line 219 "ldlex.l"
3216 +#line 217 "ldlex.l"
3221 -#line 220 "ldlex.l"
3222 +#line 218 "ldlex.l"
3227 -#line 221 "ldlex.l"
3228 +#line 219 "ldlex.l"
3233 -#line 222 "ldlex.l"
3234 +#line 220 "ldlex.l"
3239 -#line 223 "ldlex.l"
3240 +#line 221 "ldlex.l"
3245 -#line 224 "ldlex.l"
3246 +#line 222 "ldlex.l"
3251 -#line 225 "ldlex.l"
3252 +#line 223 "ldlex.l"
3257 -#line 226 "ldlex.l"
3258 +#line 224 "ldlex.l"
3263 -#line 227 "ldlex.l"
3264 +#line 225 "ldlex.l"
3269 -#line 228 "ldlex.l"
3270 +#line 226 "ldlex.l"
3275 -#line 229 "ldlex.l"
3276 +#line 227 "ldlex.l"
3281 -#line 230 "ldlex.l"
3282 +#line 228 "ldlex.l"
3287 -#line 231 "ldlex.l"
3288 +#line 229 "ldlex.l"
3293 -#line 232 "ldlex.l"
3294 +#line 230 "ldlex.l"
3299 -#line 233 "ldlex.l"
3300 +#line 231 "ldlex.l"
3305 -#line 234 "ldlex.l"
3306 +#line 232 "ldlex.l"
3311 -#line 235 "ldlex.l"
3312 +#line 233 "ldlex.l"
3317 -#line 236 "ldlex.l"
3318 +#line 234 "ldlex.l"
3323 -#line 237 "ldlex.l"
3324 +#line 235 "ldlex.l"
3329 -#line 238 "ldlex.l"
3330 +#line 236 "ldlex.l"
3335 -#line 239 "ldlex.l"
3336 +#line 237 "ldlex.l"
3341 -#line 240 "ldlex.l"
3342 +#line 238 "ldlex.l"
3347 -#line 241 "ldlex.l"
3348 +#line 239 "ldlex.l"
3353 -#line 242 "ldlex.l"
3354 +#line 240 "ldlex.l"
3359 -#line 243 "ldlex.l"
3360 +#line 241 "ldlex.l"
3365 -#line 244 "ldlex.l"
3366 +#line 242 "ldlex.l"
3371 -#line 245 "ldlex.l"
3372 +#line 243 "ldlex.l"
3373 { RTOKEN(REGION_ALIAS);}
3377 -#line 246 "ldlex.l"
3378 +#line 244 "ldlex.l"
3379 { RTOKEN(LD_FEATURE);}
3383 -#line 247 "ldlex.l"
3384 +#line 245 "ldlex.l"
3389 -#line 248 "ldlex.l"
3390 +#line 246 "ldlex.l"
3391 { RTOKEN(VERSIONK);}
3395 -#line 249 "ldlex.l"
3396 +#line 247 "ldlex.l"
3401 -#line 250 "ldlex.l"
3402 +#line 248 "ldlex.l"
3407 -#line 251 "ldlex.l"
3408 +#line 249 "ldlex.l"
3413 -#line 252 "ldlex.l"
3414 +#line 250 "ldlex.l"
3419 -#line 253 "ldlex.l"
3420 +#line 251 "ldlex.l"
3421 { RTOKEN(DATA_SEGMENT_ALIGN);}
3425 -#line 254 "ldlex.l"
3426 +#line 252 "ldlex.l"
3427 { RTOKEN(DATA_SEGMENT_RELRO_END);}
3431 -#line 255 "ldlex.l"
3432 +#line 253 "ldlex.l"
3433 { RTOKEN(DATA_SEGMENT_END);}
3437 -#line 256 "ldlex.l"
3438 +#line 254 "ldlex.l"
3443 -#line 257 "ldlex.l"
3444 +#line 255 "ldlex.l"
3445 { RTOKEN(LOADADDR);}
3449 -#line 258 "ldlex.l"
3450 +#line 256 "ldlex.l"
3451 { RTOKEN(ALIGNOF); }
3455 -#line 259 "ldlex.l"
3456 +#line 257 "ldlex.l"
3461 -#line 260 "ldlex.l"
3462 +#line 258 "ldlex.l"
3467 -#line 261 "ldlex.l"
3468 +#line 259 "ldlex.l"
3469 { RTOKEN(ASSERT_K); }
3473 -#line 262 "ldlex.l"
3474 +#line 260 "ldlex.l"
3479 -#line 263 "ldlex.l"
3480 +#line 261 "ldlex.l"
3485 -#line 264 "ldlex.l"
3486 +#line 262 "ldlex.l"
3491 -#line 265 "ldlex.l"
3492 +#line 263 "ldlex.l"
3493 { RTOKEN(SIZEOF_HEADERS);}
3497 -#line 266 "ldlex.l"
3498 +#line 264 "ldlex.l"
3499 { RTOKEN(SIZEOF_HEADERS);}
3503 -#line 267 "ldlex.l"
3504 +#line 265 "ldlex.l"
3505 { RTOKEN(SEGMENT_START);}
3509 -#line 268 "ldlex.l"
3510 +#line 266 "ldlex.l"
3515 -#line 269 "ldlex.l"
3516 +#line 267 "ldlex.l"
3521 -#line 270 "ldlex.l"
3522 +#line 268 "ldlex.l"
3523 { RTOKEN(TARGET_K);}
3527 -#line 271 "ldlex.l"
3528 +#line 269 "ldlex.l"
3529 { RTOKEN(SEARCH_DIR);}
3533 -#line 272 "ldlex.l"
3534 +#line 270 "ldlex.l"
3539 -#line 273 "ldlex.l"
3540 +#line 271 "ldlex.l"
3545 -#line 274 "ldlex.l"
3546 +#line 272 "ldlex.l"
3551 -#line 275 "ldlex.l"
3552 +#line 273 "ldlex.l"
3553 { RTOKEN(AS_NEEDED);}
3557 -#line 276 "ldlex.l"
3558 +#line 274 "ldlex.l"
3563 -#line 277 "ldlex.l"
3564 +#line 275 "ldlex.l"
3565 { RTOKEN(CREATE_OBJECT_SYMBOLS);}
3569 -#line 278 "ldlex.l"
3570 +#line 276 "ldlex.l"
3571 { RTOKEN( CONSTRUCTORS);}
3575 -#line 279 "ldlex.l"
3576 +#line 277 "ldlex.l"
3577 { RTOKEN(FORCE_COMMON_ALLOCATION);}
3581 -#line 280 "ldlex.l"
3582 +#line 278 "ldlex.l"
3583 { RTOKEN(INHIBIT_COMMON_ALLOCATION);}
3587 -#line 281 "ldlex.l"
3588 +#line 279 "ldlex.l"
3589 { RTOKEN(SECTIONS);}
3593 -#line 282 "ldlex.l"
3594 +#line 280 "ldlex.l"
3595 { RTOKEN(INSERT_K);}
3599 -#line 283 "ldlex.l"
3600 +#line 281 "ldlex.l"
3605 -#line 284 "ldlex.l"
3606 +#line 282 "ldlex.l"
3611 -#line 285 "ldlex.l"
3612 +#line 283 "ldlex.l"
3617 -#line 286 "ldlex.l"
3618 +#line 284 "ldlex.l"
3623 -#line 287 "ldlex.l"
3624 +#line 285 "ldlex.l"
3625 { RTOKEN(OUTPUT_FORMAT);}
3629 -#line 288 "ldlex.l"
3630 +#line 286 "ldlex.l"
3631 { RTOKEN( OUTPUT_ARCH);}
3635 -#line 289 "ldlex.l"
3636 +#line 287 "ldlex.l"
3641 -#line 290 "ldlex.l"
3642 +#line 288 "ldlex.l"
3647 -#line 291 "ldlex.l"
3648 +#line 289 "ldlex.l"
3653 -#line 292 "ldlex.l"
3654 +#line 290 "ldlex.l"
3659 -#line 293 "ldlex.l"
3660 +#line 291 "ldlex.l"
3665 -#line 294 "ldlex.l"
3666 +#line 292 "ldlex.l"
3671 -#line 295 "ldlex.l"
3672 +#line 293 "ldlex.l"
3677 -#line 296 "ldlex.l"
3678 +#line 294 "ldlex.l"
3683 -#line 297 "ldlex.l"
3684 +#line 295 "ldlex.l"
3689 -#line 298 "ldlex.l"
3690 +#line 296 "ldlex.l"
3691 { RTOKEN(NOCROSSREFS);}
3695 -#line 299 "ldlex.l"
3696 +#line 297 "ldlex.l"
3697 { RTOKEN(OVERLAY); }
3701 -#line 300 "ldlex.l"
3702 +#line 298 "ldlex.l"
3703 { RTOKEN(SORT_BY_NAME); }
3707 -#line 301 "ldlex.l"
3708 +#line 299 "ldlex.l"
3709 { RTOKEN(SORT_BY_ALIGNMENT); }
3713 -#line 302 "ldlex.l"
3714 +#line 300 "ldlex.l"
3715 { RTOKEN(SORT_BY_NAME); }
3719 -#line 303 "ldlex.l"
3720 +#line 301 "ldlex.l"
3725 -#line 304 "ldlex.l"
3726 +#line 302 "ldlex.l"
3731 -#line 305 "ldlex.l"
3732 +#line 303 "ldlex.l"
3737 -#line 306 "ldlex.l"
3738 +#line 304 "ldlex.l"
3743 -#line 307 "ldlex.l"
3744 +#line 305 "ldlex.l"
3749 -#line 308 "ldlex.l"
3750 +#line 306 "ldlex.l"
3751 { RTOKEN(ONLY_IF_RO); }
3755 -#line 309 "ldlex.l"
3756 +#line 307 "ldlex.l"
3757 { RTOKEN(ONLY_IF_RW); }
3761 -#line 310 "ldlex.l"
3762 +#line 308 "ldlex.l"
3763 { RTOKEN(SPECIAL); }
3767 -#line 311 "ldlex.l"
3768 +#line 309 "ldlex.l"
3773 -#line 312 "ldlex.l"
3774 +#line 310 "ldlex.l"
3779 -#line 313 "ldlex.l"
3780 +#line 311 "ldlex.l"
3785 -#line 314 "ldlex.l"
3786 +#line 312 "ldlex.l"
3791 -#line 315 "ldlex.l"
3792 +#line 313 "ldlex.l"
3797 -#line 316 "ldlex.l"
3798 +#line 314 "ldlex.l"
3803 -#line 317 "ldlex.l"
3804 +#line 315 "ldlex.l"
3809 -#line 318 "ldlex.l"
3810 +#line 316 "ldlex.l"
3811 { RTOKEN(SUBALIGN);}
3815 -#line 319 "ldlex.l"
3816 +#line 317 "ldlex.l"
3817 { RTOKEN(PROVIDE); }
3821 -#line 320 "ldlex.l"
3822 +#line 318 "ldlex.l"
3823 { RTOKEN(PROVIDE_HIDDEN); }
3827 -#line 321 "ldlex.l"
3828 +#line 319 "ldlex.l"
3833 -#line 322 "ldlex.l"
3834 +#line 320 "ldlex.l"
3835 { RTOKEN(EXCLUDE_FILE); }
3839 -#line 323 "ldlex.l"
3840 +#line 321 "ldlex.l"
3841 { RTOKEN(CONSTANT);}
3844 /* rule 127 can match eol */
3846 -#line 324 "ldlex.l"
3847 +#line 322 "ldlex.l"
3851 /* rule 128 can match eol */
3853 -#line 325 "ldlex.l"
3854 +#line 323 "ldlex.l"
3855 { ++ lineno; RTOKEN(NEWLINE); }
3859 -#line 326 "ldlex.l"
3860 +#line 324 "ldlex.l"
3861 { /* Mri comment line */ }
3865 -#line 327 "ldlex.l"
3866 +#line 325 "ldlex.l"
3867 { /* Mri comment line */ }
3871 -#line 328 "ldlex.l"
3872 +#line 326 "ldlex.l"
3873 { RTOKEN(ENDWORD); }
3877 -#line 329 "ldlex.l"
3878 +#line 327 "ldlex.l"
3879 { RTOKEN(ALIGNMOD);}
3883 -#line 330 "ldlex.l"
3884 +#line 328 "ldlex.l"
3889 -#line 331 "ldlex.l"
3890 +#line 329 "ldlex.l"
3895 -#line 332 "ldlex.l"
3896 +#line 330 "ldlex.l"
3901 -#line 333 "ldlex.l"
3902 +#line 331 "ldlex.l"
3907 -#line 334 "ldlex.l"
3908 +#line 332 "ldlex.l"
3909 { RTOKEN(TRUNCATE); }
3913 -#line 335 "ldlex.l"
3914 +#line 333 "ldlex.l"
3919 -#line 336 "ldlex.l"
3920 +#line 334 "ldlex.l"
3925 -#line 337 "ldlex.l"
3926 +#line 335 "ldlex.l"
3931 -#line 338 "ldlex.l"
3932 +#line 336 "ldlex.l"
3933 { RTOKEN(NAMEWORD); }
3937 -#line 339 "ldlex.l"
3938 +#line 337 "ldlex.l"
3943 -#line 340 "ldlex.l"
3944 +#line 338 "ldlex.l"
3949 -#line 341 "ldlex.l"
3950 +#line 339 "ldlex.l"
3955 -#line 342 "ldlex.l"
3956 +#line 340 "ldlex.l"
3957 { RTOKEN(LIST); /* LIST and ignore to end of line */ }
3961 -#line 343 "ldlex.l"
3962 +#line 341 "ldlex.l"
3967 -#line 344 "ldlex.l"
3968 +#line 342 "ldlex.l"
3969 { RTOKEN(ABSOLUTE); }
3973 -#line 345 "ldlex.l"
3974 +#line 343 "ldlex.l"
3975 { RTOKEN(ENDWORD); }
3979 -#line 346 "ldlex.l"
3980 +#line 344 "ldlex.l"
3981 { RTOKEN(ALIGNMOD);}
3985 -#line 347 "ldlex.l"
3986 +#line 345 "ldlex.l"
3991 -#line 348 "ldlex.l"
3992 +#line 346 "ldlex.l"
3997 -#line 349 "ldlex.l"
3998 +#line 347 "ldlex.l"
4003 -#line 350 "ldlex.l"
4004 +#line 348 "ldlex.l"
4009 -#line 351 "ldlex.l"
4010 +#line 349 "ldlex.l"
4011 { RTOKEN(TRUNCATE); }
4015 -#line 352 "ldlex.l"
4016 +#line 350 "ldlex.l"
4021 -#line 353 "ldlex.l"
4022 +#line 351 "ldlex.l"
4027 -#line 354 "ldlex.l"
4028 +#line 352 "ldlex.l"
4033 -#line 355 "ldlex.l"
4034 +#line 353 "ldlex.l"
4035 { RTOKEN(NAMEWORD); }
4039 -#line 356 "ldlex.l"
4040 +#line 354 "ldlex.l"
4045 -#line 357 "ldlex.l"
4046 +#line 355 "ldlex.l"
4051 -#line 358 "ldlex.l"
4052 +#line 356 "ldlex.l"
4057 -#line 359 "ldlex.l"
4058 +#line 357 "ldlex.l"
4063 -#line 360 "ldlex.l"
4064 +#line 358 "ldlex.l"
4065 { RTOKEN(LIST); /* LIST and ignore to end of line */ }
4069 -#line 361 "ldlex.l"
4070 +#line 359 "ldlex.l"
4075 -#line 362 "ldlex.l"
4076 +#line 360 "ldlex.l"
4077 { RTOKEN(ABSOLUTE); }
4081 -#line 364 "ldlex.l"
4082 +#line 362 "ldlex.l"
4084 /* Filename without commas, needed to parse mri stuff */
4085 yylval.name = xstrdup (yytext);
4086 @@ -2844,7 +2852,7 @@
4090 -#line 371 "ldlex.l"
4091 +#line 369 "ldlex.l"
4093 yylval.name = xstrdup (yytext);
4095 @@ -2852,7 +2860,7 @@
4099 -#line 375 "ldlex.l"
4100 +#line 373 "ldlex.l"
4102 yylval.name = xstrdup (yytext + 2);
4104 @@ -2860,7 +2868,7 @@
4108 -#line 379 "ldlex.l"
4109 +#line 377 "ldlex.l"
4111 yylval.name = xstrdup (yytext);
4113 @@ -2868,7 +2876,7 @@
4117 -#line 383 "ldlex.l"
4118 +#line 381 "ldlex.l"
4120 yylval.name = xstrdup (yytext + 2);
4122 @@ -2876,7 +2884,7 @@
4126 -#line 387 "ldlex.l"
4127 +#line 385 "ldlex.l"
4129 /* Annoyingly, this pattern can match comments, and we have
4130 longest match issues to consider. So if the first two
4131 @@ -2897,7 +2905,7 @@
4133 /* rule 172 can match eol */
4135 -#line 404 "ldlex.l"
4136 +#line 402 "ldlex.l"
4138 /* No matter the state, quotes
4139 give what's inside */
4140 @@ -2909,54 +2917,54 @@
4142 /* rule 173 can match eol */
4144 -#line 411 "ldlex.l"
4145 +#line 409 "ldlex.l"
4150 -#line 412 "ldlex.l"
4151 +#line 410 "ldlex.l"
4156 -#line 414 "ldlex.l"
4157 +#line 412 "ldlex.l"
4162 -#line 416 "ldlex.l"
4163 +#line 414 "ldlex.l"
4168 -#line 418 "ldlex.l"
4169 +#line 416 "ldlex.l"
4174 -#line 420 "ldlex.l"
4175 +#line 418 "ldlex.l"
4180 -#line 422 "ldlex.l"
4181 +#line 420 "ldlex.l"
4182 { yylval.name = xstrdup (yytext);
4183 return VERS_IDENTIFIER; }
4187 -#line 425 "ldlex.l"
4188 +#line 423 "ldlex.l"
4189 { yylval.name = xstrdup (yytext);
4194 -#line 428 "ldlex.l"
4195 +#line 426 "ldlex.l"
4196 { BEGIN(VERS_SCRIPT); return *yytext; }
4200 -#line 430 "ldlex.l"
4201 +#line 428 "ldlex.l"
4203 vers_node_nesting = 0;
4205 @@ -2964,17 +2972,17 @@
4209 -#line 434 "ldlex.l"
4210 +#line 432 "ldlex.l"
4215 -#line 435 "ldlex.l"
4216 +#line 433 "ldlex.l"
4217 { vers_node_nesting++; return *yytext; }
4221 -#line 436 "ldlex.l"
4222 +#line 434 "ldlex.l"
4223 { if (--vers_node_nesting < 0)
4226 @@ -2983,17 +2991,17 @@
4228 /* rule 186 can match eol */
4230 -#line 441 "ldlex.l"
4231 +#line 439 "ldlex.l"
4236 -#line 443 "ldlex.l"
4237 +#line 441 "ldlex.l"
4238 { /* Eat up comments */ }
4242 -#line 445 "ldlex.l"
4243 +#line 443 "ldlex.l"
4244 { /* Eat up whitespace */ }
4246 case YY_STATE_EOF(INITIAL):
4247 @@ -3005,7 +3013,7 @@
4248 case YY_STATE_EOF(VERS_START):
4249 case YY_STATE_EOF(VERS_SCRIPT):
4250 case YY_STATE_EOF(VERS_NODE):
4251 -#line 447 "ldlex.l"
4252 +#line 445 "ldlex.l"
4254 include_stack_ptr--;
4256 @@ -3026,20 +3034,20 @@
4260 -#line 465 "ldlex.l"
4261 +#line 463 "ldlex.l"
4262 lex_warn_invalid (" in script", yytext);
4266 -#line 466 "ldlex.l"
4267 +#line 464 "ldlex.l"
4268 lex_warn_invalid (" in expression", yytext);
4272 -#line 468 "ldlex.l"
4273 +#line 466 "ldlex.l"
4276 -#line 3043 "ldlex.c"
4277 +#line 3051 "ldlex.c"
4279 case YY_END_OF_BUFFER:
4281 @@ -3223,7 +3231,7 @@
4285 - yy_size_t num_to_read =
4287 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
4289 while ( num_to_read <= 0 )
4290 @@ -3237,7 +3245,7 @@
4292 if ( b->yy_is_our_buffer )
4294 - yy_size_t new_size = b->yy_buf_size * 2;
4295 + int new_size = b->yy_buf_size * 2;
4297 if ( new_size <= 0 )
4298 b->yy_buf_size += b->yy_buf_size / 8;
4299 @@ -3268,7 +3276,7 @@
4301 /* Read in more data. */
4302 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
4303 - (yy_n_chars), num_to_read );
4304 + (yy_n_chars), (size_t) num_to_read );
4306 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
4308 @@ -3366,6 +3374,10 @@
4309 return yy_is_jam ? 0 : yy_current_state;
4312 +#ifndef YY_NO_UNPUT
4318 static int yyinput (void)
4319 @@ -3390,7 +3402,7 @@
4322 { /* need more input */
4323 - yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
4324 + int offset = (yy_c_buf_p) - (yytext_ptr);
4327 switch ( yy_get_next_buffer( ) )
4328 @@ -3414,7 +3426,7 @@
4329 case EOB_ACT_END_OF_FILE:
4335 if ( ! (yy_did_buffer_switch_on_eof) )
4337 @@ -3666,7 +3678,7 @@
4339 static void yyensure_buffer_stack (void)
4341 - yy_size_t num_to_alloc;
4344 if (!(yy_buffer_stack)) {
4346 @@ -3763,11 +3775,12 @@
4348 * @return the newly allocated buffer state object.
4350 -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
4351 +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
4359 /* Get memory for full buffer, including space for trailing EOB's. */
4360 n = _yybytes_len + 2;
4361 @@ -3849,7 +3862,7 @@
4362 /** Get the length of the current token.
4365 -yy_size_t yyget_leng (void)
4366 +int yyget_leng (void)
4370 @@ -3864,29 +3877,29 @@
4373 /** Set the current line number.
4374 - * @param line_number
4375 + * @param _line_number
4378 -void yyset_lineno (int line_number )
4379 +void yyset_lineno (int _line_number )
4382 - yylineno = line_number;
4383 + yylineno = _line_number;
4386 /** Set the input stream. This does not discard the current
4388 - * @param in_str A readable stream.
4389 + * @param _in_str A readable stream.
4391 * @see yy_switch_to_buffer
4393 -void yyset_in (FILE * in_str )
4394 +void yyset_in (FILE * _in_str )
4400 -void yyset_out (FILE * out_str )
4401 +void yyset_out (FILE * _out_str )
4404 + yyout = _out_str ;
4407 int yyget_debug (void)
4408 @@ -3894,9 +3907,9 @@
4409 return yy_flex_debug;
4412 -void yyset_debug (int bdebug )
4413 +void yyset_debug (int _bdebug )
4415 - yy_flex_debug = bdebug ;
4416 + yy_flex_debug = _bdebug ;
4419 static int yy_init_globals (void)
4420 @@ -3997,7 +4010,7 @@
4422 #define YYTABLES_NAME "yytables"
4424 -#line 468 "ldlex.l"
4425 +#line 466 "ldlex.l"
4429 diff -rNU3 dist/ld/ldlex.l dist.nbsd/ld/ldlex.l
4430 --- dist/ld/ldlex.l Wed Nov 7 11:43:28 2012
4431 +++ dist.nbsd/ld/ldlex.l Wed Nov 7 11:13:50 2012
4434 #define YY_INPUT(buf,result,max_size) result = yy_input (buf, max_size)
4436 -#ifndef YY_NO_UNPUT
4437 -#define YY_NO_UNPUT
4440 #define MAX_INCLUDE_DEPTH 10
4441 static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
4442 static const char *file_name_stack[MAX_INCLUDE_DEPTH];
4444 int yywrap (void) { return 1; }
4452 diff -rNU3 dist/ld/ldmain.c dist.nbsd/ld/ldmain.c
4453 --- dist/ld/ldmain.c Wed Nov 7 11:43:28 2012
4454 +++ dist.nbsd/ld/ldmain.c Wed Nov 7 11:13:50 2012
4455 @@ -694,6 +694,23 @@
4456 einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
4460 +add_ignoresym (const char *name)
4462 + if (link_info.ignore_hash == NULL)
4464 + link_info.ignore_hash = xmalloc (sizeof (struct bfd_hash_table));
4465 + if (! bfd_hash_table_init_n (link_info.ignore_hash,
4467 + sizeof (struct bfd_hash_entry),
4469 + einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
4472 + if (bfd_hash_lookup (link_info.ignore_hash, name, TRUE, TRUE) == NULL)
4473 + einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
4476 /* Record a symbol to be wrapped, from the --wrap option. */
4479 @@ -1291,24 +1308,25 @@
4481 #define MAX_ERRORS_IN_A_ROW 5
4483 + if (info->ignore_hash != NULL
4484 + && bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL)
4487 if (config.warn_once)
4489 - static struct bfd_hash_table *hash;
4491 /* Only warn once about a particular undefined symbol. */
4493 + if (info->ignore_hash == NULL)
4495 - hash = (struct bfd_hash_table *)
4496 - xmalloc (sizeof (struct bfd_hash_table));
4497 - if (!bfd_hash_table_init (hash, bfd_hash_newfunc,
4498 + info->ignore_hash = xmalloc (sizeof (struct bfd_hash_table));
4499 + if (!bfd_hash_table_init (info->ignore_hash, bfd_hash_newfunc,
4500 sizeof (struct bfd_hash_entry)))
4501 einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
4504 - if (bfd_hash_lookup (hash, name, FALSE, FALSE) != NULL)
4505 + if (bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL)
4508 - if (bfd_hash_lookup (hash, name, TRUE, TRUE) == NULL)
4509 + if (bfd_hash_lookup (info->ignore_hash, name, TRUE, TRUE) == NULL)
4510 einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
4513 diff -rNU3 dist/ld/ldmain.h dist.nbsd/ld/ldmain.h
4514 --- dist/ld/ldmain.h Wed Nov 7 11:43:28 2012
4515 +++ dist.nbsd/ld/ldmain.h Wed Nov 7 11:13:51 2012
4518 extern void add_ysym (const char *);
4519 extern void add_wrap (const char *);
4520 +extern void add_ignoresym (const char *);
4521 extern void add_keepsyms_file (const char *);
4524 diff -rNU3 dist/ld/lexsup.c dist.nbsd/ld/lexsup.c
4525 --- dist/ld/lexsup.c Wed Nov 7 11:43:28 2012
4526 +++ dist.nbsd/ld/lexsup.c Wed Nov 7 11:13:50 2012
4529 #endif /* ENABLE_PLUGINS */
4530 OPTION_DEFAULT_SCRIPT,
4531 + OPTION_IGNORE_UNRESOLVED_SYMBOL
4534 /* The long options. This structure is used for both the option
4537 { {"shared", no_argument, NULL, OPTION_SHARED},
4538 '\0', NULL, N_("Create a shared library"), ONE_DASH },
4539 - { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */
4540 + { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD, NetBSD. */
4541 '\0', NULL, NULL, ONE_DASH },
4542 { {"pie", no_argument, NULL, OPTION_PIE},
4543 '\0', NULL, N_("Create a position independent executable"), ONE_DASH },
4544 @@ -608,8 +609,14 @@
4545 { {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
4546 '\0', NULL, N_("Include all objects from following archives"),
4548 + { {"Bforcearchive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
4549 + '\0', NULL, NULL, TWO_DASHES }, /* NetBSD. */
4550 { {"wrap", required_argument, NULL, OPTION_WRAP},
4551 '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
4552 + { {"ignore-unresolved-symbol", required_argument, NULL,
4553 + OPTION_IGNORE_UNRESOLVED_SYMBOL},
4554 + '\0', N_("SYMBOL"),
4555 + N_("Unresolved SYMBOL will not cause an error or warning"), TWO_DASHES },
4558 #define OPTION_COUNT ARRAY_SIZE (ld_options)
4559 @@ -1452,6 +1459,9 @@
4564 + case OPTION_IGNORE_UNRESOLVED_SYMBOL:
4565 + add_ignoresym (optarg);
4567 case OPTION_DISCARD_NONE:
4568 link_info.discard = discard_none;
4569 diff -rNU3 dist/ld/scripttempl/elf.sc dist.nbsd/ld/scripttempl/elf.sc
4570 --- dist/ld/scripttempl/elf.sc Wed Nov 7 11:43:28 2012
4571 +++ dist.nbsd/ld/scripttempl/elf.sc Wed Nov 7 11:13:50 2012
4574 # Each of these can also have corresponding .rel.* and .rela.* sections.
4576 +test -z "$TEXT_START_SYMBOLS" && TEXT_START_SYMBOLS="PROVIDE_HIDDEN (__eprol = .);"
4577 +test -z "$ENTRY" && ENTRY=_start
4578 test -z "$RODATA_NAME" && RODATA_NAME=rodata
4579 test -z "$SDATA_NAME" && SDATA_NAME=sdata
4580 test -z "$SBSS_NAME" && SBSS_NAME=sbss
4581 diff -rNU3 dist/ld/scripttempl/sh.sc dist.nbsd/ld/scripttempl/sh.sc
4582 --- dist/ld/scripttempl/sh.sc Wed Nov 7 11:43:28 2012
4583 +++ dist.nbsd/ld/scripttempl/sh.sc Wed Nov 7 11:13:50 2012
4593 OUTPUT_FORMAT("${OUTPUT_FORMAT}")
4594 OUTPUT_ARCH(${ARCH})
4599 - ram : o = 0x1000, l = 512k
4608 ${RELOCATING+ _etext = . ; }
4609 - } ${RELOCATING+ > ram}
4611 ${CONSTRUCTING+${TORS}}
4613 + .data ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
4616 ${RELOCATING+*(.gcc_exc*)}
4618 ${RELOCATING+___EH_FRAME_END__ = . ;}
4619 ${RELOCATING+LONG(0);}
4620 ${RELOCATING+ _edata = . ; }
4621 - } ${RELOCATING+ > ram}
4624 + .bss ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
4626 ${RELOCATING+ _bss_start = . ; }
4629 ${RELOCATING+ _end = . ; }
4630 - } ${RELOCATING+ > ram}
4631 - .stack ${RELOCATING+ 0x30000 } :
4635 ${RELOCATING+ _stack = . ; }
4637 - } ${RELOCATING+ > ram}
4639 .stab 0 ${RELOCATING+(NOLOAD)} :
4642 diff -rNU3 dist/libiberty/floatformat.c dist.nbsd/libiberty/floatformat.c
4643 --- dist/libiberty/floatformat.c Wed Nov 7 11:43:26 2012
4644 +++ dist.nbsd/libiberty/floatformat.c Wed Nov 7 11:13:54 2012
4645 @@ -489,7 +489,11 @@
4655 if (get_field (ufrom, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1))
4657 diff -rNU3 dist/libiberty/strerror.c dist.nbsd/libiberty/strerror.c
4658 --- dist/libiberty/strerror.c Wed Nov 7 11:43:26 2012
4659 +++ dist.nbsd/libiberty/strerror.c Wed Nov 7 11:13:54 2012
4661 ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"),
4663 #if defined (ENOPROTOOPT)
4664 - ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available"),
4665 + ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol option not available"),
4667 #if defined (EPROTONOSUPPORT)
4668 ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"),
4669 diff -rNU3 dist/opcodes/cgen.sh dist.nbsd/opcodes/cgen.sh
4670 --- dist/opcodes/cgen.sh Wed Nov 7 11:43:26 2012
4671 +++ dist.nbsd/opcodes/cgen.sh Wed Nov 7 11:13:50 2012
4673 shift ; extrafiles=$9
4675 rootdir=${srcdir}/..
4676 +move_if_change="${CONFIG_SHELL:-/bin/sh} ${rootdir}/move-if-change"
4678 # $arch is $6, as passed on the command line.
4679 # $ARCH is the same argument but in all uppercase.
4680 diff -rNU3 dist/opcodes/configure dist.nbsd/opcodes/configure
4681 --- dist/opcodes/configure Wed Nov 7 11:43:26 2012
4682 +++ dist.nbsd/opcodes/configure Wed Nov 7 11:13:50 2012
4683 @@ -12473,6 +12473,14 @@
4684 # specified, as in sh3-elf, sh3b-linux-gnu, etc.
4685 # Include it just for ELF targets, since the SH5 bfd:s are ELF only.
4686 for t in $target $canon_targets; do
4687 + # For NetBSD we do NOT want SH5 support unless sh5 or sh64
4690 + sh5*-* | sh64*-*) # let the case below handle it
4692 + sh*-*-netbsd* | sh*l*-*-netbsd*)
4696 all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
4697 sh-*-linux* | shl-*-linux*)
4698 diff -rNU3 dist/opcodes/configure.in dist.nbsd/opcodes/configure.in
4699 --- dist/opcodes/configure.in Wed Nov 7 11:43:26 2012
4700 +++ dist.nbsd/opcodes/configure.in Wed Nov 7 11:13:50 2012
4701 @@ -279,6 +279,14 @@
4702 # specified, as in sh3-elf, sh3b-linux-gnu, etc.
4703 # Include it just for ELF targets, since the SH5 bfd:s are ELF only.
4704 for t in $target $canon_targets; do
4705 + # For NetBSD we do NOT want SH5 support unless sh5 or sh64
4708 + sh5*-* | sh64*-*) # let the case below handle it
4710 + sh*-*-netbsd* | sh*l*-*-netbsd*)
4714 all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
4715 sh-*-linux* | shl-*-linux*)
4716 diff -rNU3 dist/opcodes/mips-opc.c dist.nbsd/opcodes/mips-opc.c
4717 --- dist/opcodes/mips-opc.c Wed Nov 7 11:43:26 2012
4718 +++ dist.nbsd/opcodes/mips-opc.c Wed Nov 7 11:13:50 2012
4719 @@ -709,10 +709,12 @@
4720 {"floor.w.s", "D,S", 0x4600000f, 0xffff003f, WR_D|RD_S|FP_S, 0, I2 },
4721 {"hibernate","", 0x42000023, 0xffffffff, 0, 0, V1 },
4722 {"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33 },
4723 +{"jr", "s", 0, (int) M_JR_S, INSN_MACRO, 0, I1 },
4724 {"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 },
4725 /* jr.hb is officially MIPS{32,64}R2, but it works on R1 as jr with
4726 the same hazard barrier effect. */
4727 {"jr.hb", "s", 0x00000408, 0xfc1fffff, UBD|RD_s, 0, I32 },
4728 +{"j", "s", 0, (int) M_J_S, INSN_MACRO, 0, I1 },
4729 {"j", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 }, /* jr */
4730 /* SVR4 PIC code requires special handling for j, so it must be a
4733 assembler, but will never match user input (because the line above
4734 will match first). */
4735 {"j", "a", 0x08000000, 0xfc000000, UBD, 0, I1 },
4736 +{"jalr", "s", 0, (int) M_JALR_S, INSN_MACRO, 0, I1 },
4737 {"jalr", "s", 0x0000f809, 0xfc1fffff, UBD|RD_s|WR_d, 0, I1 },
4738 +{"jalr", "d,s", 0, (int) M_JALR_DS, INSN_MACRO, 0, I1 },
4739 {"jalr", "d,s", 0x00000009, 0xfc1f07ff, UBD|RD_s|WR_d, 0, I1 },
4740 /* jalr.hb is officially MIPS{32,64}R2, but it works on R1 as jalr
4741 with the same hazard barrier effect. */