minix/external/gpl3/binutils/patches/0000-binutils_nbsd.patch
Lionel Sambuc b8a678ef1d Cross compile on minix support
* Remade patch so it works with minix patch tool.

 * New MINIX tar support -ox, so revert back to it

   In fetch scripts, tar had been replaced by bsdtar as the prebvious
   tar did not support the -o flag under minix, which is required to
   prevent usage of tar file stored user and group information.

   This introduces portability problems. As our new tar tool now
   support that flag revert back to improve portability.
2012-11-15 16:07:30 +01:00

4741 lines
137 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff -rNU3 dist/bfd/ChangeLog dist.nbsd/bfd/ChangeLog
--- dist/bfd/ChangeLog Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/ChangeLog Wed Nov 7 11:13:53 2012
@@ -1,3 +1,13 @@
+2011-12-11 John Davis Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR binutils/13476
+ * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
+ R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations to
+ R_PARISC_DPREL21L when not doing a shared link. Likewise convert
+ R_PARISC_TLS_GD14R, R_PARISC_TLS_LDM14R and R_PARISC_TLS_IE14R to
+ R_PARISC_DPREL14R. Handle R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L
+ and R_PARISC_TLS_IE21L with R_PARISC_DLTIND21L.
+
2011-06-27 Tristan Gingold <gingold@adacore.com>
* configure.in: Bump version to 2.21.1
diff -rNU3 dist/bfd/archive.c dist.nbsd/bfd/archive.c
--- dist/bfd/archive.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/archive.c Wed Nov 7 11:13:53 2012
@@ -156,6 +156,9 @@
#define ar_maxnamelen(abfd) ((abfd)->xvec->ar_max_namelen)
#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
+
+static const char * normalize (bfd *, const char *);
+
#define arch_hdr(bfd) ((struct ar_hdr *) arch_eltdata (bfd)->arch_header)
/* True iff NAME designated a BSD 4.4 extended name. */
@@ -725,7 +728,9 @@
/* Pad to an even boundary...
Note that last_file->origin can be odd in the case of
BSD-4.4-style element with a long odd size. */
- filestart += filestart % 2;
+ if (!strncmp(arch_hdr (last_file)->ar_name, "#1/", 3))
+ size += strlen(normalize(last_file, last_file->filename));
+ filestart += size % 2;
}
return _bfd_get_elt_at_filepos (archive, filestart);
@@ -2068,11 +2073,22 @@
current = current->archive_next)
{
char buffer[DEFAULT_BUFFERSIZE];
- unsigned int remaining = arelt_size (current);
+ unsigned int saved_size = arelt_size (current);
+ unsigned int remaining = saved_size;
+ struct ar_hdr *hdr = arch_hdr (current);
/* Write ar header. */
if (!_bfd_write_ar_hdr (arch, current))
return FALSE;
+ /* Write filename if it is a 4.4BSD extended file, and add to size. */
+ if (!strncmp (hdr->ar_name, "#1/", 3))
+ {
+ const char *normal = normalize (current, current->filename);
+ unsigned int thislen = strlen (normal);
+ if (bfd_write (normal, 1, thislen, arch) != thislen)
+ return FALSE;
+ saved_size += thislen;
+ }
if (bfd_is_thin_archive (arch))
continue;
if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
@@ -2343,11 +2359,11 @@
{
do
{
- struct areltdata *ared = arch_eltdata (current);
-
- firstreal += (ared->parsed_size + ared->extra_size
- + sizeof (struct ar_hdr));
- firstreal += firstreal % 2;
+ unsigned int size = arelt_size (current);
+ if (!strncmp(arch_hdr (current)->ar_name, "#1/", 3))
+ size += strlen(normalize(current, current->filename));
+ firstreal += size + sizeof (struct ar_hdr);
+ firstreal += size % 2;
current = current->archive_next;
}
while (current != map[count].u.abfd);
diff -rNU3 dist/bfd/bfd-in2.h dist.nbsd/bfd/bfd-in2.h
--- dist/bfd/bfd-in2.h Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/bfd-in2.h Wed Nov 7 11:13:53 2012
@@ -5072,6 +5072,11 @@
/* This BFD has been created by the linker and doesn't correspond
to any input file. */
#define BFD_LINKER_CREATED 0x2000
+ /* This may be set before writing out a BFD to request that it
+ be written using values for UIDs, GIDs, timestamps, etc. that
+ will be consistent from run to run. */
+#define BFD_DETERMINISTIC_OUTPUT 0x4000
+
/* This may be set before writing out a BFD to request that it
be written using values for UIDs, GIDs, timestamps, etc. that
diff -rNU3 dist/bfd/coff-alpha.c dist.nbsd/bfd/coff-alpha.c
--- dist/bfd/coff-alpha.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/coff-alpha.c Wed Nov 7 11:13:53 2012
@@ -687,7 +687,9 @@
case ALPHA_R_OP_STORE:
/* The STORE reloc needs the size and offset fields. We store
them in the addend. */
+#if 0
BFD_ASSERT (intern->r_offset <= 256);
+#endif
rptr->addend = (intern->r_offset << 8) + intern->r_size;
break;
diff -rNU3 dist/bfd/config.bfd dist.nbsd/bfd/config.bfd
--- dist/bfd/config.bfd Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/config.bfd Wed Nov 7 11:13:53 2012
@@ -218,15 +218,15 @@
armeb-*-netbsdelf*)
targ_defvec=bfd_elf32_bigarm_vec
- targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec"
+ targ_selvecs="bfd_elf32_littlearm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec"
;;
arm-*-netbsdelf*)
targ_defvec=bfd_elf32_littlearm_vec
- targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec"
+ targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec armcoff_little_vec armcoff_big_vec"
;;
arm-*-netbsd* | arm-*-openbsd*)
targ_defvec=armnetbsd_vec
- targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec"
+ targ_selvecs="bfd_elf32_littlearm_vec bfd_elf32_bigarm_vec armcoff_little_vec armcoff_big_vec"
targ_underscore=yes
targ_cflags=-D__QNXTARGET__
;;
@@ -832,9 +832,9 @@
# targ_selvecs=m68kmach3_vec
# targ_cflags=-DSTAT_FOR_EXEC
;;
- m68*-hp*-netbsd*)
+ m68k4k*-*-netbsd*)
targ_defvec=m68k4knetbsd_vec
- targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
+ targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec bfd_elf32_m68k_vec"
targ_underscore=yes
;;
m68*-*-netbsdelf*)
@@ -910,6 +910,16 @@
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
+#ifdef BFD64
+ mips64*el-*-netbsd*)
+ targ_defvec=bfd_elf32_ntradlittlemips_vec
+ targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec"
+ ;;
+ mips64*-*-netbsd*)
+ targ_defvec=bfd_elf32_ntradbigmips_vec
+ targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec"
+ ;;
+#endif
mips*el-*-netbsd*)
targ_defvec=bfd_elf32_tradlittlemips_vec
targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_little_vec ecoff_big_vec"
@@ -1288,6 +1298,8 @@
want64=true
;;
+#endif
+
sh*l*-*-netbsdelf*)
targ_defvec=bfd_elf32_shlnbsd_vec
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"
@@ -1298,8 +1310,6 @@
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"
want64=true
;;
-#endif
-
sh*-*-netbsdelf*)
targ_defvec=bfd_elf32_shnbsd_vec
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
@@ -1389,11 +1399,11 @@
;;
sparc-*-netbsdelf*)
targ_defvec=bfd_elf32_sparc_vec
- targ_selvecs=sparcnetbsd_vec
+ targ_selvecs="sparcnetbsd_vec sunos_big_vec"
;;
- sparc-*-netbsdaout* | sparc-*-netbsd*)
+ sparc-*-netbsd*)
targ_defvec=sparcnetbsd_vec
- targ_selvecs=bfd_elf32_sparc_vec
+ targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
targ_underscore=yes
;;
sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1])
@@ -1440,6 +1450,10 @@
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
want64=true
+ ;;
+ sparc64-*-netbsd*)
+ targ_defvec=bfd_elf64_sparc_vec
+ targ_selvecs="bfd_elf32_sparc_vec sparcnetbsd_vec sunos_big_vec"
;;
sparc64-*-elf* | sparc64-*-rtems* )
targ_defvec=bfd_elf64_sparc_vec
diff -rNU3 dist/bfd/configure dist.nbsd/bfd/configure
--- dist/bfd/configure Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/configure Wed Nov 7 11:13:54 2012
@@ -12109,10 +12109,10 @@
withval=$with_pkgversion; case "$withval" in
yes) as_fn_error "package version not specified" "$LINENO" 5 ;;
no) PKGVERSION= ;;
- *) PKGVERSION="($withval) " ;;
+ *) PKGVERSION="($withval)\ " ;;
esac
else
- PKGVERSION="(GNU Binutils) "
+ PKGVERSION="(GNU Binutils)\ "
fi
@@ -13850,6 +13850,7 @@
COREFILE=netbsd-core.lo
;;
arm-*-riscix) COREFILE=trad-core.lo ;;
+ arm*-*-netbsd*) COREFILE=netbsd-core.lo ;;
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
@@ -13912,7 +13913,7 @@
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i860mach3.h"'
;;
- mips-*-netbsd* | mips*-*-openbsd*)
+ mips*-*-netbsd* | mips*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
mips-dec-*)
diff -rNU3 dist/bfd/configure.host dist.nbsd/bfd/configure.host
--- dist/bfd/configure.host Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/configure.host Wed Nov 7 11:13:53 2012
@@ -56,6 +56,18 @@
m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;;
+sparc64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;;
+
+x86_64*-*-netbsd*) host64=true; HOST_64BIT_TYPE=long ;;
+
+*-*-aix*) HOST_64BIT_TYPE="long long"
+ HOST_U_64BIT_TYPE="unsigned long long"
+ ;;
+
+*-*-solaris*) HOST_64BIT_TYPE="long long"
+ HOST_U_64BIT_TYPE="unsigned long long"
+ ;;
+
# Some Solaris systems (osol0906 at least) have a libc that doesn't recognise
# the "MS-ANSI" code page name, so we define an override for CP_ACP (sets the
# default code page used by windres/windmc when not specified by a commandline
diff -rNU3 dist/bfd/configure.in dist.nbsd/bfd/configure.in
--- dist/bfd/configure.in Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/configure.in Wed Nov 7 11:13:53 2012
@@ -242,6 +242,7 @@
COREFILE=netbsd-core.lo
;;
arm-*-riscix) COREFILE=trad-core.lo ;;
+ arm*-*-netbsd*) COREFILE=netbsd-core.lo ;;
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
hppa*-*-mpeix*) COREFILE=hpux-core.lo ;;
@@ -328,7 +329,7 @@
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i860mach3.h"'
;;
- mips-*-netbsd* | mips*-*-openbsd*)
+ mips*-*-netbsd* | mips*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
mips-dec-*)
diff -rNU3 dist/bfd/doc/Makefile.in dist.nbsd/bfd/doc/Makefile.in
--- dist/bfd/doc/Makefile.in Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/doc/Makefile.in Wed Nov 7 11:13:53 2012
@@ -417,7 +417,9 @@
clean-libtool:
-rm -rf .libs _libs
-bfd.info: bfd.texinfo $(bfd_TEXINFOS)
+bfd.info:
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_bfd.info: bfd.texinfo $(bfd_TEXINFOS)
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
diff -rNU3 dist/bfd/doc/bfdver.texi dist.nbsd/bfd/doc/bfdver.texi
--- dist/bfd/doc/bfdver.texi Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/doc/bfdver.texi Wed Nov 7 11:13:53 2012
@@ -1,4 +1,4 @@
@set VERSION 2.21.1
-@set VERSION_PACKAGE (GNU Binutils)
-@set UPDATED June 2011
+@set VERSION_PACKAGE (GNU Binutils)\
+@set UPDATED September 2011
@set BUGURL @uref{http://www.sourceware.org/bugzilla/}
diff -rNU3 dist/bfd/doc/reloc.texi dist.nbsd/bfd/doc/reloc.texi
--- dist/bfd/doc/reloc.texi Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/doc/reloc.texi Wed Nov 7 11:13:53 2012
@@ -570,6 +570,12 @@
@deffnx {} BFD_RELOC_68K_TLS_LE8
Relocations used by 68K ELF.
@end deffn
+@deffn {} BFD_RELOC_VAX_GLOB_DAT
+@deffnx {} BFD_RELOC_VAX_GLOB_REF
+@deffnx {} BFD_RELOC_VAX_JMP_SLOT
+@deffnx {} BFD_RELOC_VAX_RELATIVE
+Relocations used by VAX ELF.
+@end deffn
@deffn {} BFD_RELOC_32_BASEREL
@deffnx {} BFD_RELOC_16_BASEREL
@deffnx {} BFD_RELOC_LO16_BASEREL
diff -rNU3 dist/bfd/elf.c dist.nbsd/bfd/elf.c
--- dist/bfd/elf.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf.c Wed Nov 7 11:13:53 2012
@@ -8502,6 +8502,23 @@
return TRUE;
}
+ /* On SuperH, PT_GETREGS == mach+3 and PT_GETFPREGS == mach+5.
+ There's also old PT___GETREGS40 == mach + 1 for old reg
+ structure which lacks GBR. */
+
+ case bfd_arch_sh:
+ switch (note->type)
+ {
+ case NT_NETBSDCORE_FIRSTMACH+3:
+ return elfcore_make_note_pseudosection (abfd, ".reg", note);
+
+ case NT_NETBSDCORE_FIRSTMACH+5:
+ return elfcore_make_note_pseudosection (abfd, ".reg2", note);
+
+ default:
+ return TRUE;
+ }
+
/* On all other arch's, PT_GETREGS == mach+1 and
PT_GETFPREGS == mach+3. */
diff -rNU3 dist/bfd/elf32-arm.c dist.nbsd/bfd/elf32-arm.c
--- dist/bfd/elf32-arm.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf32-arm.c Wed Nov 7 11:13:53 2012
@@ -11783,6 +11783,10 @@
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
+ if (info->warn_shared_textrel)
+ (*_bfd_error_handler)
+ (_("warning: dynamic relocation in readonly section `%s'"),
+ h->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */
diff -rNU3 dist/bfd/elf32-hppa.c dist.nbsd/bfd/elf32-hppa.c
--- dist/bfd/elf32-hppa.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf32-hppa.c Wed Nov 7 11:13:53 2012
@@ -2201,6 +2201,10 @@
{
struct bfd_link_info *info = inf;
+ if (info->warn_shared_textrel)
+ (*_bfd_error_handler)
+ (_("warning: dynamic relocation in readonly section `%s'"),
+ eh->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */
@@ -3352,10 +3356,16 @@
switch (r_type)
{
case R_PARISC_DLTIND21L:
+ case R_PARISC_TLS_GD21L:
+ case R_PARISC_TLS_LDM21L:
+ case R_PARISC_TLS_IE21L:
r_type = R_PARISC_DPREL21L;
break;
case R_PARISC_DLTIND14R:
+ case R_PARISC_TLS_GD14R:
+ case R_PARISC_TLS_LDM14R:
+ case R_PARISC_TLS_IE14R:
r_type = R_PARISC_DPREL14R;
break;
@@ -3421,53 +3431,48 @@
case R_PARISC_DPREL21L:
case R_PARISC_DPREL14R:
case R_PARISC_DPREL14F:
- case R_PARISC_TLS_GD21L:
- case R_PARISC_TLS_LDM21L:
- case R_PARISC_TLS_IE21L:
/* Convert instructions that use the linkage table pointer (r19) to
instructions that use the global data pointer (dp). This is the
most efficient way of using PIC code in an incomplete executable,
but the user must follow the standard runtime conventions for
accessing data for this to work. */
- if (orig_r_type == R_PARISC_DLTIND21L
- || (!info->shared
- && (r_type == R_PARISC_TLS_GD21L
- || r_type == R_PARISC_TLS_LDM21L
- || r_type == R_PARISC_TLS_IE21L)))
+ if (orig_r_type != r_type)
{
- /* Convert addil instructions if the original reloc was a
- DLTIND21L. GCC sometimes uses a register other than r19 for
- the operation, so we must convert any addil instruction
- that uses this relocation. */
- if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26))
- insn = ADDIL_DP;
- else
- /* We must have a ldil instruction. It's too hard to find
- and convert the associated add instruction, so issue an
- error. */
- (*_bfd_error_handler)
- (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
- input_bfd,
- input_section,
- (long) offset,
- howto->name,
- insn);
+ if (r_type == R_PARISC_DPREL21L)
+ {
+ /* GCC sometimes uses a register other than r19 for the
+ operation, so we must convert any addil instruction
+ that uses this relocation. */
+ if ((insn & 0xfc000000) == ((int) OP_ADDIL << 26))
+ insn = ADDIL_DP;
+ else
+ /* We must have a ldil instruction. It's too hard to find
+ and convert the associated add instruction, so issue an
+ error. */
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"),
+ input_bfd,
+ input_section,
+ (long) offset,
+ howto->name,
+ insn);
+ }
+ else if (r_type == R_PARISC_DPREL14F)
+ {
+ /* This must be a format 1 load/store. Change the base
+ register to dp. */
+ insn = (insn & 0xfc1ffff) | (27 << 21);
+ }
}
- else if (orig_r_type == R_PARISC_DLTIND14F)
- {
- /* This must be a format 1 load/store. Change the base
- register to dp. */
- insn = (insn & 0xfc1ffff) | (27 << 21);
- }
- /* For all the DP relative relocations, we need to examine the symbol's
- section. If it has no section or if it's a code section, then
- "data pointer relative" makes no sense. In that case we don't
- adjust the "value", and for 21 bit addil instructions, we change the
- source addend register from %dp to %r0. This situation commonly
- arises for undefined weak symbols and when a variable's "constness"
- is declared differently from the way the variable is defined. For
- instance: "extern int foo" with foo defined as "const int foo". */
+ /* For all the DP relative relocations, we need to examine the symbol's
+ section. If it has no section or if it's a code section, then
+ "data pointer relative" makes no sense. In that case we don't
+ adjust the "value", and for 21 bit addil instructions, we change the
+ source addend register from %dp to %r0. This situation commonly
+ arises for undefined weak symbols and when a variable's "constness"
+ is declared differently from the way the variable is defined. For
+ instance: "extern int foo" with foo defined as "const int foo". */
if (sym_sec == NULL || (sym_sec->flags & SEC_CODE) != 0)
{
if ((insn & ((0x3f << 26) | (0x1f << 21)))
@@ -3484,6 +3489,9 @@
case R_PARISC_DLTIND21L:
case R_PARISC_DLTIND14R:
case R_PARISC_DLTIND14F:
+ case R_PARISC_TLS_GD21L:
+ case R_PARISC_TLS_LDM21L:
+ case R_PARISC_TLS_IE21L:
case R_PARISC_TLS_GD14R:
case R_PARISC_TLS_LDM14R:
case R_PARISC_TLS_IE14R:
diff -rNU3 dist/bfd/elf32-i386.c dist.nbsd/bfd/elf32-i386.c
--- dist/bfd/elf32-i386.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf32-i386.c Wed Nov 7 11:13:53 2012
@@ -515,7 +515,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/libc.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/libexec/ld.elf_so"
/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
copying dynamic variables from a shared lib into an app's dynbss
@@ -2391,7 +2391,10 @@
if (s != NULL && (s->flags & SEC_READONLY) != 0)
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
-
+ if (info->warn_shared_textrel)
+ (*_bfd_error_handler)
+ (_("warning: dynamic relocation in readonly section `%s'"),
+ h->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */
diff -rNU3 dist/bfd/elf32-m68k.c dist.nbsd/bfd/elf32-m68k.c
--- dist/bfd/elf32-m68k.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf32-m68k.c Wed Nov 7 11:13:54 2012
@@ -2567,7 +2567,7 @@
if (ind->got_entry_key != 0)
{
BFD_ASSERT (dir->got_entry_key == 0);
- /* Assert that GOTs aren't partioned yet. */
+ /* Assert that GOTs aren't partitioned yet. */
BFD_ASSERT (ind->glist == NULL);
dir->got_entry_key = ind->got_entry_key;
diff -rNU3 dist/bfd/elf32-ppc.c dist.nbsd/bfd/elf32-ppc.c
--- dist/bfd/elf32-ppc.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf32-ppc.c Wed Nov 7 11:13:53 2012
@@ -3506,7 +3506,7 @@
sec->has_tls_get_addr_call = 1;
}
- switch (r_type)
+ switch ((int)r_type)
{
case R_PPC_TLSGD:
case R_PPC_TLSLD:
@@ -7219,7 +7219,7 @@
howto = NULL;
if (r_type < R_PPC_max)
howto = ppc_elf_howto_table[r_type];
- switch (r_type)
+ switch ((int)r_type)
{
default:
(*_bfd_error_handler)
diff -rNU3 dist/bfd/elf32-sh.c dist.nbsd/bfd/elf32-sh.c
--- dist/bfd/elf32-sh.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf32-sh.c Wed Nov 7 11:13:53 2012
@@ -3333,6 +3333,10 @@
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
+ if (info->warn_shared_textrel)
+ (*_bfd_error_handler)
+ (_("warning: dynamic relocation in readonly section `%s'"),
+ h->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */
diff -rNU3 dist/bfd/elf32-vax.c dist.nbsd/bfd/elf32-vax.c
--- dist/bfd/elf32-vax.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf32-vax.c Wed Nov 7 11:13:54 2012
@@ -52,7 +52,7 @@
static bfd_boolean elf32_vax_set_private_flags (bfd *, flagword);
static bfd_boolean elf32_vax_merge_private_bfd_data (bfd *, bfd *);
-static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, PTR);
+static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, void *);
static reloc_howto_type howto_table[] = {
HOWTO (R_VAX_NONE, /* type */
@@ -422,7 +422,7 @@
#define elf_vax_link_hash_traverse(table, func, info) \
(elf_link_hash_traverse \
((table), \
- (bfd_boolean (*) (struct elf_link_hash_entry *, PTR)) (func), \
+ (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
(info)))
/* Create an entry in an VAX ELF linker hash table. */
@@ -489,6 +489,24 @@
return TRUE;
}
+/* Copy vax-specific data from one module to another */
+static bfd_boolean
+elf32_vax_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
+{
+ flagword in_flags;
+
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return TRUE;
+
+ in_flags = elf_elfheader (ibfd)->e_flags;
+
+ elf_elfheader (obfd)->e_flags = in_flags;
+ elf_flags_init (obfd) = TRUE;
+
+ return TRUE;
+}
+
/* Merge backend specific data from an object file to the output
object file when linking. */
static bfd_boolean
@@ -513,7 +531,7 @@
/* Display the flags field */
static bfd_boolean
-elf32_vax_print_private_bfd_data (bfd *abfd, PTR ptr)
+elf32_vax_print_private_bfd_data (bfd *abfd, void * ptr)
{
FILE *file = (FILE *) ptr;
@@ -622,14 +640,13 @@
srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
if (srelgot == NULL)
{
+ flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED
+ | SEC_READONLY);
+
srelgot = bfd_make_section_with_flags (dynobj,
".rela.got",
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY));
+ flags);
if (srelgot == NULL
|| !bfd_set_section_alignment (dynobj, srelgot, 2))
return FALSE;
@@ -752,7 +769,13 @@
return FALSE;
if (sec->flags & SEC_READONLY)
- info->flags |= DF_TEXTREL;
+ {
+ if (info->warn_shared_textrel)
+ (*_bfd_error_handler)
+ (_("warning: dynamic relocation in readonly section `%s'"),
+ sec->name);
+ info->flags |= DF_TEXTREL;
+ }
}
sreloc->size += sizeof (Elf32_External_Rela);
@@ -933,39 +956,21 @@
if (h->type == STT_FUNC
|| h->needs_plt)
{
- if (! info->shared
- && !h->def_dynamic
- && !h->ref_dynamic
- /* We must always create the plt entry if it was referenced
- by a PLTxxO relocation. In this case we already recorded
- it as a dynamic symbol. */
- && h->dynindx == -1)
+ if (h->plt.refcount <= 0
+ || SYMBOL_CALLS_LOCAL (info, h)
+ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ && h->root.type == bfd_link_hash_undefweak))
{
/* This case can occur if we saw a PLTxx reloc in an input
file, but the symbol was never referred to by a dynamic
- object. In such a case, we don't actually need to build
- a procedure linkage table, and we can just do a PCxx
- reloc instead. */
- BFD_ASSERT (h->needs_plt);
+ object, or if all references were garbage collected. In
+ such a case, we don't actually need to build a procedure
+ linkage table, and we can just do a PCxx reloc instead. */
h->plt.offset = (bfd_vma) -1;
- return TRUE;
- }
-
- /* GC may have rendered this entry unused. */
- if (h->plt.refcount <= 0)
- {
h->needs_plt = 0;
- h->plt.offset = (bfd_vma) -1;
return TRUE;
}
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
s = bfd_get_section_by_name (dynobj, ".plt");
BFD_ASSERT (s != NULL);
@@ -1035,13 +1040,6 @@
if (info->shared)
return TRUE;
- if (h->size == 0)
- {
- (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
- h->root.root.string);
- return TRUE;
- }
-
/* We must allocate the symbol in our .dynbss section, which will
become part of the .bss section of the executable. There will be
an entry for this symbol in the .dynsym section. The dynamic
@@ -1059,7 +1057,7 @@
copy the initial value out of the dynamic object and into the
runtime process image. We need to remember the offset into the
.rela.bss section we are going to use. */
- if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+ if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
{
asection *srel;
@@ -1129,7 +1127,7 @@
instantiate (allocate space for them). */
elf_link_hash_traverse (elf_hash_table (info),
elf_vax_instantiate_got_entries,
- (PTR) info);
+ info);
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
@@ -1211,7 +1209,12 @@
continue;
/* Allocate memory for the section contents. */
- s->contents = (bfd_byte *) bfd_alloc (dynobj, s->size);
+ /* FIXME: This should be a call to bfd_alloc not bfd_zalloc.
+ Unused entries should be reclaimed before the section's contents
+ are written out, but at the moment this does not happen. Thus in
+ order to prevent writing out garbage, we initialise the section's
+ contents to zero. */
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size);
if (s->contents == NULL)
return FALSE;
}
@@ -1268,7 +1271,7 @@
static bfd_boolean
elf_vax_discard_copies (struct elf_vax_link_hash_entry *h,
- PTR ignore ATTRIBUTE_UNUSED)
+ void * ignore ATTRIBUTE_UNUSED)
{
struct elf_vax_pcrel_relocs_copied *s;
@@ -1659,9 +1662,9 @@
{
relocate = TRUE;
outrel.r_info = ELF32_R_INFO (0, R_VAX_RELATIVE);
- BFD_ASSERT (bfd_get_signed_32 (input_bfd,
- &contents[rel->r_offset]) == 0);
- outrel.r_addend = relocation + rel->r_addend;
+ outrel.r_addend = bfd_get_signed_32(input_bfd,
+ &contents[rel->r_offset])
+ + relocation + rel->r_addend;
}
else
{
@@ -1700,14 +1703,15 @@
}
}
- if (!strcmp (bfd_get_section_name (input_bfd, input_section),
- ".text") != 0 ||
- (info->shared
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_32
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_RELATIVE
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_COPY
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_JMP_SLOT
- && ELF32_R_TYPE(outrel.r_info) != R_VAX_GLOB_DAT))
+ if (input_section->flags & SEC_READONLY)
+ info->flags |= DF_TEXTREL;
+
+ if ((input_section->flags & SEC_READONLY) != 0
+ || (ELF32_R_TYPE (outrel.r_info) != R_VAX_32
+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_RELATIVE
+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_COPY
+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_JMP_SLOT
+ && ELF32_R_TYPE (outrel.r_info) != R_VAX_GLOB_DAT))
{
if (h != NULL)
(*_bfd_error_handler)
@@ -2082,12 +2086,15 @@
#define TARGET_LITTLE_SYM bfd_elf32_vax_vec
#define TARGET_LITTLE_NAME "elf32-vax"
#define ELF_MACHINE_CODE EM_VAX
-#define ELF_MAXPAGESIZE 0x1000
+#define ELF_MAXPAGESIZE 0x10000
#define elf_backend_create_dynamic_sections \
_bfd_elf_create_dynamic_sections
#define bfd_elf32_bfd_link_hash_table_create \
elf_vax_link_hash_table_create
+#define bfd_elf32_bfd_copy_private_bfd_data \
+ elf32_vax_copy_private_bfd_data
+
#define bfd_elf32_bfd_final_link bfd_elf_gc_common_final_link
#define elf_backend_check_relocs elf_vax_check_relocs
diff -rNU3 dist/bfd/elf64-alpha.c dist.nbsd/bfd/elf64-alpha.c
--- dist/bfd/elf64-alpha.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf64-alpha.c Wed Nov 7 11:13:53 2012
@@ -99,6 +99,11 @@
#define PLT_ENTRY_SIZE \
(elf64_alpha_use_secureplt ? NEW_PLT_ENTRY_SIZE : OLD_PLT_ENTRY_SIZE)
+/* ld --traditional-format uses this older format instead. */
+#define OLD_PLT_ENTRY_WORD1 0x279f0000 /* ldah $28, 0($31) */
+#define OLD_PLT_ENTRY_WORD2 0x239c0000 /* lda $28, 0($28) */
+#define OLD_PLT_ENTRY_WORD3 0xc3e00000 /* br $31, plt0 */
+
#define MAX_GOT_SIZE (64*1024)
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so"
@@ -4726,6 +4731,32 @@
plt_index = ((gotent->plt_offset - NEW_PLT_HEADER_SIZE)
/ NEW_PLT_ENTRY_SIZE);
+ }
+ else if ((output_bfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
+ {
+ long hi, lo;
+
+ /* decompose the reloc offset for the plt for ldah+lda */
+ hi = plt_index * sizeof(Elf64_External_Rela);
+ lo = ((hi & 0xffff) ^ 0x8000) - 0x8000;
+ hi = (hi - lo) >> 16;
+
+ insn = INSN_ABO (INSN_LDAH, 28, 31, hi);
+ bfd_put_32 (output_bfd, insn,
+ splt->contents + gotent->plt_offset);
+
+ insn = INSN_ABO (INSN_LDA, 28, 28, lo);
+ bfd_put_32 (output_bfd, insn,
+ splt->contents + gotent->plt_offset + 4);
+
+ disp = -(gotent->plt_offset + 12);
+ insn = INSN_AD (INSN_BR, 31, disp);
+
+ bfd_put_32 (output_bfd, insn,
+ splt->contents + gotent->plt_offset + 8);
+
+ plt_index = ((gotent->plt_offset - OLD_PLT_HEADER_SIZE)
+ / OLD_PLT_ENTRY_SIZE);
}
else
{
diff -rNU3 dist/bfd/elf64-mips.c dist.nbsd/bfd/elf64-mips.c
--- dist/bfd/elf64-mips.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf64-mips.c Wed Nov 7 11:13:54 2012
@@ -123,6 +123,8 @@
(bfd *, asymbol *, bfd_boolean, char **, bfd_vma *);
static bfd_boolean mips_elf64_object_p
(bfd *);
+static bfd_boolean mips_elf64_is_local_label_name
+ (bfd *, const char *);
static irix_compat_t elf64_mips_irix_compat
(bfd *);
static bfd_boolean elf64_mips_grok_prstatus
@@ -3052,7 +3054,18 @@
bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach);
return TRUE;
}
+
+/* MIPS ELF local labels start with "$L". */
+static bfd_boolean
+mips_elf64_is_local_label_name (bfd *abfd, const char *name)
+{
+ if (name[0] == '$' && name[1] == 'L')
+ return TRUE;
+ /* We accept the generic ELF local label syntax as well. */
+ return _bfd_elf_is_local_label_name (abfd, name);
+}
+
/* Depending on the target vector we generate some version of Irix
executables or "normal" MIPS ELF ABI executables. */
static irix_compat_t
@@ -3276,9 +3289,8 @@
#define elf_backend_write_section _bfd_mips_elf_write_section
-/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit
- MIPS-specific function only applies to IRIX5, which had no 64-bit
- ABI. */
+#define bfd_elf64_bfd_is_local_label_name \
+ mips_elf64_is_local_label_name
#define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line
#define bfd_elf64_find_inliner_info _bfd_mips_elf_find_inliner_info
#define bfd_elf64_new_section_hook _bfd_mips_elf_new_section_hook
diff -rNU3 dist/bfd/elf64-ppc.c dist.nbsd/bfd/elf64-ppc.c
--- dist/bfd/elf64-ppc.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf64-ppc.c Wed Nov 7 11:13:53 2012
@@ -8877,6 +8877,10 @@
{
struct bfd_link_info *info = inf;
+ if (info->warn_shared_textrel)
+ (*_bfd_error_handler)
+ (_("warning: dynamic relocation in readonly section `%s'"),
+ h->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */
diff -rNU3 dist/bfd/elf64-x86-64.c dist.nbsd/bfd/elf64-x86-64.c
--- dist/bfd/elf64-x86-64.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elf64-x86-64.c Wed Nov 7 11:13:53 2012
@@ -2196,6 +2196,10 @@
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
+ if (info->warn_shared_textrel)
+ (*_bfd_error_handler)
+ (_("warning: dynamic relocation in readonly section `%s'"),
+ h->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */
diff -rNU3 dist/bfd/elflink.c dist.nbsd/bfd/elflink.c
--- dist/bfd/elflink.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elflink.c Wed Nov 7 11:13:53 2012
@@ -10047,7 +10047,14 @@
if (bed->s->arch_size == 32)
irel[0].r_info = ELF32_R_INFO (indx, howto->type);
else
- irel[0].r_info = ELF64_R_INFO (indx, howto->type);
+#ifdef BFD64
+ {
+ bfd_uint64_t indx64 = indx;
+ irel[0].r_info = ELF64_R_INFO (indx64, howto->type);
+ }
+#else
+ BFD_FAIL();
+#endif
rel_hdr = reldata->hdr;
erel = rel_hdr->contents;
diff -rNU3 dist/bfd/elfn32-mips.c dist.nbsd/bfd/elfn32-mips.c
--- dist/bfd/elfn32-mips.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elfn32-mips.c Wed Nov 7 11:13:53 2012
@@ -81,6 +81,8 @@
(bfd *, Elf_Internal_Note *);
static bfd_boolean elf32_mips_grok_psinfo
(bfd *, Elf_Internal_Note *);
+static bfd_boolean mips_elf_n32_is_local_label_name
+ (bfd *, const char *);
static irix_compat_t elf_n32_mips_irix_compat
(bfd *);
@@ -2376,6 +2378,17 @@
return TRUE;
}
+/* MIPS ELF local labels start with "$L". */
+static bfd_boolean
+mips_elf_n32_is_local_label_name (bfd *abfd, const char *name)
+{
+ if (name[0] == '$' && name[1] == 'L')
+ return TRUE;
+
+ /* We accept the generic ELF local label syntax as well. */
+ return _bfd_elf_is_local_label_name (abfd, name);
+}
+
/* Depending on the target vector we generate some version of Irix
executables or "normal" MIPS ELF ABI executables. */
static irix_compat_t
@@ -2499,6 +2512,8 @@
#define elf_backend_write_section _bfd_mips_elf_write_section
#define elf_backend_mips_irix_compat elf_n32_mips_irix_compat
#define elf_backend_mips_rtype_to_howto mips_elf_n32_rtype_to_howto
+#define bfd_elf32_bfd_is_local_label_name \
+ mips_elf_n32_is_local_label_name
#define bfd_elf32_find_nearest_line _bfd_mips_elf_find_nearest_line
#define bfd_elf32_find_inliner_info _bfd_mips_elf_find_inliner_info
#define bfd_elf32_new_section_hook _bfd_mips_elf_new_section_hook
diff -rNU3 dist/bfd/elfxx-mips.c dist.nbsd/bfd/elfxx-mips.c
--- dist/bfd/elfxx-mips.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elfxx-mips.c Wed Nov 7 11:13:53 2012
@@ -5138,7 +5138,10 @@
|| ((r_type == R_MIPS_26 || r_type == R_MIPS_JALR)
&& target_is_16_bit_code_p));
- local_p = h == NULL || SYMBOL_REFERENCES_LOCAL (info, &h->root);
+ local_p = h == NULL
+ || (h->got_only_for_calls
+ ? SYMBOL_CALLS_LOCAL (info, &h->root)
+ : SYMBOL_REFERENCES_LOCAL (info, &h->root));
gp0 = _bfd_get_gp_value (input_bfd);
gp = _bfd_get_gp_value (abfd);
@@ -7813,10 +7816,24 @@
reloc types into the output file as R_MIPS_REL32
relocs. Make room for this reloc in .rel(a).dyn. */
mips_elf_allocate_dynamic_relocations (dynobj, info, 1);
- if (MIPS_ELF_READONLY_SECTION (sec))
- /* We tell the dynamic linker that there are
- relocations against the text segment. */
- info->flags |= DF_TEXTREL;
+ /* In the N32 and 64-bit ABIs there may be multiple
+ consecutive relocations for the same offset. If we have
+ a R_MIPS_GPREL32 followed by a R_MIPS_64 then that
+ relocation is complete and needs no futher adjustment. */
+ if ((rel == relocs
+ || rel[-1].r_offset != rel->r_offset
+ || r_type != R_MIPS_64
+ || ELF_R_TYPE(abfd, rel[-1].r_info) != R_MIPS_GPREL32)
+ && MIPS_ELF_READONLY_SECTION (sec))
+ {
+ /* We tell the dynamic linker that there are
+ relocations against the text segment. */
+ info->flags |= DF_TEXTREL;
+ info->callbacks->warning
+ (info,
+ _("relocation emitted against readonly section"),
+ NULL, abfd, sec, rel->r_offset);
+ }
}
else
{
diff -rNU3 dist/bfd/elfxx-sparc.c dist.nbsd/bfd/elfxx-sparc.c
--- dist/bfd/elfxx-sparc.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/elfxx-sparc.c Wed Nov 7 11:13:53 2012
@@ -2438,6 +2438,10 @@
{
struct bfd_link_info *info = (struct bfd_link_info *) inf;
+ if (info->warn_shared_textrel)
+ (*_bfd_error_handler)
+ (_("warning: dynamic relocation in readonly section `%s'"),
+ h->root.root.string);
info->flags |= DF_TEXTREL;
/* Not an error, just cut short the traversal. */
@@ -3388,10 +3392,8 @@
memset (&outrel, 0, sizeof outrel);
/* h->dynindx may be -1 if the symbol was marked to
become local. */
- else if (h != NULL &&
- h->dynindx != -1
- && (! is_plt
- || !info->shared
+ else if (h != NULL && h->dynindx != -1 && ! is_plt
+ && (!info->shared
|| !SYMBOLIC_BIND (info, h)
|| !h->def_regular))
{
diff -rNU3 dist/bfd/libbfd.h dist.nbsd/bfd/libbfd.h
--- dist/bfd/libbfd.h Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/libbfd.h Wed Nov 7 11:13:54 2012
@@ -2150,6 +2150,7 @@
"BFD_RELOC_XC16X_SEG",
"BFD_RELOC_XC16X_SOF",
"BFD_RELOC_VAX_GLOB_DAT",
+ "BFD_RELOC_VAX_GLOB_REF",
"BFD_RELOC_VAX_JMP_SLOT",
"BFD_RELOC_VAX_RELATIVE",
"BFD_RELOC_MT_PC16",
diff -rNU3 dist/bfd/reloc.c dist.nbsd/bfd/reloc.c
--- dist/bfd/reloc.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/bfd/reloc.c Wed Nov 7 11:13:53 2012
@@ -1775,6 +1775,17 @@
Relocations used by 68K ELF.
ENUM
+ BFD_RELOC_VAX_GLOB_DAT
+ENUMX
+ BFD_RELOC_VAX_GLOB_REF
+ENUMX
+ BFD_RELOC_VAX_JMP_SLOT
+ENUMX
+ BFD_RELOC_VAX_RELATIVE
+ENUMDOC
+ Relocations used by VAX ELF.
+
+ENUM
BFD_RELOC_32_BASEREL
ENUMX
BFD_RELOC_16_BASEREL
diff -rNU3 dist/binutils/Makefile.in dist.nbsd/binutils/Makefile.in
--- dist/binutils/Makefile.in Wed Nov 7 11:43:32 2012
+++ dist.nbsd/binutils/Makefile.in Wed Nov 7 11:13:54 2012
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -49,10 +49,12 @@
DIST_COMMON = NEWS README ChangeLog $(srcdir)/Makefile.in \
$(srcdir)/Makefile.am $(top_srcdir)/configure \
$(am__configure_deps) $(srcdir)/config.in \
- $(srcdir)/../mkinstalldirs $(top_srcdir)/po/Make-in arparse.h \
- arparse.c arlex.c defparse.h defparse.c deflex.c nlmheader.h \
- nlmheader.c arparse.h arparse.c arlex.c mcparse.h mcparse.c \
- rcparse.h rcparse.c $(srcdir)/../depcomp $(srcdir)/../ylwrap
+ $(srcdir)/../mkinstalldirs $(srcdir)/../mkinstalldirs \
+ $(top_srcdir)/po/Make-in arparse.h arparse.c arlex.c \
+ defparse.h defparse.c deflex.c nlmheader.h nlmheader.c \
+ arparse.h arparse.c arlex.c mcparse.h mcparse.c rcparse.h \
+ rcparse.c $(srcdir)/../depcomp $(srcdir)/../depcomp \
+ $(srcdir)/../ylwrap $(srcdir)/../ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
$(top_srcdir)/../config/zlib.m4 \
@@ -380,6 +382,7 @@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -921,7 +924,7 @@
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
+ @failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -946,7 +949,7 @@
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
+ @failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
diff -rNU3 dist/binutils/aclocal.m4 dist.nbsd/binutils/aclocal.m4
--- dist/binutils/aclocal.m4 Wed Nov 7 11:43:32 2012
+++ dist.nbsd/binutils/aclocal.m4 Wed Nov 7 11:13:54 2012
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
@@ -19,6 +19,31 @@
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@@ -34,7 +59,7 @@
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.1], [],
+m4_if([$1], [1.11], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -50,7 +75,7 @@
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.11])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
diff -rNU3 dist/binutils/bucomm.c dist.nbsd/binutils/bucomm.c
--- dist/binutils/bucomm.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/binutils/bucomm.c Wed Nov 7 11:13:54 2012
@@ -576,7 +576,14 @@
file_name, strerror (errno));
}
else if (! S_ISREG (statbuf.st_mode))
- non_fatal (_("Warning: '%s' is not an ordinary file"), file_name);
+ {
+ if (!S_ISCHR(statbuf.st_mode))
+ {
+ non_fatal (_("Warning: '%s' is not an ordinary file"), file_name);
+ return 0;
+ }
+ return statbuf.st_size ? statbuf.st_size : 1;
+ }
else if (statbuf.st_size < 0)
non_fatal (_("Warning: '%s' has negative size, probably it is too large"),
file_name);
diff -rNU3 dist/binutils/doc/Makefile.am dist.nbsd/binutils/doc/Makefile.am
--- dist/binutils/doc/Makefile.am Wed Nov 7 11:43:32 2012
+++ dist.nbsd/binutils/doc/Makefile.am Wed Nov 7 11:13:54 2012
@@ -42,6 +42,8 @@
# Man page generation from texinfo
addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_addr2line.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
-($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -49,6 +51,8 @@
rm -f addr2line.pod
ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_ar.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
-($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -56,6 +60,8 @@
rm -f ar.pod
dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_dlltool.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
-($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -63,6 +69,8 @@
rm -f dlltool.pod
nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_nlmconv.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
-($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -70,6 +78,8 @@
rm -f nlmconv.pod
nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_nm.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
-($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -77,6 +87,8 @@
rm -f nm.pod
objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_objcopy.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
-($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -84,6 +96,8 @@
rm -f objcopy.pod
objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_objdump.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
-($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -91,6 +105,8 @@
rm -f objdump.pod
ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_ranlib.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
-($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -98,6 +114,8 @@
rm -f ranlib.pod
readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_readelf.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
-($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -105,6 +123,8 @@
rm -f readelf.pod
size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_size.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
-($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -112,6 +132,8 @@
rm -f size.pod
strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_strings.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
-($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -119,6 +141,8 @@
rm -f strings.pod
strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_strip.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
-($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -133,6 +157,8 @@
rm -f elfedit.pod
windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_windres.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
-($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -140,6 +166,8 @@
rm -f windres.pod
windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_windmc.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
-($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -147,6 +175,8 @@
rm -f windmc.pod
cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_cxxfilt.man:
touch $@
-$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
-($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
diff -rNU3 dist/binutils/doc/Makefile.in dist.nbsd/binutils/doc/Makefile.in
--- dist/binutils/doc/Makefile.in Wed Nov 7 11:43:32 2012
+++ dist.nbsd/binutils/doc/Makefile.in Wed Nov 7 11:13:54 2012
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -240,6 +240,7 @@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -347,6 +348,8 @@
-rm -rf .libs _libs
binutils.info: binutils.texi
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_binutils.info: binutils.texi
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
@@ -733,6 +736,8 @@
# Man page generation from texinfo
addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_addr2line.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
-($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -740,6 +745,8 @@
rm -f addr2line.pod
ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_ar.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
-($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -747,6 +754,8 @@
rm -f ar.pod
dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_dlltool.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
-($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -754,6 +763,8 @@
rm -f dlltool.pod
nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_nlmconv.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
-($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -761,6 +772,8 @@
rm -f nlmconv.pod
nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_nm.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
-($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -768,6 +781,8 @@
rm -f nm.pod
objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_objcopy.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
-($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -775,6 +790,8 @@
rm -f objcopy.pod
objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_objdump.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
-($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -782,6 +799,8 @@
rm -f objdump.pod
ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_ranlib.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
-($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -789,6 +808,8 @@
rm -f ranlib.pod
readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_readelf.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
-($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -796,6 +817,8 @@
rm -f readelf.pod
size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_size.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
-($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -803,6 +826,8 @@
rm -f size.pod
strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_strings.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
-($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -810,6 +835,8 @@
rm -f strings.pod
strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_strip.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
-($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -817,6 +844,8 @@
rm -f strip.pod
elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_elfedit.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod
-($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -824,6 +853,8 @@
rm -f elfedit.pod
windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_windres.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
-($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -831,6 +862,8 @@
rm -f windres.pod
windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_windmc.1:
touch $@
-$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
-($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
@@ -838,6 +871,8 @@
rm -f windmc.pod
cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_cxxfilt.man:
touch $@
-$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
-($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
diff -rNU3 dist/binutils/doc/elfedit.1 dist.nbsd/binutils/doc/elfedit.1
--- dist/binutils/doc/elfedit.1 Wed Nov 7 11:43:32 2012
+++ dist.nbsd/binutils/doc/elfedit.1 Wed Nov 7 11:13:54 2012
@@ -1,15 +1,7 @@
-.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
@@ -53,7 +45,7 @@
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
@@ -132,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "ELFEDIT 1"
-.TH ELFEDIT 1 "2011-06-27" "binutils-2.21.1" "GNU Development Tools"
+.TH ELFEDIT 1 "2011-09-24" "binutils-2.21.1" "GNU Development Tools"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
diff -rNU3 dist/binutils/doc/strings.1 dist.nbsd/binutils/doc/strings.1
--- dist/binutils/doc/strings.1 Wed Nov 7 11:43:32 2012
+++ dist.nbsd/binutils/doc/strings.1 Wed Nov 7 11:13:54 2012
@@ -216,7 +216,7 @@
characters (\s-1ASCII\s0, \s-1ISO\s0 8859, etc., default), \fBS\fR =
single\-8\-bit\-byte characters, \fBb\fR = 16\-bit bigendian, \fBl\fR =
16\-bit littleendian, \fBB\fR = 32\-bit bigendian, \fBL\fR = 32\-bit
-littleendian. Useful for finding wide character strings. (\fBl\fR
+littleendian. Useful for finding wide-character strings. (\fBl\fR
and \fBb\fR apply to, for example, Unicode \s-1UTF\-16/UCS\-2\s0 encodings).
.IP "\fB\-T\fR \fIbfdname\fR" 4
.IX Item "-T bfdname"
diff -rNU3 dist/binutils/objcopy.c dist.nbsd/binutils/objcopy.c
--- dist/binutils/objcopy.c Wed Nov 7 11:43:32 2012
+++ dist.nbsd/binutils/objcopy.c Wed Nov 7 11:13:54 2012
@@ -31,6 +31,7 @@
#include "fnmatch.h"
#include "elf-bfd.h"
#include <sys/stat.h>
+#include <ctype.h>
#include "libbfd.h"
#include "coff/internal.h"
#include "libcoff.h"
diff -rNU3 dist/binutils/readelf.c dist.nbsd/binutils/readelf.c
--- dist/binutils/readelf.c Wed Nov 7 11:43:31 2012
+++ dist.nbsd/binutils/readelf.c Wed Nov 7 11:13:54 2012
@@ -11933,6 +11933,23 @@
}
break;
+ /* On SuperH, PT_GETREGS == mach+3 and PT_GETFPREGS == mach+5.
+ There's also old PT___GETREGS40 == mach + 1 for old reg
+ structure which lacks GBR. */
+ case EM_SH:
+ switch (e_type)
+ {
+ case NT_NETBSDCORE_FIRSTMACH + 1:
+ return _("PT___GETREGS40 (old reg structure)");
+ case NT_NETBSDCORE_FIRSTMACH + 3:
+ return _("PT_GETREGS (reg structure)");
+ case NT_NETBSDCORE_FIRSTMACH + 5:
+ return _("PT_GETFPREGS (fpreg structure)");
+ default:
+ break;
+ }
+ break;
+
/* On all other arch's, PT_GETREGS == mach+1 and
PT_GETFPREGS == mach+3. */
default:
diff -rNU3 dist/binutils/strings.c dist.nbsd/binutils/strings.c
--- dist/binutils/strings.c Wed Nov 7 11:43:31 2012
+++ dist.nbsd/binutils/strings.c Wed Nov 7 11:13:54 2012
@@ -596,7 +596,7 @@
else
#elif !BFD_HOST_64BIT_LONG
if (start != (unsigned long) start)
- printf ("++%7ld ", (unsigned long) start);
+ printf ("++%7llu ", (unsigned long) start);
else
#endif
printf ("%7ld ", (long) start);
diff -rNU3 dist/config.guess dist.nbsd/config.guess
--- dist/config.guess Wed Nov 7 11:43:31 2012
+++ dist.nbsd/config.guess Wed Nov 7 11:13:54 2012
@@ -968,6 +968,9 @@
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
diff -rNU3 dist/config.sub dist.nbsd/config.sub
--- dist/config.sub Wed Nov 7 11:43:31 2012
+++ dist.nbsd/config.sub Wed Nov 7 11:13:54 2012
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
-timestamp='2010-05-21'
+timestamp='2009-12-31'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -124,9 +124,9 @@
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | \
+ netbsd*-gnu* | netbsd*-eabi* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
@@ -296,7 +296,7 @@
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
- | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | tahoe | thumb | tic4x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| we32k \
@@ -304,15 +304,6 @@
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
- c54x)
- basic_machine=tic54x-unknown
- ;;
- c55x)
- basic_machine=tic55x-unknown
- ;;
- c6x)
- basic_machine=tic6x-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -344,7 +335,7 @@
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
@@ -391,8 +382,7 @@
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
- | tile-* | tilegx-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
@@ -492,15 +482,6 @@
basic_machine=powerpc-ibm
os=-cnk
;;
- c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
c90)
basic_machine=c90-cray
os=-unicos
@@ -1094,11 +1075,18 @@
basic_machine=t90-cray
os=-unicos
;;
- # This must be matched before tile*.
- tilegx*)
- basic_machine=tilegx-unknown
- os=-linux-gnu
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
@@ -1308,8 +1296,7 @@
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1491,15 +1478,6 @@
;;
c4x-* | tic4x-*)
os=-coff
- ;;
- tic54x-*)
- os=-coff
- ;;
- tic55x-*)
- os=-coff
- ;;
- tic6x-*)
- os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
diff -rNU3 dist/configure dist.nbsd/configure
--- dist/configure Wed Nov 7 11:43:31 2012
+++ dist.nbsd/configure Wed Nov 7 11:13:54 2012
@@ -2670,7 +2670,7 @@
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
# If --enable-gold is used, "gold" may replace "ld".
-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"
+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"
# libgcj represents the runtime libraries only used by gcj.
libgcj="target-libffi \
diff -rNU3 dist/gas/atof-generic.c dist.nbsd/gas/atof-generic.c
--- dist/gas/atof-generic.c Wed Nov 7 11:43:31 2012
+++ dist.nbsd/gas/atof-generic.c Wed Nov 7 11:13:45 2012
@@ -121,6 +121,32 @@
switch (first_digit[0])
{
+ case 's':
+ case 'S':
+ if (!strncasecmp ("snan", first_digit, 4))
+ {
+ address_of_generic_floating_point_number->sign = 0;
+ address_of_generic_floating_point_number->exponent = 0;
+ address_of_generic_floating_point_number->leader =
+ address_of_generic_floating_point_number->low;
+ *address_of_string_pointer = first_digit + 4;
+ return 0;
+ }
+ break;
+
+ case 'q':
+ case 'Q':
+ if (!strncasecmp ("qnan", first_digit, 4))
+ {
+ address_of_generic_floating_point_number->sign = 0;
+ address_of_generic_floating_point_number->exponent = 0;
+ address_of_generic_floating_point_number->leader =
+ address_of_generic_floating_point_number->low;
+ *address_of_string_pointer = first_digit + 4;
+ return 0;
+ }
+ break;
+
case 'n':
case 'N':
if (!strncasecmp ("nan", first_digit, 3))
diff -rNU3 dist/gas/config/atof-vax.c dist.nbsd/gas/config/atof-vax.c
--- dist/gas/config/atof-vax.c Wed Nov 7 11:43:31 2012
+++ dist.nbsd/gas/config/atof-vax.c Wed Nov 7 11:13:46 2012
@@ -268,10 +268,27 @@
int exponent_skippage;
LITTLENUM_TYPE word1;
- /* JF: Deal with new Nan, +Inf and -Inf codes. */
if (f->sign != '-' && f->sign != '+')
{
- make_invalid_floating_point_number (words);
+ if (f->sign == 0)
+ {
+ /* All NaNs are 0. */
+ memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision);
+ }
+ else if (f->sign == 'P')
+ {
+ /* Positive Infinity. */
+ memset (words, 0xff, sizeof (LITTLENUM_TYPE) * precision);
+ words[0] &= 0x7fff;
+ }
+ else if (f->sign == 'N')
+ {
+ /* Negative Infinity. */
+ memset (words, 0x00, sizeof (LITTLENUM_TYPE) * precision);
+ words[0] = 0x0080;
+ }
+ else
+ make_invalid_floating_point_number (words);
return return_value;
}
diff -rNU3 dist/gas/config/tc-arm.c dist.nbsd/gas/config/tc-arm.c
--- dist/gas/config/tc-arm.c Wed Nov 7 11:43:31 2012
+++ dist.nbsd/gas/config/tc-arm.c Wed Nov 7 11:13:46 2012
@@ -16133,12 +16133,16 @@
asection *sect;
for (sect = stdoutput->sections; sect != NULL; sect = sect->next)
- if (seg_info (sect)->tc_segment_info_data.current_it.state
- == MANUAL_IT_BLOCK)
- {
- as_warn (_("section '%s' finished with an open IT block."),
- sect->name);
- }
+ {
+ segment_info_type *seginfo = seg_info (sect);
+
+ if (seginfo && seginfo->tc_segment_info_data.current_it.state
+ == MANUAL_IT_BLOCK)
+ {
+ as_warn (_("section '%s' finished with an open IT block."),
+ sect->name);
+ }
+ }
#else
if (now_it.state == MANUAL_IT_BLOCK)
as_warn (_("file finished with an open IT block."));
diff -rNU3 dist/gas/config/tc-mips.c dist.nbsd/gas/config/tc-mips.c
--- dist/gas/config/tc-mips.c Wed Nov 7 11:43:31 2012
+++ dist.nbsd/gas/config/tc-mips.c Wed Nov 7 11:13:46 2012
@@ -763,6 +763,9 @@
NUM_FIX_VR4120_CLASSES
};
+/* ...likewise -mtrap-zero-jump. */
+static bfd_boolean mips_trap_zero_jump;
+
/* ...likewise -mfix-loongson2f-jump. */
static bfd_boolean mips_fix_loongson2f_jump;
@@ -795,6 +798,8 @@
efficient expansion. */
static int mips_relax_branch;
+
+static int mips_fix_loongson2f_btb;
/* The expansion of many macros depends on the type of symbol that
they refer to. For example, when generating position-dependent code,
@@ -1068,6 +1073,7 @@
static void mips16_macro_build
(expressionS *, const char *, const char *, va_list *);
static void load_register (int, expressionS *, int);
+static void macro_build (expressionS *, const char *, const char *, ...);
static void macro_start (void);
static void macro_end (void);
static void macro (struct mips_cl_insn * ip);
@@ -2744,6 +2750,35 @@
return nops;
}
+static void
+trap_zero_jump (struct mips_cl_insn * ip)
+{
+ if (strcmp (ip->insn_mo->name, "j") == 0
+ || strcmp (ip->insn_mo->name, "jr") == 0
+ || strcmp (ip->insn_mo->name, "jalr") == 0)
+ {
+ int sreg;
+
+ if (mips_opts.warn_about_macros)
+ return;
+
+ sreg = EXTRACT_OPERAND (RS, *ip);
+ if (mips_opts.isa == ISA_MIPS32
+ || mips_opts.isa == ISA_MIPS32R2
+ || mips_opts.isa == ISA_MIPS64
+ || mips_opts.isa == ISA_MIPS64R2)
+ {
+ expressionS ep;
+ ep.X_op = O_constant;
+ ep.X_add_number = 4096;
+ macro_build (&ep, "tltiu", "s,j", sreg, BFD_RELOC_LO16);
+ }
+ else if (mips_opts.isa != ISA_UNKNOWN
+ && mips_opts.isa != ISA_MIPS1)
+ macro_build (NULL, "teq", "s,t", sreg, 0);
+ }
+}
+
/* Fix NOP issue: Replace nops by "or at,at,zero". */
static void
@@ -2779,6 +2814,12 @@
ep.X_add_number = 0xffff;
macro_build (&ep, "ori", "t,r,i", ATREG, ATREG, BFD_RELOC_LO16);
macro_build (NULL, "and", "d,v,t", sreg, sreg, ATREG);
+ /* Hide these three instructions to avoid getting a ``macro expanded into
+ multiple instructions'' warning. */
+ if (mips_relax.sequence != 2)
+ mips_macro_warning.sizes[0] -= 3 * 4;
+ if (mips_relax.sequence != 1)
+ mips_macro_warning.sizes[1] -= 3 * 4;
}
}
@@ -2807,6 +2848,8 @@
if (mips_fix_loongson2f)
fix_loongson2f (ip);
+ if (mips_trap_zero_jump)
+ trap_zero_jump (ip);
/* Mark instruction labels in mips16 mode. */
mips16_mark_labels ();
@@ -3602,6 +3645,41 @@
r[i] = (bfd_reloc_code_real_type) va_arg (*args, int);
}
+/* Fix jump through register issue on loongson2f processor for kernel code:
+ force a BTB clear before the jump to prevent it from being incorrectly
+ prefetched by the branch prediction engine. */
+
+static void
+macro_build_jrpatch (expressionS *ep, unsigned int sreg)
+{
+ if (!mips_fix_loongson2f_btb)
+ return;
+
+ if (sreg == ZERO || sreg == KT0 || sreg == KT1 || sreg == AT)
+ return;
+
+ if (!mips_opts.at)
+ {
+ as_warn (_("unable to apply loongson2f BTB workaround when .set noat"));
+ return;
+ }
+
+ /* li $at, COP_0_BTB_CLEAR | COP_0_RAS_DISABLE */
+ ep->X_op = O_constant;
+ ep->X_add_number = 3;
+ macro_build (ep, "ori", "t,r,i", AT, ZERO, BFD_RELOC_LO16);
+
+ /* dmtc0 $at, COP_0_DIAG */
+ macro_build (NULL, "dmtc0", "t,G", AT, 22);
+
+ /* Hide these two instructions to avoid getting a ``macro expanded into
+ multiple instructions'' warning. */
+ if (mips_relax.sequence != 2)
+ mips_macro_warning.sizes[0] -= 2 * 4;
+ if (mips_relax.sequence != 1)
+ mips_macro_warning.sizes[1] -= 2 * 4;
+}
+
/* Build an instruction created by a macro expansion. This is passed
a pointer to the count of instructions created so far, an
expression, the name of the instruction to build, an operand format
@@ -3999,6 +4077,7 @@
frag_grow (8);
f = frag_more (0);
}
+ macro_build_jrpatch (ep, PIC_CALL_REG);
macro_build (NULL, "jalr", "d,s", RA, PIC_CALL_REG);
if (MIPS_JALR_HINT_P (ep))
fix_new_exp (frag_now, f - frag_now->fr_literal,
@@ -6138,6 +6217,26 @@
macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t", treg, tempreg, breg);
break;
+ case M_JR_S:
+ macro_build_jrpatch (&expr1, sreg);
+ macro_build (NULL, "jr", "s", sreg);
+ return; /* didn't modify $at */
+
+ case M_J_S:
+ macro_build_jrpatch (&expr1, sreg);
+ macro_build (NULL, "j", "s", sreg);
+ return; /* didn't modify $at */
+
+ case M_JALR_S:
+ macro_build_jrpatch (&expr1, sreg);
+ macro_build (NULL, "jalr", "s", sreg);
+ return; /* didn't modify $at */
+
+ case M_JALR_DS:
+ macro_build_jrpatch (&expr1, sreg);
+ macro_build (NULL, "jalr", "d,s", dreg, sreg);
+ return; /* didn't modify $at */
+
case M_MSGSND:
{
unsigned long temp = (treg << 16) | (0x01);
@@ -6193,12 +6292,16 @@
/* Fall through. */
case M_JAL_2:
if (mips_pic == NO_PIC)
- macro_build (NULL, "jalr", "d,s", dreg, sreg);
+ {
+ macro_build_jrpatch (&expr1, sreg);
+ macro_build (NULL, "jalr", "d,s", dreg, sreg);
+ }
else
{
if (sreg != PIC_CALL_REG)
as_warn (_("MIPS PIC call to register other than $25"));
+ macro_build_jrpatch (&expr1, sreg);
macro_build (NULL, "jalr", "d,s", dreg, sreg);
if (mips_pic == SVR4_PIC && !HAVE_NEWABI)
{
@@ -11243,6 +11346,8 @@
OPTION_SINGLE_FLOAT,
OPTION_DOUBLE_FLOAT,
OPTION_32,
+ OPTION_TRAP_ZERO_JUMP,
+ OPTION_NO_TRAP_ZERO_JUMP,
#ifdef OBJ_ELF
OPTION_CALL_SHARED,
OPTION_CALL_NONPIC,
@@ -11257,6 +11362,8 @@
OPTION_NO_PDR,
OPTION_MVXWORKS_PIC,
#endif /* OBJ_ELF */
+ OPTION_FIX_LOONGSON2F_BTB,
+ OPTION_NO_FIX_LOONGSON2F_BTB,
OPTION_END_OF_ENUM
};
@@ -11310,6 +11417,8 @@
{"mno-fix-loongson2f-jump", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_JUMP},
{"mfix-loongson2f-nop", no_argument, NULL, OPTION_FIX_LOONGSON2F_NOP},
{"mno-fix-loongson2f-nop", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_NOP},
+ {"mfix-loongson2f-btb", no_argument, NULL, OPTION_FIX_LOONGSON2F_BTB},
+ {"mno-fix-loongson2f-btb", no_argument, NULL, OPTION_NO_FIX_LOONGSON2F_BTB},
{"mfix-vr4120", no_argument, NULL, OPTION_FIX_VR4120},
{"mno-fix-vr4120", no_argument, NULL, OPTION_NO_FIX_VR4120},
{"mfix-vr4130", no_argument, NULL, OPTION_FIX_VR4130},
@@ -11348,6 +11457,9 @@
make testing easier. */
{"32", no_argument, NULL, OPTION_32},
+ {"mtrap-zero-jump", no_argument, NULL, OPTION_TRAP_ZERO_JUMP},
+ {"mno-trap-zero-jump", no_argument, NULL, OPTION_NO_TRAP_ZERO_JUMP},
+
/* ELF-specific options. */
#ifdef OBJ_ELF
{"KPIC", no_argument, NULL, OPTION_CALL_SHARED},
@@ -11611,6 +11723,14 @@
mips_fix_vr4130 = 0;
break;
+ case OPTION_FIX_LOONGSON2F_BTB:
+ mips_fix_loongson2f_btb = 1;
+ break;
+
+ case OPTION_NO_FIX_LOONGSON2F_BTB:
+ mips_fix_loongson2f_btb = 0;
+ break;
+
case OPTION_FIX_CN63XXP1:
mips_fix_cn63xxp1 = TRUE;
break;
@@ -11643,6 +11763,14 @@
mips_opts.sym32 = FALSE;
break;
+ case OPTION_TRAP_ZERO_JUMP:
+ mips_trap_zero_jump = TRUE;
+ break;
+
+ case OPTION_NO_TRAP_ZERO_JUMP:
+ mips_trap_zero_jump = FALSE;
+ break;
+
#ifdef OBJ_ELF
/* When generating ELF code, we permit -KPIC and -call_shared to
select SVR4_PIC, and -non_shared to select no PIC. This is
@@ -15587,6 +15715,7 @@
fprintf (stream, _("\
-mfix-loongson2f-jump work around Loongson2F JUMP instructions\n\
-mfix-loongson2f-nop work around Loongson2F NOP errata\n\
+-mfix-loongson2f-btb work around Loongson2F BTB errata\n\
-mfix-vr4120 work around certain VR4120 errata\n\
-mfix-vr4130 work around VR4130 mflo/mfhi errata\n\
-mfix-24k insert a nop after ERET and DERET instructions\n\
diff -rNU3 dist/gas/config/tc-vax.c dist.nbsd/gas/config/tc-vax.c
--- dist/gas/config/tc-vax.c Wed Nov 7 11:43:31 2012
+++ dist.nbsd/gas/config/tc-vax.c Wed Nov 7 11:13:46 2012
@@ -392,6 +392,9 @@
&& (PLT_symbol == NULL || fragP->fr_symbol != PLT_symbol)
&& fragP->fr_symbol != NULL
&& flag_want_pic
+#ifdef OBJ_ELF
+ && ELF_ST_VISIBILITY (S_GET_OTHER (fragP->fr_symbol)) != STV_HIDDEN
+#endif
&& (!S_IS_DEFINED (fragP->fr_symbol)
|| S_IS_WEAK (fragP->fr_symbol)
|| S_IS_EXTERNAL (fragP->fr_symbol)))
@@ -1073,6 +1076,154 @@
return retval;
}
+#ifdef OBJ_AOUT
+#ifndef BFD_ASSEMBLER
+void
+tc_aout_fix_to_chars (where, fixP, segment_address_in_file)
+ char *where;
+ fixS *fixP;
+ relax_addressT segment_address_in_file;
+{
+ /*
+ * In: length of relocation (or of address) in chars: 1, 2 or 4.
+ * Out: GNU LD relocation length code: 0, 1, or 2.
+ */
+
+ static const unsigned char nbytes_r_length[] = {42, 0, 1, 42, 2};
+ int r_symbolnum;
+ int r_flags;
+
+ know (fixP->fx_addsy != NULL);
+
+ md_number_to_chars (where,
+ fixP->fx_frag->fr_address + fixP->fx_where - segment_address_in_file,
+ 4);
+
+ r_symbolnum = (S_IS_DEFINED (fixP->fx_addsy)
+ ? S_GET_TYPE (fixP->fx_addsy)
+ : fixP->fx_addsy->sy_number);
+ r_flags = (fixP->fx_pcrel ? 1 : 0)
+ | (!S_IS_DEFINED (fixP->fx_addsy) ? 8 : 0) /* extern */
+ | ((nbytes_r_length[fixP->fx_size] & 3) << 1);
+
+#if 0
+ r_flags |= ((!S_IS_DEFINED(fixP->fx_addsy)
+ && fixP->fx_pcrel
+ && fixP->fx_addsy != GOT_symbol
+ && fixP->fx_addsy != PLT_symbol
+ && flags_want_pic) ? 0x10 : 0);
+#endif
+
+ switch (fixP->fx_r_type) {
+ case NO_RELOC:
+ break;
+ case NO_RELOC2:
+ if (r_flags & 8)
+ r_flags |= 0x80; /* setting the copy bit */
+ /* says we can convert */
+ /* to gotslot if needed */
+ break;
+ case RELOC_32:
+ if (flag_want_pic && S_IS_EXTERNAL(fixP->fx_addsy)) {
+ r_symbolnum = fixP->fx_addsy->sy_number;
+ r_flags |= 8; /* set extern bit */
+ }
+ break;
+ case RELOC_JMP_SLOT:
+ if (flag_want_pic) {
+ r_flags |= 0x20; /* set jmptable */
+ r_flags &= ~0x08; /* clear extern bit */
+ }
+ break;
+ case RELOC_JMP_TBL:
+ if (flag_want_pic) {
+ r_flags |= 0x20; /* set jmptable */
+ r_flags |= 0x08; /* set extern bit */
+ }
+ break;
+ case RELOC_GLOB_DAT:
+ if (flag_want_pic) {
+ r_flags |= 0x10; /* set baserel bit */
+ r_symbolnum = fixP->fx_addsy->sy_number;
+ if (S_IS_EXTERNAL(fixP->fx_addsy))
+ r_flags |= 8; /* set extern bit */
+ }
+ break;
+ }
+
+ where[4] = (r_symbolnum >> 0) & 0xff;
+ where[5] = (r_symbolnum >> 8) & 0xff;
+ where[6] = (r_symbolnum >> 16) & 0xff;
+ where[7] = r_flags;
+}
+#endif /* !BFD_ASSEMBLER */
+#endif /* OBJ_AOUT */
+
+/*
+ * BUGS, GRIPES, APOLOGIA, etc.
+ *
+ * The opcode table 'votstrs' needs to be sorted on opcode frequency.
+ * That is, AFTER we hash it with hash_...(), we want most-used opcodes
+ * to come out of the hash table faster.
+ *
+ * I am sorry to inflict yet another VAX assembler on the world, but
+ * RMS says we must do everything from scratch, to prevent pin-heads
+ * restricting this software.
+ */
+
+/*
+ * This is a vaguely modular set of routines in C to parse VAX
+ * assembly code using DEC mnemonics. It is NOT un*x specific.
+ *
+ * The idea here is that the assembler has taken care of all:
+ * labels
+ * macros
+ * listing
+ * pseudo-ops
+ * line continuation
+ * comments
+ * condensing any whitespace down to exactly one space
+ * and all we have to do is parse 1 line into a vax instruction
+ * partially formed. We will accept a line, and deliver:
+ * an error message (hopefully empty)
+ * a skeleton VAX instruction (tree structure)
+ * textual pointers to all the operand expressions
+ * a warning message that notes a silly operand (hopefully empty)
+ */
+
+/*
+ * E D I T H I S T O R Y
+ *
+ * 17may86 Dean Elsner. Bug if line ends immediately after opcode.
+ * 30apr86 Dean Elsner. New vip_op() uses arg block so change call.
+ * 6jan86 Dean Elsner. Crock vip_begin() to call vip_op_defaults().
+ * 2jan86 Dean Elsner. Invent synthetic opcodes.
+ * Widen vax_opcodeT to 32 bits. Use a bit for VIT_OPCODE_SYNTHETIC,
+ * which means this is not a real opcode, it is like a macro; it will
+ * be relax()ed into 1 or more instructions.
+ * Use another bit for VIT_OPCODE_SPECIAL if the op-code is not optimised
+ * like a regular branch instruction. Option added to vip_begin():
+ * exclude synthetic opcodes. Invent synthetic_votstrs[].
+ * 31dec85 Dean Elsner. Invent vit_opcode_nbytes.
+ * Also make vit_opcode into a char[]. We now have n-byte vax opcodes,
+ * so caller's don't have to know the difference between a 1-byte & a
+ * 2-byte op-code. Still need vax_opcodeT concept, so we know how
+ * big an object must be to hold an op.code.
+ * 30dec85 Dean Elsner. Widen typedef vax_opcodeT in "vax-inst.h"
+ * because vax opcodes may be 16 bits. Our crufty C compiler was
+ * happily initialising 8-bit vot_codes with 16-bit numbers!
+ * (Wouldn't the 'phone company like to compress data so easily!)
+ * 29dec85 Dean Elsner. New static table vax_operand_width_size[].
+ * Invented so we know hw many bytes a "I^#42" needs in its immediate
+ * operand. Revised struct vop in "vax-inst.h": explicitly include
+ * byte length of each operand, and it's letter-code datum type.
+ * 17nov85 Dean Elsner. Name Change.
+ * Due to ar(1) truncating names, we learned the hard way that
+ * "vax-inst-parse.c" -> "vax-inst-parse." dropping the "o" off
+ * the archived object name. SO... we shortened the name of this
+ * source file, and changed the makefile.
+ */
+
/* Parse a vax operand in DEC assembler notation.
For speed, expect a string of whitespace to be reduced to a single ' '.
This is the case for GNU AS, and is easy for other DEC-compatible
@@ -3150,7 +3301,7 @@
if (flag_want_pic && operandP->vop_mode == 8
&& this_add_symbol != NULL)
{
- as_warn (_("Symbol %s used as immediate operand in PIC mode."),
+ as_warn (_("Symbol '%s' used as immediate operand in PIC mode."),
S_GET_NAME (this_add_symbol));
}
#endif
@@ -3226,7 +3377,15 @@
length = 4;
}
}
+#ifdef OBJ_ELF
+ if (flag_want_pic && this_add_symbol != NULL)
+ {
+ as_warn (_("Symbol '%s' used as displacement in PIC mode."),
+ S_GET_NAME (this_add_symbol));
+ }
+#endif
p = frag_more (1 + length);
+ know (operandP->vop_reg != 0xf);
know (operandP->vop_reg >= 0);
p[0] = operandP->vop_reg
| ((at | "?\12\14?\16"[length]) << 4);
diff -rNU3 dist/gas/config/vax-inst.h dist.nbsd/gas/config/vax-inst.h
--- dist/gas/config/vax-inst.h Wed Nov 7 11:43:31 2012
+++ dist.nbsd/gas/config/vax-inst.h Wed Nov 7 11:13:46 2012
@@ -66,6 +66,8 @@
#define VAX_WIDEN_WORD (0x20) /* Add this to byte branch to get word br. */
#define VAX_WIDEN_LONG (0x6) /* Add this to byte branch to get long jmp.*/
/* Needs VAX_PC_RELATIVE_MODE byte after it*/
+#define VAX_CALLS (0xFB) /* Call with arg list on stack */
+#define VAX_CALLG (0xFA) /* Call with arg list in memory */
struct vit /* vax instruction tree */
{
diff -rNU3 dist/gas/doc/Makefile.am dist.nbsd/gas/doc/Makefile.am
--- dist/gas/doc/Makefile.am Wed Nov 7 11:43:31 2012
+++ dist.nbsd/gas/doc/Makefile.am Wed Nov 7 11:13:46 2012
@@ -24,6 +24,8 @@
-I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
asconfig.texi: $(CONFIG).texi
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_asconfig.text:
rm -f asconfig.texi
cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
chmod u+w ./asconfig.texi
@@ -96,6 +98,8 @@
# The sed command removes the no-adjust Nroff command so that
# the man output looks standard.
as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_as.1:
touch $@
-$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
-($(POD2MAN) as.pod | \
diff -rNU3 dist/gas/doc/Makefile.in dist.nbsd/gas/doc/Makefile.in
--- dist/gas/doc/Makefile.in Wed Nov 7 11:43:31 2012
+++ dist.nbsd/gas/doc/Makefile.in Wed Nov 7 11:13:46 2012
@@ -366,6 +366,8 @@
-rm -rf .libs _libs
as.info: as.texinfo $(as_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_as.info: as.texinfo $(as_TEXINFOS)
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
@@ -748,6 +750,8 @@
asconfig.texi: $(CONFIG).texi
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_asconfig.texi:
rm -f asconfig.texi
cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
chmod u+w ./asconfig.texi
@@ -765,6 +769,8 @@
# The sed command removes the no-adjust Nroff command so that
# the man output looks standard.
as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_as.1:
touch $@
-$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
-($(POD2MAN) as.pod | \
Binary files dist/gas/doc/as.info and dist.nbsd/gas/doc/as.info differ
diff -rNU3 dist/gas/doc/c-mips.texi dist.nbsd/gas/doc/c-mips.texi
--- dist/gas/doc/c-mips.texi Wed Nov 7 11:43:31 2012
+++ dist.nbsd/gas/doc/c-mips.texi Wed Nov 7 11:13:46 2012
@@ -196,6 +196,14 @@
@itemx -mno-fix-vr4130
Insert nops to work around the VR4130 @samp{mflo}/@samp{mfhi} errata.
+@item -mfix-loongson2f-btb
+@itemx -mno-fix-loongson2f-btb
+Clear the Branch Target Buffer before any jump through a register. This
+option is intended to be used on kernel code for the Loongson 2F processor
+only; userland code compiled with this option will fault, and kernel code
+compiled with this option run on another processor than Loongson 2F will
+yield unpredictable results.
+
@item -mfix-24k
@itemx -no-mfix-24k
Insert nops to work around the 24K @samp{eret}/@samp{deret} errata.
diff -rNU3 dist/gas/remap.c dist.nbsd/gas/remap.c
--- dist/gas/remap.c Wed Nov 7 11:43:31 2012
+++ dist.nbsd/gas/remap.c Wed Nov 7 11:13:50 2012
@@ -82,8 +82,8 @@
return filename;
name = filename + map->old_len;
name_len = strlen (name) + 1;
- s = (char *) alloca (name_len + map->new_len);
+ s = (char *) xmalloc (name_len + map->new_len);
memcpy (s, map->new_prefix, map->new_len);
memcpy (s + map->new_len, name, name_len);
- return xstrdup (s);
+ return s;
}
diff -rNU3 dist/gprof/corefile.c dist.nbsd/gprof/corefile.c
--- dist/gprof/corefile.c Wed Nov 7 11:43:28 2012
+++ dist.nbsd/gprof/corefile.c Wed Nov 7 11:13:50 2012
@@ -29,6 +29,8 @@
#include "corefile.h"
#include "safe-ctype.h"
+#include <stdlib.h>
+
bfd *core_bfd;
static int core_num_syms;
static asymbol **core_syms;
diff -rNU3 dist/gprof/gprof.1 dist.nbsd/gprof/gprof.1
--- dist/gprof/gprof.1 Wed Nov 7 11:43:28 2012
+++ dist.nbsd/gprof/gprof.1 Wed Nov 7 11:13:50 2012
@@ -1,15 +1,7 @@
-.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
+.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16)
.\"
.\" Standard preamble:
.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
@@ -53,7 +45,7 @@
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
@@ -132,7 +124,7 @@
.\" ========================================================================
.\"
.IX Title "GPROF 1"
-.TH GPROF 1 "2011-06-27" "binutils-2.21.1" "GNU"
+.TH GPROF 1 "2011-09-24" "binutils-2.21.1" "GNU"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -475,7 +467,7 @@
compilers have different mangling styles. The optional demangling style
argument can be used to choose an appropriate demangling style for your
compiler.
-.Sh "Analysis Options"
+.SS "Analysis Options"
.IX Subsection "Analysis Options"
.ie n .IP """\-a""" 4
.el .IP "\f(CW\-a\fR" 4
@@ -604,7 +596,7 @@
functions in the flat profile, even those that were never called, and
that had no time spent in them. This is useful in conjunction with the
\&\fB\-c\fR option for discovering which routines were never called.
-.Sh "Miscellaneous Options"
+.SS "Miscellaneous Options"
.IX Subsection "Miscellaneous Options"
.ie n .IP """\-d[\f(CInum\f(CW]""" 4
.el .IP "\f(CW\-d[\f(CInum\f(CW]\fR" 4
@@ -663,7 +655,7 @@
.PD
The \fB\-v\fR flag causes \f(CW\*(C`gprof\*(C'\fR to print the current version
number, and then exit.
-.Sh "Deprecated Options"
+.SS "Deprecated Options"
.IX Subsection "Deprecated Options"
These options have been replaced with newer versions that use symspecs.
.ie n .IP """\-e \f(CIfunction_name\f(CW""" 4
diff -rNU3 dist/gprof/gprof.c dist.nbsd/gprof/gprof.c
--- dist/gprof/gprof.c Wed Nov 7 11:43:28 2012
+++ dist.nbsd/gprof/gprof.c Wed Nov 7 11:13:50 2012
@@ -47,6 +47,8 @@
static void usage (FILE *, int) ATTRIBUTE_NORETURN;
+#include <stdlib.h>
+
const char * whoami;
const char * function_mapping_file;
static const char * external_symbol_table;
Binary files dist/gprof/gprof.info and dist.nbsd/gprof/gprof.info differ
diff -rNU3 dist/include/bfdlink.h dist.nbsd/include/bfdlink.h
--- dist/include/bfdlink.h Wed Nov 7 11:43:28 2012
+++ dist.nbsd/include/bfdlink.h Wed Nov 7 11:13:45 2012
@@ -403,6 +403,10 @@
option). If this is NULL, no symbols are being wrapped. */
struct bfd_hash_table *wrap_hash;
+ /* Hash table of symbols which may be left unresolved during
+ a link. If this is NULL, no symbols can be left unresolved. */
+ struct bfd_hash_table *ignore_hash;
+
/* The output BFD. */
bfd *output_bfd;
diff -rNU3 dist/include/opcode/mips.h dist.nbsd/include/opcode/mips.h
--- dist/include/opcode/mips.h Wed Nov 7 11:43:28 2012
+++ dist.nbsd/include/opcode/mips.h Wed Nov 7 11:13:45 2012
@@ -768,7 +768,11 @@
M_DSUB_I,
M_DSUBU_I,
M_DSUBU_I_2,
+ M_JR_S,
+ M_J_S,
M_J_A,
+ M_JALR_S,
+ M_JALR_DS,
M_JAL_1,
M_JAL_2,
M_JAL_A,
diff -rNU3 dist/ld/Makefile.am dist.nbsd/ld/Makefile.am
--- dist/ld/Makefile.am Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/Makefile.am Wed Nov 7 11:13:51 2012
@@ -144,11 +144,13 @@
earmelf_linux.c \
earmelf_linux_eabi.c \
earmelf_nbsd.c \
+ earmelf_nbsd_eabi.c \
earmelf_vxworks.c \
earmelfb.c \
earmelfb_linux.c \
earmelfb_linux_eabi.c \
earmelfb_nbsd.c \
+ earmelfb_nbsd_eabi.c \
earmnbsd.c \
earmnto.c \
earmpe.c \
@@ -684,6 +686,11 @@
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
+earmelf_nbsd_abi.c: $(srcdir)/emulparams/armelf_nbsd_abi.sh \
+ $(srcdir)/emulparams/armelf.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_nbsd_abi "$(tdir_armelf_nbsd_abi)"
earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
$(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
@@ -711,6 +718,12 @@
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
+earmelfb_nbsd_abi.c: $(srcdir)/emulparams/armelfb_nbsd_abi.sh \
+ $(srcdir)/emulparams/armelf_nbsd_abi.sh \
+ $(srcdir)/emulparams/armelf.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelfb_nbsd_abi "$(tdir_armelfb_nbsd_abi)"
earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
@@ -2009,6 +2022,8 @@
# because almost all configs use "gen" version of manual.
# Set DOCVER above to change.
configdoc.texi: ${DOCVER}-doc.texi
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_configdoc.texi:
cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
chmod u+w ./configdoc.texi
@@ -2016,6 +2031,8 @@
# The sed command removes the no-adjust Nroff command so that
# the man output looks standard.
ld.1: $(srcdir)/ld.texinfo configdoc.texi
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_ld.1:
touch $@
-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
-($(POD2MAN) ld.pod | \
diff -rNU3 dist/ld/Makefile.in dist.nbsd/ld/Makefile.in
--- dist/ld/Makefile.in Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/Makefile.in Wed Nov 7 11:13:51 2012
@@ -449,11 +449,13 @@
earmelf_linux.c \
earmelf_linux_eabi.c \
earmelf_nbsd.c \
+ earmelf_nbsd_eabi.c \
earmelf_vxworks.c \
earmelfb.c \
earmelfb_linux.c \
earmelfb_linux_eabi.c \
earmelfb_nbsd.c \
+ earmelfb_nbsd_eabi.c \
earmnbsd.c \
earmnto.c \
earmpe.c \
@@ -1031,11 +1033,13 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_linux_eabi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_nbsd_abi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelf_vxworks.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_linux_eabi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmelfb_nbsd_eabi.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnbsd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmnto.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/earmpe.Po@am__quote@
@@ -1415,6 +1419,8 @@
-rm -f libtool config.lt
ld.info: ld.texinfo $(ld_TEXINFOS)
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_ld.info: ld.texinfo $(ld_TEXINFOS)
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
@@ -2119,6 +2125,11 @@
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
+earmelf_nbsd_eabi.c: $(srcdir)/emulparams/armelf_nbsd_eabi.sh \
+ $(srcdir)/emulparams/armelf.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_nbsd_eabi "$(tdir_armelf_nbsd_eabi)"
earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
$(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
@@ -2146,6 +2157,12 @@
$(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
+earmelfb_nbsd_eabi.c: $(srcdir)/emulparams/armelfb_nbsd_eabi.sh \
+ $(srcdir)/emulparams/armelf_nbsd_eabi.sh \
+ $(srcdir)/emulparams/armelf.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelfb_nbsd_eabi "$(tdir_armelfb_nbsd_eabi)"
earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
@@ -3387,6 +3404,8 @@
# because almost all configs use "gen" version of manual.
# Set DOCVER above to change.
configdoc.texi: ${DOCVER}-doc.texi
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_configdoc.texi:
cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
chmod u+w ./configdoc.texi
@@ -3394,6 +3413,8 @@
# The sed command removes the no-adjust Nroff command so that
# the man output looks standard.
ld.1: $(srcdir)/ld.texinfo configdoc.texi
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_ld.1:
touch $@
-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
-($(POD2MAN) ld.pod | \
diff -rNU3 dist/ld/configure.tgt dist.nbsd/ld/configure.tgt
--- dist/ld/configure.tgt Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/configure.tgt Wed Nov 7 11:13:51 2012
@@ -56,6 +56,11 @@
arm-*-freebsd* | arm-*-kfreebsd*-gnu)
targ_emul=armelf_fbsd
targ_extra_emuls="armelf" ;;
+armeb-*-netbsdelf*-eabi*)
+ targ_emul=armelfb_nbsd_eabi;
+ targ_extra_emuls="armelf_nbsd_eabi armelf armnbsd" ;;
+arm-*-netbsdelf*-eabi*) targ_emul=armelf_nbsd_eabi;
+ targ_extra_emuls="armelfb_nbsd_eabi armelf armnbsd" ;;
armeb-*-netbsdelf*) targ_emul=armelfb_nbsd;
targ_extra_emuls="armelf_nbsd armelf armnbsd" ;;
arm-*-netbsdelf*) targ_emul=armelf_nbsd;
@@ -379,12 +384,18 @@
mips*-sgi-irix*) targ_emul=mipsbig ;;
mips*el-*-ecoff*) targ_emul=mipsidtl ;;
mips*-*-ecoff*) targ_emul=mipsidt ;;
+mips64*el-*-netbsd*) targ_emul=elf32ltsmipn32
+ targ_extra_emuls="elf64btsmip elf64ltsmip elf32ltsmip elf32btsmipn32 elf32btsmip"
+ ;;
+mips64*-*-netbsd*) targ_emul=elf32btsmipn32
+ targ_extra_emuls="elf64ltsmip elf64btsmip elf32btsmip elf32ltsmipn32 elf32ltsmip"
+ ;;
mips*el-*-netbsd*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf64ltsmip elf64btsmip"
;;
mips*-*-netbsd*) targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip"
- ;;
+ ;;
mips*-*-bsd*) targ_emul=mipsbig ;;
mips*vr4300el-*-elf*) targ_emul=elf32l4300 ;;
mips*vr4300-*-elf*) targ_emul=elf32b4300 ;;
@@ -600,10 +611,15 @@
tdir_sparclinux=${targ_alias}aout
tdir_elf64_sparc=`echo ${targ_alias} | sed -e 's/32//'`
tdir_sun4=sparc-sun-sunos4 ;;
-sparc64-*-netbsd* | sparc64-*-openbsd*)
- targ_emul=elf64_sparc
- targ_extra_emuls="elf32_sparc" ;;
-sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;;
+sparc64-*-netbsd*) targ_emul=elf64_sparc
+ targ_extra_emuls="elf32_sparc sparcnbsd"
+ ;;
+sparc64-*-openbsd*) targ_emul=elf64_sparc
+ targ_extra_emuls="elf32_sparc"
+ ;;
+sparc*-*-netbsd*elf*) targ_emul=elf32_sparc
+ targ_extra_emuls=sparcnbsd
+ ;;
sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
targ_emul=elf32_sparc_sol2
diff -rNU3 dist/ld/emulparams/armelf_nbsd.sh dist.nbsd/ld/emulparams/armelf_nbsd.sh
--- dist/ld/emulparams/armelf_nbsd.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/armelf_nbsd.sh Wed Nov 7 11:13:50 2012
@@ -3,5 +3,12 @@
TEXT_START_ADDR=0x00008000
TARGET2_TYPE=got-rel
+unset DATA_START_SYMBOLS
unset STACK_ADDR
unset EMBEDDED
+
+case "$target" in
+ arm*-*-netbsdelf*-eabi*)
+ LIB_PATH='=/usr/lib/oabi'
+ ;;
+esac
diff -rNU3 dist/ld/emulparams/armelf_nbsd_eabi.sh dist.nbsd/ld/emulparams/armelf_nbsd_eabi.sh
--- dist/ld/emulparams/armelf_nbsd_eabi.sh Thu Jan 1 00:00:00 1970
+++ dist.nbsd/ld/emulparams/armelf_nbsd_eabi.sh Wed Nov 7 11:13:50 2012
@@ -0,0 +1,18 @@
+. ${srcdir}/emulparams/armelf_nbsd.sh
+
+# Use the ARM ABI-compliant exception-handling sections.
+OTHER_READONLY_SECTIONS="
+ .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
+ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_start = .); }
+ .ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
+ ${RELOCATING+ PROVIDE_HIDDEN (__exidx_end = .); }"
+
+unset LIB_PATH
+
+case "$target" in
+ arm*-*-netbsdelf*-eabi*)
+ ;;
+ arm*-*-netbsdelf*)
+ LIB_PATH='=/usr/lib/eabi'
+ ;;
+esac
diff -rNU3 dist/ld/emulparams/armelfb_nbsd_eabi.sh dist.nbsd/ld/emulparams/armelfb_nbsd_eabi.sh
--- dist/ld/emulparams/armelfb_nbsd_eabi.sh Thu Jan 1 00:00:00 1970
+++ dist.nbsd/ld/emulparams/armelfb_nbsd_eabi.sh Wed Nov 7 11:13:50 2012
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/armelf_nbsd_eabi.sh
+OUTPUT_FORMAT="elf32-bigarm"
diff -rNU3 dist/ld/emulparams/elf32_sparc.sh dist.nbsd/ld/emulparams/elf32_sparc.sh
--- dist/ld/emulparams/elf32_sparc.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/elf32_sparc.sh Wed Nov 7 11:13:50 2012
@@ -13,6 +13,7 @@
TEMPLATE_NAME=elf32
DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes
+#ELFSIZE=32
GENERATE_PIE_SCRIPT=yes
NOP=0x01000000
NO_SMALL_DATA=yes
diff -rNU3 dist/ld/emulparams/elf32bmipn32-defs.sh dist.nbsd/ld/emulparams/elf32bmipn32-defs.sh
--- dist/ld/emulparams/elf32bmipn32-defs.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/elf32bmipn32-defs.sh Wed Nov 7 11:13:50 2012
@@ -6,6 +6,7 @@
# Handle both big- and little-ended 32-bit MIPS objects.
ARCH=mips
+MACHINE=
OUTPUT_FORMAT="elf32-bigmips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
diff -rNU3 dist/ld/emulparams/elf64alpha_nbsd.sh dist.nbsd/ld/emulparams/elf64alpha_nbsd.sh
--- dist/ld/emulparams/elf64alpha_nbsd.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/elf64alpha_nbsd.sh Wed Nov 7 11:13:50 2012
@@ -1,2 +1,8 @@
. ${srcdir}/emulparams/elf64alpha.sh
ENTRY=__start
+
+NOP=0x47ff041f
+# XXX binutils 2.13
+# Note that the number is always big-endian, thus we have to
+# reverse the digit string.
+#NOP=0x0000fe2f1f04ff47 # unop; nop
diff -rNU3 dist/ld/emulparams/elf_i386.sh dist.nbsd/ld/emulparams/elf_i386.sh
--- dist/ld/emulparams/elf_i386.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/elf_i386.sh Wed Nov 7 11:13:50 2012
@@ -9,7 +9,14 @@
NOP=0x90909090
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
+#ELFSIZE=32
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
SEPARATE_GOTPLT=12
IREL_IN_PLT=
+
+case "$target" in
+ x86_64-*-netbsd*)
+ LIB_PATH='=/usr/lib/i386'
+ ;;
+esac
diff -rNU3 dist/ld/emulparams/hppalinux.sh dist.nbsd/ld/emulparams/hppalinux.sh
--- dist/ld/emulparams/hppalinux.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/hppalinux.sh Wed Nov 7 11:13:50 2012
@@ -1,5 +1,5 @@
# If you change this file, please also look at files which source this one:
-# hppanbsd.sh
+# hppanbsd.sh hppaobsd.sh
SCRIPT_NAME=elf
ELFSIZE=32
diff -rNU3 dist/ld/emulparams/hppaobsd.sh dist.nbsd/ld/emulparams/hppaobsd.sh
--- dist/ld/emulparams/hppaobsd.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/hppaobsd.sh Wed Nov 7 11:13:50 2012
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/hppanbsd.sh
+. ${srcdir}/emulparams/hppalinux.sh
OUTPUT_FORMAT="elf32-hppa"
TEXT_START_ADDR=0x1000
diff -rNU3 dist/ld/emulparams/m68kelf.sh dist.nbsd/ld/emulparams/m68kelf.sh
--- dist/ld/emulparams/m68kelf.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/m68kelf.sh Wed Nov 7 11:13:50 2012
@@ -10,5 +10,6 @@
TEMPLATE_NAME=elf32
EXTRA_EM_FILE=m68kelf
GENERATE_SHLIB_SCRIPT=yes
+ELFSIZE=32
GENERATE_PIE_SCRIPT=yes
NO_SMALL_DATA=yes
diff -rNU3 dist/ld/emulparams/m68kelfnbsd.sh dist.nbsd/ld/emulparams/m68kelfnbsd.sh
--- dist/ld/emulparams/m68kelfnbsd.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/m68kelfnbsd.sh Wed Nov 7 11:13:50 2012
@@ -1,4 +1,4 @@
. ${srcdir}/emulparams/m68kelf.sh
TEXT_START_ADDR=0x2000
TARGET_PAGE_SIZE=0x2000
-MACHINE=
+NONPAGED_TEXT_START_ADDR=${TEXT_START_ADDR}
diff -rNU3 dist/ld/emulparams/sh.sh dist.nbsd/ld/emulparams/sh.sh
--- dist/ld/emulparams/sh.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/sh.sh Wed Nov 7 11:13:50 2012
@@ -3,6 +3,6 @@
SCRIPT_NAME=sh
OUTPUT_FORMAT="coff-sh"
-TEXT_START_ADDR=0x8000
-TARGET_PAGE_SIZE=128
+TEXT_START_ADDR=0x1000
+TARGET_PAGE_SIZE=0x1000
ARCH=sh
diff -rNU3 dist/ld/emulparams/shelf_nbsd.sh dist.nbsd/ld/emulparams/shelf_nbsd.sh
--- dist/ld/emulparams/shelf_nbsd.sh Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/emulparams/shelf_nbsd.sh Wed Nov 7 11:13:50 2012
@@ -9,7 +9,11 @@
DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
-ENTRY=_start
+ENTRY=__start
unset EMBEDDED
unset OTHER_SECTIONS
+
+OTHER_READWRITE_SECTIONS='
+ .note.ABI-tag : { *(.note.ABI-tag) }
+'
diff -rNU3 dist/ld/ldlex.c dist.nbsd/ld/ldlex.c
--- dist/ld/ldlex.c Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/ldlex.c Wed Nov 7 11:13:50 2012
@@ -16,6 +16,9 @@
/* First, we deal with platform-specific or compiler-specific issues. */
/* begin standard C headers. */
+#ifdef _LIBC
+#include "namespace.h"
+#endif
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -23,6 +26,8 @@
/* end standard C headers. */
+/* $NetBSD: ldlex.c,v 1.2 2011/09/25 04:32:43 christos Exp $ */
+
/* flex integer type definitions */
#ifndef FLEXINT_H
@@ -152,13 +157,8 @@
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
-#ifndef YY_TYPEDEF_YY_SIZE_T
-#define YY_TYPEDEF_YY_SIZE_T
-typedef size_t yy_size_t;
-#endif
+extern int yyleng;
-extern yy_size_t yyleng;
-
extern FILE *yyin, *yyout;
#define EOB_ACT_CONTINUE_SCAN 0
@@ -183,6 +183,11 @@
#define unput(c) yyunput( c, (yytext_ptr) )
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@@ -200,7 +205,7 @@
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
- yy_size_t yy_n_chars;
+ int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@@ -270,8 +275,8 @@
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
-static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
-yy_size_t yyleng;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int yyleng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
@@ -299,7 +304,7 @@
YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str );
-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len );
+YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len );
void *yyalloc (yy_size_t );
void *yyrealloc (void *,yy_size_t );
@@ -347,6 +352,9 @@
static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
static int yy_get_next_buffer (void );
+#if defined(__GNUC__) && __GNUC__ >= 3
+__attribute__((__noreturn__))
+#endif
static void yy_fatal_error (yyconst char msg[] );
/* Done after the current pattern has been matched and before the
@@ -1621,10 +1629,6 @@
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result = yy_input (buf, max_size)
-#ifndef YY_NO_UNPUT
-#define YY_NO_UNPUT
-#endif
-
#define MAX_INCLUDE_DEPTH 10
static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
static const char *file_name_stack[MAX_INCLUDE_DEPTH];
@@ -1660,7 +1664,7 @@
-#line 1664 "ldlex.c"
+#line 1668 "ldlex.c"
#define INITIAL 0
#define SCRIPT 1
@@ -1701,19 +1705,19 @@
FILE *yyget_in (void );
-void yyset_in (FILE * in_str );
+void yyset_in (FILE * _in_str );
FILE *yyget_out (void );
-void yyset_out (FILE * out_str );
+void yyset_out (FILE * _out_str );
-yy_size_t yyget_leng (void );
+int yyget_leng (void );
char *yyget_text (void );
int yyget_lineno (void );
-void yyset_lineno (int line_number );
+void yyset_lineno (int _line_number );
/* Macros after this point can all be overridden by user definitions in
* section 1.
@@ -1727,6 +1731,10 @@
#endif
#endif
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
@@ -1766,7 +1774,7 @@
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- yy_size_t n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1848,7 +1856,7 @@
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 120 "ldlex.l"
+#line 118 "ldlex.l"
if (parser_input != input_selected)
@@ -1867,7 +1875,7 @@
}
}
-#line 1871 "ldlex.c"
+#line 1879 "ldlex.c"
if ( !(yy_init) )
{
@@ -1952,32 +1960,32 @@
case 1:
YY_RULE_SETUP
-#line 138 "ldlex.l"
+#line 136 "ldlex.l"
{ comment (); }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 141 "ldlex.l"
+#line 139 "ldlex.l"
{ RTOKEN('-');}
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 142 "ldlex.l"
+#line 140 "ldlex.l"
{ RTOKEN('+');}
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 143 "ldlex.l"
+#line 141 "ldlex.l"
{ yylval.name = xstrdup (yytext); return NAME; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 144 "ldlex.l"
+#line 142 "ldlex.l"
{ RTOKEN('='); }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 146 "ldlex.l"
+#line 144 "ldlex.l"
{
yylval.integer = bfd_scan_vma (yytext + 1, 0, 16);
yylval.bigint.str = NULL;
@@ -1986,7 +1994,7 @@
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 152 "ldlex.l"
+#line 150 "ldlex.l"
{
int ibase ;
switch (yytext[yyleng - 1]) {
@@ -2015,7 +2023,7 @@
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 177 "ldlex.l"
+#line 175 "ldlex.l"
{
char *s = yytext;
int ibase = 0;
@@ -2048,794 +2056,794 @@
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 206 "ldlex.l"
+#line 204 "ldlex.l"
{ RTOKEN(']');}
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 207 "ldlex.l"
+#line 205 "ldlex.l"
{ RTOKEN('[');}
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 208 "ldlex.l"
+#line 206 "ldlex.l"
{ RTOKEN(LSHIFTEQ);}
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 209 "ldlex.l"
+#line 207 "ldlex.l"
{ RTOKEN(RSHIFTEQ);}
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 210 "ldlex.l"
+#line 208 "ldlex.l"
{ RTOKEN(OROR);}
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 211 "ldlex.l"
+#line 209 "ldlex.l"
{ RTOKEN(EQ);}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 212 "ldlex.l"
+#line 210 "ldlex.l"
{ RTOKEN(NE);}
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 213 "ldlex.l"
+#line 211 "ldlex.l"
{ RTOKEN(GE);}
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 214 "ldlex.l"
+#line 212 "ldlex.l"
{ RTOKEN(LE);}
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 215 "ldlex.l"
+#line 213 "ldlex.l"
{ RTOKEN(LSHIFT);}
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 216 "ldlex.l"
+#line 214 "ldlex.l"
{ RTOKEN(RSHIFT);}
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 217 "ldlex.l"
+#line 215 "ldlex.l"
{ RTOKEN(PLUSEQ);}
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 218 "ldlex.l"
+#line 216 "ldlex.l"
{ RTOKEN(MINUSEQ);}
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 219 "ldlex.l"
+#line 217 "ldlex.l"
{ RTOKEN(MULTEQ);}
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 220 "ldlex.l"
+#line 218 "ldlex.l"
{ RTOKEN(DIVEQ);}
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 221 "ldlex.l"
+#line 219 "ldlex.l"
{ RTOKEN(ANDEQ);}
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 222 "ldlex.l"
+#line 220 "ldlex.l"
{ RTOKEN(OREQ);}
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 223 "ldlex.l"
+#line 221 "ldlex.l"
{ RTOKEN(ANDAND);}
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 224 "ldlex.l"
+#line 222 "ldlex.l"
{ RTOKEN('>');}
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 225 "ldlex.l"
+#line 223 "ldlex.l"
{ RTOKEN(',');}
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 226 "ldlex.l"
+#line 224 "ldlex.l"
{ RTOKEN('&');}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 227 "ldlex.l"
+#line 225 "ldlex.l"
{ RTOKEN('|');}
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 228 "ldlex.l"
+#line 226 "ldlex.l"
{ RTOKEN('~');}
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 229 "ldlex.l"
+#line 227 "ldlex.l"
{ RTOKEN('!');}
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 230 "ldlex.l"
+#line 228 "ldlex.l"
{ RTOKEN('?');}
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 231 "ldlex.l"
+#line 229 "ldlex.l"
{ RTOKEN('*');}
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 232 "ldlex.l"
+#line 230 "ldlex.l"
{ RTOKEN('+');}
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 233 "ldlex.l"
+#line 231 "ldlex.l"
{ RTOKEN('-');}
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 234 "ldlex.l"
+#line 232 "ldlex.l"
{ RTOKEN('/');}
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 235 "ldlex.l"
+#line 233 "ldlex.l"
{ RTOKEN('%');}
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 236 "ldlex.l"
+#line 234 "ldlex.l"
{ RTOKEN('<');}
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 237 "ldlex.l"
+#line 235 "ldlex.l"
{ RTOKEN('=');}
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 238 "ldlex.l"
+#line 236 "ldlex.l"
{ RTOKEN('}') ; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 239 "ldlex.l"
+#line 237 "ldlex.l"
{ RTOKEN('{'); }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 240 "ldlex.l"
+#line 238 "ldlex.l"
{ RTOKEN(')');}
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 241 "ldlex.l"
+#line 239 "ldlex.l"
{ RTOKEN('(');}
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 242 "ldlex.l"
+#line 240 "ldlex.l"
{ RTOKEN(':'); }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 243 "ldlex.l"
+#line 241 "ldlex.l"
{ RTOKEN(';');}
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 244 "ldlex.l"
+#line 242 "ldlex.l"
{ RTOKEN(MEMORY);}
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 245 "ldlex.l"
+#line 243 "ldlex.l"
{ RTOKEN(REGION_ALIAS);}
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 246 "ldlex.l"
+#line 244 "ldlex.l"
{ RTOKEN(LD_FEATURE);}
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 247 "ldlex.l"
+#line 245 "ldlex.l"
{ RTOKEN(ORIGIN);}
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 248 "ldlex.l"
+#line 246 "ldlex.l"
{ RTOKEN(VERSIONK);}
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 249 "ldlex.l"
+#line 247 "ldlex.l"
{ RTOKEN(BLOCK);}
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 250 "ldlex.l"
+#line 248 "ldlex.l"
{ RTOKEN(BIND);}
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 251 "ldlex.l"
+#line 249 "ldlex.l"
{ RTOKEN(LENGTH);}
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 252 "ldlex.l"
+#line 250 "ldlex.l"
{ RTOKEN(ALIGN_K);}
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 253 "ldlex.l"
+#line 251 "ldlex.l"
{ RTOKEN(DATA_SEGMENT_ALIGN);}
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 254 "ldlex.l"
+#line 252 "ldlex.l"
{ RTOKEN(DATA_SEGMENT_RELRO_END);}
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 255 "ldlex.l"
+#line 253 "ldlex.l"
{ RTOKEN(DATA_SEGMENT_END);}
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 256 "ldlex.l"
+#line 254 "ldlex.l"
{ RTOKEN(ADDR);}
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 257 "ldlex.l"
+#line 255 "ldlex.l"
{ RTOKEN(LOADADDR);}
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 258 "ldlex.l"
+#line 256 "ldlex.l"
{ RTOKEN(ALIGNOF); }
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 259 "ldlex.l"
+#line 257 "ldlex.l"
{ RTOKEN(MAX_K); }
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 260 "ldlex.l"
+#line 258 "ldlex.l"
{ RTOKEN(MIN_K); }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 261 "ldlex.l"
+#line 259 "ldlex.l"
{ RTOKEN(ASSERT_K); }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 262 "ldlex.l"
+#line 260 "ldlex.l"
{ RTOKEN(ENTRY);}
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 263 "ldlex.l"
+#line 261 "ldlex.l"
{ RTOKEN(EXTERN);}
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 264 "ldlex.l"
+#line 262 "ldlex.l"
{ RTOKEN(NEXT);}
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 265 "ldlex.l"
+#line 263 "ldlex.l"
{ RTOKEN(SIZEOF_HEADERS);}
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 266 "ldlex.l"
+#line 264 "ldlex.l"
{ RTOKEN(SIZEOF_HEADERS);}
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 267 "ldlex.l"
+#line 265 "ldlex.l"
{ RTOKEN(SEGMENT_START);}
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 268 "ldlex.l"
+#line 266 "ldlex.l"
{ RTOKEN(MAP);}
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 269 "ldlex.l"
+#line 267 "ldlex.l"
{ RTOKEN(SIZEOF);}
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 270 "ldlex.l"
+#line 268 "ldlex.l"
{ RTOKEN(TARGET_K);}
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 271 "ldlex.l"
+#line 269 "ldlex.l"
{ RTOKEN(SEARCH_DIR);}
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 272 "ldlex.l"
+#line 270 "ldlex.l"
{ RTOKEN(OUTPUT);}
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 273 "ldlex.l"
+#line 271 "ldlex.l"
{ RTOKEN(INPUT);}
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 274 "ldlex.l"
+#line 272 "ldlex.l"
{ RTOKEN(GROUP);}
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 275 "ldlex.l"
+#line 273 "ldlex.l"
{ RTOKEN(AS_NEEDED);}
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 276 "ldlex.l"
+#line 274 "ldlex.l"
{ RTOKEN(DEFINED);}
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 277 "ldlex.l"
+#line 275 "ldlex.l"
{ RTOKEN(CREATE_OBJECT_SYMBOLS);}
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 278 "ldlex.l"
+#line 276 "ldlex.l"
{ RTOKEN( CONSTRUCTORS);}
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 279 "ldlex.l"
+#line 277 "ldlex.l"
{ RTOKEN(FORCE_COMMON_ALLOCATION);}
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 280 "ldlex.l"
+#line 278 "ldlex.l"
{ RTOKEN(INHIBIT_COMMON_ALLOCATION);}
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 281 "ldlex.l"
+#line 279 "ldlex.l"
{ RTOKEN(SECTIONS);}
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 282 "ldlex.l"
+#line 280 "ldlex.l"
{ RTOKEN(INSERT_K);}
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 283 "ldlex.l"
+#line 281 "ldlex.l"
{ RTOKEN(AFTER);}
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 284 "ldlex.l"
+#line 282 "ldlex.l"
{ RTOKEN(BEFORE);}
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 285 "ldlex.l"
+#line 283 "ldlex.l"
{ RTOKEN(FILL);}
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 286 "ldlex.l"
+#line 284 "ldlex.l"
{ RTOKEN(STARTUP);}
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 287 "ldlex.l"
+#line 285 "ldlex.l"
{ RTOKEN(OUTPUT_FORMAT);}
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 288 "ldlex.l"
+#line 286 "ldlex.l"
{ RTOKEN( OUTPUT_ARCH);}
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 289 "ldlex.l"
+#line 287 "ldlex.l"
{ RTOKEN(HLL);}
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 290 "ldlex.l"
+#line 288 "ldlex.l"
{ RTOKEN(SYSLIB);}
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 291 "ldlex.l"
+#line 289 "ldlex.l"
{ RTOKEN(FLOAT);}
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 292 "ldlex.l"
+#line 290 "ldlex.l"
{ RTOKEN( QUAD);}
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 293 "ldlex.l"
+#line 291 "ldlex.l"
{ RTOKEN( SQUAD);}
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 294 "ldlex.l"
+#line 292 "ldlex.l"
{ RTOKEN( LONG);}
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 295 "ldlex.l"
+#line 293 "ldlex.l"
{ RTOKEN( SHORT);}
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 296 "ldlex.l"
+#line 294 "ldlex.l"
{ RTOKEN( BYTE);}
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 297 "ldlex.l"
+#line 295 "ldlex.l"
{ RTOKEN(NOFLOAT);}
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 298 "ldlex.l"
+#line 296 "ldlex.l"
{ RTOKEN(NOCROSSREFS);}
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 299 "ldlex.l"
+#line 297 "ldlex.l"
{ RTOKEN(OVERLAY); }
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 300 "ldlex.l"
+#line 298 "ldlex.l"
{ RTOKEN(SORT_BY_NAME); }
YY_BREAK
case 104:
YY_RULE_SETUP
-#line 301 "ldlex.l"
+#line 299 "ldlex.l"
{ RTOKEN(SORT_BY_ALIGNMENT); }
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 302 "ldlex.l"
+#line 300 "ldlex.l"
{ RTOKEN(SORT_BY_NAME); }
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 303 "ldlex.l"
+#line 301 "ldlex.l"
{ RTOKEN(NOLOAD);}
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 304 "ldlex.l"
+#line 302 "ldlex.l"
{ RTOKEN(DSECT);}
YY_BREAK
case 108:
YY_RULE_SETUP
-#line 305 "ldlex.l"
+#line 303 "ldlex.l"
{ RTOKEN(COPY);}
YY_BREAK
case 109:
YY_RULE_SETUP
-#line 306 "ldlex.l"
+#line 304 "ldlex.l"
{ RTOKEN(INFO);}
YY_BREAK
case 110:
YY_RULE_SETUP
-#line 307 "ldlex.l"
+#line 305 "ldlex.l"
{ RTOKEN(OVERLAY);}
YY_BREAK
case 111:
YY_RULE_SETUP
-#line 308 "ldlex.l"
+#line 306 "ldlex.l"
{ RTOKEN(ONLY_IF_RO); }
YY_BREAK
case 112:
YY_RULE_SETUP
-#line 309 "ldlex.l"
+#line 307 "ldlex.l"
{ RTOKEN(ONLY_IF_RW); }
YY_BREAK
case 113:
YY_RULE_SETUP
-#line 310 "ldlex.l"
+#line 308 "ldlex.l"
{ RTOKEN(SPECIAL); }
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 311 "ldlex.l"
+#line 309 "ldlex.l"
{ RTOKEN(ORIGIN);}
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 312 "ldlex.l"
+#line 310 "ldlex.l"
{ RTOKEN(ORIGIN);}
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 313 "ldlex.l"
+#line 311 "ldlex.l"
{ RTOKEN( LENGTH);}
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 314 "ldlex.l"
+#line 312 "ldlex.l"
{ RTOKEN( LENGTH);}
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 315 "ldlex.l"
+#line 313 "ldlex.l"
{ RTOKEN(INCLUDE);}
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 316 "ldlex.l"
+#line 314 "ldlex.l"
{ RTOKEN (PHDRS); }
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 317 "ldlex.l"
+#line 315 "ldlex.l"
{ RTOKEN(AT);}
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 318 "ldlex.l"
+#line 316 "ldlex.l"
{ RTOKEN(SUBALIGN);}
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 319 "ldlex.l"
+#line 317 "ldlex.l"
{ RTOKEN(PROVIDE); }
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 320 "ldlex.l"
+#line 318 "ldlex.l"
{ RTOKEN(PROVIDE_HIDDEN); }
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 321 "ldlex.l"
+#line 319 "ldlex.l"
{ RTOKEN(KEEP); }
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 322 "ldlex.l"
+#line 320 "ldlex.l"
{ RTOKEN(EXCLUDE_FILE); }
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 323 "ldlex.l"
+#line 321 "ldlex.l"
{ RTOKEN(CONSTANT);}
YY_BREAK
case 127:
/* rule 127 can match eol */
YY_RULE_SETUP
-#line 324 "ldlex.l"
+#line 322 "ldlex.l"
{ ++ lineno; }
YY_BREAK
case 128:
/* rule 128 can match eol */
YY_RULE_SETUP
-#line 325 "ldlex.l"
+#line 323 "ldlex.l"
{ ++ lineno; RTOKEN(NEWLINE); }
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 326 "ldlex.l"
+#line 324 "ldlex.l"
{ /* Mri comment line */ }
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 327 "ldlex.l"
+#line 325 "ldlex.l"
{ /* Mri comment line */ }
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 328 "ldlex.l"
+#line 326 "ldlex.l"
{ RTOKEN(ENDWORD); }
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 329 "ldlex.l"
+#line 327 "ldlex.l"
{ RTOKEN(ALIGNMOD);}
YY_BREAK
case 133:
YY_RULE_SETUP
-#line 330 "ldlex.l"
+#line 328 "ldlex.l"
{ RTOKEN(ALIGN_K);}
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 331 "ldlex.l"
+#line 329 "ldlex.l"
{ RTOKEN(CHIP); }
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 332 "ldlex.l"
+#line 330 "ldlex.l"
{ RTOKEN(BASE); }
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 333 "ldlex.l"
+#line 331 "ldlex.l"
{ RTOKEN(ALIAS); }
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 334 "ldlex.l"
+#line 332 "ldlex.l"
{ RTOKEN(TRUNCATE); }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 335 "ldlex.l"
+#line 333 "ldlex.l"
{ RTOKEN(LOAD); }
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 336 "ldlex.l"
+#line 334 "ldlex.l"
{ RTOKEN(PUBLIC); }
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 337 "ldlex.l"
+#line 335 "ldlex.l"
{ RTOKEN(ORDER); }
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 338 "ldlex.l"
+#line 336 "ldlex.l"
{ RTOKEN(NAMEWORD); }
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 339 "ldlex.l"
+#line 337 "ldlex.l"
{ RTOKEN(FORMAT); }
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 340 "ldlex.l"
+#line 338 "ldlex.l"
{ RTOKEN(CASE); }
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 341 "ldlex.l"
+#line 339 "ldlex.l"
{ RTOKEN(START); }
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 342 "ldlex.l"
+#line 340 "ldlex.l"
{ RTOKEN(LIST); /* LIST and ignore to end of line */ }
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 343 "ldlex.l"
+#line 341 "ldlex.l"
{ RTOKEN(SECT); }
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 344 "ldlex.l"
+#line 342 "ldlex.l"
{ RTOKEN(ABSOLUTE); }
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 345 "ldlex.l"
+#line 343 "ldlex.l"
{ RTOKEN(ENDWORD); }
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 346 "ldlex.l"
+#line 344 "ldlex.l"
{ RTOKEN(ALIGNMOD);}
YY_BREAK
case 150:
YY_RULE_SETUP
-#line 347 "ldlex.l"
+#line 345 "ldlex.l"
{ RTOKEN(ALIGN_K);}
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 348 "ldlex.l"
+#line 346 "ldlex.l"
{ RTOKEN(CHIP); }
YY_BREAK
case 152:
YY_RULE_SETUP
-#line 349 "ldlex.l"
+#line 347 "ldlex.l"
{ RTOKEN(BASE); }
YY_BREAK
case 153:
YY_RULE_SETUP
-#line 350 "ldlex.l"
+#line 348 "ldlex.l"
{ RTOKEN(ALIAS); }
YY_BREAK
case 154:
YY_RULE_SETUP
-#line 351 "ldlex.l"
+#line 349 "ldlex.l"
{ RTOKEN(TRUNCATE); }
YY_BREAK
case 155:
YY_RULE_SETUP
-#line 352 "ldlex.l"
+#line 350 "ldlex.l"
{ RTOKEN(LOAD); }
YY_BREAK
case 156:
YY_RULE_SETUP
-#line 353 "ldlex.l"
+#line 351 "ldlex.l"
{ RTOKEN(PUBLIC); }
YY_BREAK
case 157:
YY_RULE_SETUP
-#line 354 "ldlex.l"
+#line 352 "ldlex.l"
{ RTOKEN(ORDER); }
YY_BREAK
case 158:
YY_RULE_SETUP
-#line 355 "ldlex.l"
+#line 353 "ldlex.l"
{ RTOKEN(NAMEWORD); }
YY_BREAK
case 159:
YY_RULE_SETUP
-#line 356 "ldlex.l"
+#line 354 "ldlex.l"
{ RTOKEN(FORMAT); }
YY_BREAK
case 160:
YY_RULE_SETUP
-#line 357 "ldlex.l"
+#line 355 "ldlex.l"
{ RTOKEN(CASE); }
YY_BREAK
case 161:
YY_RULE_SETUP
-#line 358 "ldlex.l"
+#line 356 "ldlex.l"
{ RTOKEN(EXTERN); }
YY_BREAK
case 162:
YY_RULE_SETUP
-#line 359 "ldlex.l"
+#line 357 "ldlex.l"
{ RTOKEN(START); }
YY_BREAK
case 163:
YY_RULE_SETUP
-#line 360 "ldlex.l"
+#line 358 "ldlex.l"
{ RTOKEN(LIST); /* LIST and ignore to end of line */ }
YY_BREAK
case 164:
YY_RULE_SETUP
-#line 361 "ldlex.l"
+#line 359 "ldlex.l"
{ RTOKEN(SECT); }
YY_BREAK
case 165:
YY_RULE_SETUP
-#line 362 "ldlex.l"
+#line 360 "ldlex.l"
{ RTOKEN(ABSOLUTE); }
YY_BREAK
case 166:
YY_RULE_SETUP
-#line 364 "ldlex.l"
+#line 362 "ldlex.l"
{
/* Filename without commas, needed to parse mri stuff */
yylval.name = xstrdup (yytext);
@@ -2844,7 +2852,7 @@
YY_BREAK
case 167:
YY_RULE_SETUP
-#line 371 "ldlex.l"
+#line 369 "ldlex.l"
{
yylval.name = xstrdup (yytext);
return NAME;
@@ -2852,7 +2860,7 @@
YY_BREAK
case 168:
YY_RULE_SETUP
-#line 375 "ldlex.l"
+#line 373 "ldlex.l"
{
yylval.name = xstrdup (yytext + 2);
return LNAME;
@@ -2860,7 +2868,7 @@
YY_BREAK
case 169:
YY_RULE_SETUP
-#line 379 "ldlex.l"
+#line 377 "ldlex.l"
{
yylval.name = xstrdup (yytext);
return NAME;
@@ -2868,7 +2876,7 @@
YY_BREAK
case 170:
YY_RULE_SETUP
-#line 383 "ldlex.l"
+#line 381 "ldlex.l"
{
yylval.name = xstrdup (yytext + 2);
return LNAME;
@@ -2876,7 +2884,7 @@
YY_BREAK
case 171:
YY_RULE_SETUP
-#line 387 "ldlex.l"
+#line 385 "ldlex.l"
{
/* Annoyingly, this pattern can match comments, and we have
longest match issues to consider. So if the first two
@@ -2897,7 +2905,7 @@
case 172:
/* rule 172 can match eol */
YY_RULE_SETUP
-#line 404 "ldlex.l"
+#line 402 "ldlex.l"
{
/* No matter the state, quotes
give what's inside */
@@ -2909,54 +2917,54 @@
case 173:
/* rule 173 can match eol */
YY_RULE_SETUP
-#line 411 "ldlex.l"
+#line 409 "ldlex.l"
{ lineno++;}
YY_BREAK
case 174:
YY_RULE_SETUP
-#line 412 "ldlex.l"
+#line 410 "ldlex.l"
{ }
YY_BREAK
case 175:
YY_RULE_SETUP
-#line 414 "ldlex.l"
+#line 412 "ldlex.l"
{ return *yytext; }
YY_BREAK
case 176:
YY_RULE_SETUP
-#line 416 "ldlex.l"
+#line 414 "ldlex.l"
{ RTOKEN(GLOBAL); }
YY_BREAK
case 177:
YY_RULE_SETUP
-#line 418 "ldlex.l"
+#line 416 "ldlex.l"
{ RTOKEN(LOCAL); }
YY_BREAK
case 178:
YY_RULE_SETUP
-#line 420 "ldlex.l"
+#line 418 "ldlex.l"
{ RTOKEN(EXTERN); }
YY_BREAK
case 179:
YY_RULE_SETUP
-#line 422 "ldlex.l"
+#line 420 "ldlex.l"
{ yylval.name = xstrdup (yytext);
return VERS_IDENTIFIER; }
YY_BREAK
case 180:
YY_RULE_SETUP
-#line 425 "ldlex.l"
+#line 423 "ldlex.l"
{ yylval.name = xstrdup (yytext);
return VERS_TAG; }
YY_BREAK
case 181:
YY_RULE_SETUP
-#line 428 "ldlex.l"
+#line 426 "ldlex.l"
{ BEGIN(VERS_SCRIPT); return *yytext; }
YY_BREAK
case 182:
YY_RULE_SETUP
-#line 430 "ldlex.l"
+#line 428 "ldlex.l"
{ BEGIN(VERS_NODE);
vers_node_nesting = 0;
return *yytext;
@@ -2964,17 +2972,17 @@
YY_BREAK
case 183:
YY_RULE_SETUP
-#line 434 "ldlex.l"
+#line 432 "ldlex.l"
{ return *yytext; }
YY_BREAK
case 184:
YY_RULE_SETUP
-#line 435 "ldlex.l"
+#line 433 "ldlex.l"
{ vers_node_nesting++; return *yytext; }
YY_BREAK
case 185:
YY_RULE_SETUP
-#line 436 "ldlex.l"
+#line 434 "ldlex.l"
{ if (--vers_node_nesting < 0)
BEGIN(VERS_SCRIPT);
return *yytext;
@@ -2983,17 +2991,17 @@
case 186:
/* rule 186 can match eol */
YY_RULE_SETUP
-#line 441 "ldlex.l"
+#line 439 "ldlex.l"
{ lineno++; }
YY_BREAK
case 187:
YY_RULE_SETUP
-#line 443 "ldlex.l"
+#line 441 "ldlex.l"
{ /* Eat up comments */ }
YY_BREAK
case 188:
YY_RULE_SETUP
-#line 445 "ldlex.l"
+#line 443 "ldlex.l"
{ /* Eat up whitespace */ }
YY_BREAK
case YY_STATE_EOF(INITIAL):
@@ -3005,7 +3013,7 @@
case YY_STATE_EOF(VERS_START):
case YY_STATE_EOF(VERS_SCRIPT):
case YY_STATE_EOF(VERS_NODE):
-#line 447 "ldlex.l"
+#line 445 "ldlex.l"
{
include_stack_ptr--;
@@ -3026,20 +3034,20 @@
YY_BREAK
case 189:
YY_RULE_SETUP
-#line 465 "ldlex.l"
+#line 463 "ldlex.l"
lex_warn_invalid (" in script", yytext);
YY_BREAK
case 190:
YY_RULE_SETUP
-#line 466 "ldlex.l"
+#line 464 "ldlex.l"
lex_warn_invalid (" in expression", yytext);
YY_BREAK
case 191:
YY_RULE_SETUP
-#line 468 "ldlex.l"
+#line 466 "ldlex.l"
ECHO;
YY_BREAK
-#line 3043 "ldlex.c"
+#line 3051 "ldlex.c"
case YY_END_OF_BUFFER:
{
@@ -3223,7 +3231,7 @@
else
{
- yy_size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -3237,7 +3245,7 @@
if ( b->yy_is_our_buffer )
{
- yy_size_t new_size = b->yy_buf_size * 2;
+ int new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@@ -3268,7 +3276,7 @@
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
+ (yy_n_chars), (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -3366,6 +3374,10 @@
return yy_is_jam ? 0 : yy_current_state;
}
+#ifndef YY_NO_UNPUT
+
+#endif
+
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
@@ -3390,7 +3402,7 @@
else
{ /* need more input */
- yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
+ int offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@@ -3414,7 +3426,7 @@
case EOB_ACT_END_OF_FILE:
{
if ( yywrap( ) )
- return 0;
+ return EOF;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
@@ -3666,7 +3678,7 @@
*/
static void yyensure_buffer_stack (void)
{
- yy_size_t num_to_alloc;
+ int num_to_alloc;
if (!(yy_buffer_stack)) {
@@ -3763,11 +3775,12 @@
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
- yy_size_t n, i;
+ yy_size_t n;
+ int i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@@ -3849,7 +3862,7 @@
/** Get the length of the current token.
*
*/
-yy_size_t yyget_leng (void)
+int yyget_leng (void)
{
return yyleng;
}
@@ -3864,29 +3877,29 @@
}
/** Set the current line number.
- * @param line_number
+ * @param _line_number
*
*/
-void yyset_lineno (int line_number )
+void yyset_lineno (int _line_number )
{
- yylineno = line_number;
+ yylineno = _line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
- * @param in_str A readable stream.
+ * @param _in_str A readable stream.
*
* @see yy_switch_to_buffer
*/
-void yyset_in (FILE * in_str )
+void yyset_in (FILE * _in_str )
{
- yyin = in_str ;
+ yyin = _in_str ;
}
-void yyset_out (FILE * out_str )
+void yyset_out (FILE * _out_str )
{
- yyout = out_str ;
+ yyout = _out_str ;
}
int yyget_debug (void)
@@ -3894,9 +3907,9 @@
return yy_flex_debug;
}
-void yyset_debug (int bdebug )
+void yyset_debug (int _bdebug )
{
- yy_flex_debug = bdebug ;
+ yy_flex_debug = _bdebug ;
}
static int yy_init_globals (void)
@@ -3997,7 +4010,7 @@
#define YYTABLES_NAME "yytables"
-#line 468 "ldlex.l"
+#line 466 "ldlex.l"
diff -rNU3 dist/ld/ldlex.l dist.nbsd/ld/ldlex.l
--- dist/ld/ldlex.l Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/ldlex.l Wed Nov 7 11:13:50 2012
@@ -60,10 +60,6 @@
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result = yy_input (buf, max_size)
-#ifndef YY_NO_UNPUT
-#define YY_NO_UNPUT
-#endif
-
#define MAX_INCLUDE_DEPTH 10
static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
static const char *file_name_stack[MAX_INCLUDE_DEPTH];
@@ -92,6 +88,8 @@
int yywrap (void) { return 1; }
#endif
%}
+
+%option nounput
%a 4000
%o 5000
diff -rNU3 dist/ld/ldmain.c dist.nbsd/ld/ldmain.c
--- dist/ld/ldmain.c Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/ldmain.c Wed Nov 7 11:13:50 2012
@@ -694,6 +694,23 @@
einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
}
+void
+add_ignoresym (const char *name)
+{
+ if (link_info.ignore_hash == NULL)
+ {
+ link_info.ignore_hash = xmalloc (sizeof (struct bfd_hash_table));
+ if (! bfd_hash_table_init_n (link_info.ignore_hash,
+ bfd_hash_newfunc,
+ sizeof (struct bfd_hash_entry),
+ 61))
+ einfo (_("%P%F: bfd_hash_table_init failed: %E\n"));
+ }
+
+ if (bfd_hash_lookup (link_info.ignore_hash, name, TRUE, TRUE) == NULL)
+ einfo (_("%P%F: bfd_hash_lookup failed: %E\n"));
+}
+
/* Record a symbol to be wrapped, from the --wrap option. */
void
@@ -1291,24 +1308,25 @@
#define MAX_ERRORS_IN_A_ROW 5
+ if (info->ignore_hash != NULL
+ && bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL)
+ return TRUE;
+
if (config.warn_once)
{
- static struct bfd_hash_table *hash;
-
/* Only warn once about a particular undefined symbol. */
- if (hash == NULL)
+ if (info->ignore_hash == NULL)
{
- hash = (struct bfd_hash_table *)
- xmalloc (sizeof (struct bfd_hash_table));
- if (!bfd_hash_table_init (hash, bfd_hash_newfunc,
+ info->ignore_hash = xmalloc (sizeof (struct bfd_hash_table));
+ if (!bfd_hash_table_init (info->ignore_hash, bfd_hash_newfunc,
sizeof (struct bfd_hash_entry)))
einfo (_("%F%P: bfd_hash_table_init failed: %E\n"));
}
- if (bfd_hash_lookup (hash, name, FALSE, FALSE) != NULL)
+ if (bfd_hash_lookup (info->ignore_hash, name, FALSE, FALSE) != NULL)
return TRUE;
- if (bfd_hash_lookup (hash, name, TRUE, TRUE) == NULL)
+ if (bfd_hash_lookup (info->ignore_hash, name, TRUE, TRUE) == NULL)
einfo (_("%F%P: bfd_hash_lookup failed: %E\n"));
}
diff -rNU3 dist/ld/ldmain.h dist.nbsd/ld/ldmain.h
--- dist/ld/ldmain.h Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/ldmain.h Wed Nov 7 11:13:51 2012
@@ -44,6 +44,7 @@
extern void add_ysym (const char *);
extern void add_wrap (const char *);
+extern void add_ignoresym (const char *);
extern void add_keepsyms_file (const char *);
#endif
diff -rNU3 dist/ld/lexsup.c dist.nbsd/ld/lexsup.c
--- dist/ld/lexsup.c Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/lexsup.c Wed Nov 7 11:13:50 2012
@@ -175,6 +175,7 @@
OPTION_PLUGIN_OPT,
#endif /* ENABLE_PLUGINS */
OPTION_DEFAULT_SCRIPT,
+ OPTION_IGNORE_UNRESOLVED_SYMBOL
};
/* The long options. This structure is used for both the option
@@ -512,7 +513,7 @@
ONE_DASH },
{ {"shared", no_argument, NULL, OPTION_SHARED},
'\0', NULL, N_("Create a shared library"), ONE_DASH },
- { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */
+ { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD, NetBSD. */
'\0', NULL, NULL, ONE_DASH },
{ {"pie", no_argument, NULL, OPTION_PIE},
'\0', NULL, N_("Create a position independent executable"), ONE_DASH },
@@ -608,8 +609,14 @@
{ {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
'\0', NULL, N_("Include all objects from following archives"),
TWO_DASHES },
+ { {"Bforcearchive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
+ '\0', NULL, NULL, TWO_DASHES }, /* NetBSD. */
{ {"wrap", required_argument, NULL, OPTION_WRAP},
'\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
+ { {"ignore-unresolved-symbol", required_argument, NULL,
+ OPTION_IGNORE_UNRESOLVED_SYMBOL},
+ '\0', N_("SYMBOL"),
+ N_("Unresolved SYMBOL will not cause an error or warning"), TWO_DASHES },
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1452,6 +1459,9 @@
break;
case OPTION_WRAP:
add_wrap (optarg);
+ break;
+ case OPTION_IGNORE_UNRESOLVED_SYMBOL:
+ add_ignoresym (optarg);
break;
case OPTION_DISCARD_NONE:
link_info.discard = discard_none;
diff -rNU3 dist/ld/scripttempl/elf.sc dist.nbsd/ld/scripttempl/elf.sc
--- dist/ld/scripttempl/elf.sc Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/scripttempl/elf.sc Wed Nov 7 11:13:50 2012
@@ -91,6 +91,8 @@
#
# Each of these can also have corresponding .rel.* and .rela.* sections.
+test -z "$TEXT_START_SYMBOLS" && TEXT_START_SYMBOLS="PROVIDE_HIDDEN (__eprol = .);"
+test -z "$ENTRY" && ENTRY=_start
test -z "$RODATA_NAME" && RODATA_NAME=rodata
test -z "$SDATA_NAME" && SDATA_NAME=sdata
test -z "$SBSS_NAME" && SBSS_NAME=sbss
diff -rNU3 dist/ld/scripttempl/sh.sc dist.nbsd/ld/scripttempl/sh.sc
--- dist/ld/scripttempl/sh.sc Wed Nov 7 11:43:28 2012
+++ dist.nbsd/ld/scripttempl/sh.sc Wed Nov 7 11:13:50 2012
@@ -6,17 +6,14 @@
___dtors = . ;
*(.dtors)
___dtors_end = . ;
- } > ram"
+ }"
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
+${LIB_SEARCH_DIRS}
-MEMORY
-{
- ram : o = 0x1000, l = 512k
-}
-
SECTIONS
{
.text :
@@ -24,9 +21,9 @@
*(.text)
*(.strings)
${RELOCATING+ _etext = . ; }
- } ${RELOCATING+ > ram}
+ }
${CONSTRUCTING+${TORS}}
- .data :
+ .data ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
{
*(.data)
${RELOCATING+*(.gcc_exc*)}
@@ -35,19 +32,19 @@
${RELOCATING+___EH_FRAME_END__ = . ;}
${RELOCATING+LONG(0);}
${RELOCATING+ _edata = . ; }
- } ${RELOCATING+ > ram}
- .bss :
+ }
+ .bss ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
{
${RELOCATING+ _bss_start = . ; }
*(.bss)
*(COMMON)
${RELOCATING+ _end = . ; }
- } ${RELOCATING+ > ram}
- .stack ${RELOCATING+ 0x30000 } :
+ }
+ .stack :
{
${RELOCATING+ _stack = . ; }
*(.stack)
- } ${RELOCATING+ > ram}
+ }
.stab 0 ${RELOCATING+(NOLOAD)} :
{
*(.stab)
diff -rNU3 dist/libiberty/floatformat.c dist.nbsd/libiberty/floatformat.c
--- dist/libiberty/floatformat.c Wed Nov 7 11:43:26 2012
+++ dist.nbsd/libiberty/floatformat.c Wed Nov 7 11:13:54 2012
@@ -489,7 +489,11 @@
if (nan)
dto = NAN;
else
+#ifdef __vax__
+ dto = HUGE_VAL;
+#else
dto = INFINITY;
+#endif
if (get_field (ufrom, fmt->byteorder, fmt->totalsize, fmt->sign_start, 1))
dto = -dto;
diff -rNU3 dist/libiberty/strerror.c dist.nbsd/libiberty/strerror.c
--- dist/libiberty/strerror.c Wed Nov 7 11:43:26 2012
+++ dist.nbsd/libiberty/strerror.c Wed Nov 7 11:13:54 2012
@@ -347,7 +347,7 @@
ENTRY(EPROTOTYPE, "EPROTOTYPE", "Protocol wrong type for socket"),
#endif
#if defined (ENOPROTOOPT)
- ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol not available"),
+ ENTRY(ENOPROTOOPT, "ENOPROTOOPT", "Protocol option not available"),
#endif
#if defined (EPROTONOSUPPORT)
ENTRY(EPROTONOSUPPORT, "EPROTONOSUPPORT", "Protocol not supported"),
diff -rNU3 dist/opcodes/cgen.sh dist.nbsd/opcodes/cgen.sh
--- dist/opcodes/cgen.sh Wed Nov 7 11:43:26 2012
+++ dist.nbsd/opcodes/cgen.sh Wed Nov 7 11:13:50 2012
@@ -61,6 +61,7 @@
shift ; extrafiles=$9
rootdir=${srcdir}/..
+move_if_change="${CONFIG_SHELL:-/bin/sh} ${rootdir}/move-if-change"
# $arch is $6, as passed on the command line.
# $ARCH is the same argument but in all uppercase.
diff -rNU3 dist/opcodes/configure dist.nbsd/opcodes/configure
--- dist/opcodes/configure Wed Nov 7 11:43:26 2012
+++ dist.nbsd/opcodes/configure Wed Nov 7 11:13:50 2012
@@ -12473,6 +12473,14 @@
# specified, as in sh3-elf, sh3b-linux-gnu, etc.
# Include it just for ELF targets, since the SH5 bfd:s are ELF only.
for t in $target $canon_targets; do
+ # For NetBSD we do NOT want SH5 support unless sh5 or sh64
+ # is specified
+ case $t in
+ sh5*-* | sh64*-*) # let the case below handle it
+ ;;
+ sh*-*-netbsd* | sh*l*-*-netbsd*)
+ continue ;;
+ esac
case $t in
all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
sh-*-linux* | shl-*-linux*)
diff -rNU3 dist/opcodes/configure.in dist.nbsd/opcodes/configure.in
--- dist/opcodes/configure.in Wed Nov 7 11:43:26 2012
+++ dist.nbsd/opcodes/configure.in Wed Nov 7 11:13:50 2012
@@ -279,6 +279,14 @@
# specified, as in sh3-elf, sh3b-linux-gnu, etc.
# Include it just for ELF targets, since the SH5 bfd:s are ELF only.
for t in $target $canon_targets; do
+ # For NetBSD we do NOT want SH5 support unless sh5 or sh64
+ # is specified
+ case $t in
+ sh5*-* | sh64*-*) # let the case below handle it
+ ;;
+ sh*-*-netbsd* | sh*l*-*-netbsd*)
+ continue ;;
+ esac
case $t in
all | sh5*-* | sh64*-* | sh-*-*elf* | shl*-*-*elf* | \
sh-*-linux* | shl-*-linux*)
diff -rNU3 dist/opcodes/mips-opc.c dist.nbsd/opcodes/mips-opc.c
--- dist/opcodes/mips-opc.c Wed Nov 7 11:43:26 2012
+++ dist.nbsd/opcodes/mips-opc.c Wed Nov 7 11:13:50 2012
@@ -709,10 +709,12 @@
{"floor.w.s", "D,S", 0x4600000f, 0xffff003f, WR_D|RD_S|FP_S, 0, I2 },
{"hibernate","", 0x42000023, 0xffffffff, 0, 0, V1 },
{"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33 },
+{"jr", "s", 0, (int) M_JR_S, INSN_MACRO, 0, I1 },
{"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 },
/* jr.hb is officially MIPS{32,64}R2, but it works on R1 as jr with
the same hazard barrier effect. */
{"jr.hb", "s", 0x00000408, 0xfc1fffff, UBD|RD_s, 0, I32 },
+{"j", "s", 0, (int) M_J_S, INSN_MACRO, 0, I1 },
{"j", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 }, /* jr */
/* SVR4 PIC code requires special handling for j, so it must be a
macro. */
@@ -721,7 +723,9 @@
assembler, but will never match user input (because the line above
will match first). */
{"j", "a", 0x08000000, 0xfc000000, UBD, 0, I1 },
+{"jalr", "s", 0, (int) M_JALR_S, INSN_MACRO, 0, I1 },
{"jalr", "s", 0x0000f809, 0xfc1fffff, UBD|RD_s|WR_d, 0, I1 },
+{"jalr", "d,s", 0, (int) M_JALR_DS, INSN_MACRO, 0, I1 },
{"jalr", "d,s", 0x00000009, 0xfc1f07ff, UBD|RD_s|WR_d, 0, I1 },
/* jalr.hb is officially MIPS{32,64}R2, but it works on R1 as jalr
with the same hazard barrier effect. */