This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Remove netware support


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b4b594e304d44458e25e106ddb4824a37aaf556c

commit b4b594e304d44458e25e106ddb4824a37aaf556c
Author: Alan Modra <amodra@gmail.com>
Date:   Mon Apr 16 15:11:22 2018 +0930

    Remove netware support
    
    include/
    	* nlm/ChangeLog-9315: Delete.
    	* nlm/alpha-ext.h: Delete.
    	* nlm/common.h: Delete.
    	* nlm/external.h: Delete.
    	* nlm/i386-ext.h: Delete.
    	* nlm/internal.h: Delete.
    	* nlm/ppc-ext.h: Delete.
    	* nlm/sparc32-ext.h: Delete.
    bfd/
    	* Makefile.am: Remove netware support.
    	* bfd-in.h: Likewise.
    	* bfd.c: Likewise.
    	* config.bfd: Likewise.
    	* configure.ac: Likewise.
    	* doc/bfdint.texi: Likewise.
    	* ecoff.c: Likewise.
    	* targets.c: Likewise.
    	* libnlm.h: Delete.
    	* nlm-target.h: Delete.
    	* nlm.c: Delete.
    	* nlm32-alpha.c: Delete.
    	* nlm32-i386.c: Delete.
    	* nlm32-ppc.c: Delete.
    	* nlm32-sparc.c: Delete.
    	* nlm32.c: Delete.
    	* nlm64.c: Delete.
    	* nlmcode.h: Delete.
    	* nlmswap.h: Delete.
    	* Makefile.in: Regenerate.
    	* bfd-in2.h: Regenerate.
    	* configure: Regenerate.
    	* po/SRC-POTFILES.in: Regenerate.
    binutils/
    	* .gitignore: Remove netware support.
    	* Makefile.am: Likewise.
    	* configure.ac: Likewise.
    	* doc/Makefile.am: Likewise.
    	* doc/binutils.texi: Likewise.
    	* testsuite/binutils-all/nm.exp: Likewise.
    	* nlmconv.c: Delete.
    	* nlmconv.h: Delete.
    	* nlmheader.y: Delete.
    	* Makefile.in: Regenerate.
    	* configure: Regenerate.
    	* doc/Makefile.in: Regenerate.
    	* po/POTFILES.in: Regenerate.
    gas/
    	* Makefile.am: Remove netware support.
    	* config/tc-i386.c: Likewise.
    	* configure.tgt: Likewise.
    	* config/te-netware.h: Delete.
    	* Makefile.in: Regenerate.
    	* po/POTFILES.in: Regenerate.
    gprof/
    	* corefile.c: Remove netware support.
    ld/
    	* Makefile.am: Remove netware support.
    	* configure.tgt: Likewise.
    	* testsuite/ld-powerpc/powerpc.exp: Likewise.
    	* emulparams/i386nw.sh: Delete.
    	* emulparams/ppcnw.sh: Delete.
    	* scripttempl/nw.sc: Delete.
    	* Makefile.in: Regenerate.
    	* po/BLD-POTFILES.in: Regenerate.

Diff:
---
 bfd/ChangeLog                          |   26 +
 bfd/Makefile.am                        |   18 +-
 bfd/Makefile.in                        |   25 +-
 bfd/bfd-in.h                           |    2 -
 bfd/bfd-in2.h                          |    4 -
 bfd/bfd.c                              |    1 -
 bfd/config.bfd                         |   21 +-
 bfd/configure                          |    4 -
 bfd/configure.ac                       |    4 -
 bfd/doc/bfdint.texi                    |   24 -
 bfd/ecoff.c                            |   16 -
 bfd/libnlm.h                           |  222 ----
 bfd/nlm-target.h                       |  265 ----
 bfd/nlm.c                              |   55 -
 bfd/nlm32-alpha.c                      |  859 -------------
 bfd/nlm32-i386.c                       |  429 -------
 bfd/nlm32-ppc.c                        |  986 ---------------
 bfd/nlm32-sparc.c                      |  378 ------
 bfd/nlm32.c                            |   22 -
 bfd/nlm64.c                            |   22 -
 bfd/nlmcode.h                          | 1982 -----------------------------
 bfd/nlmswap.h                          |  153 ---
 bfd/po/SRC-POTFILES.in                 |   11 -
 bfd/targets.c                          |   10 -
 binutils/.gitignore                    |    4 -
 binutils/ChangeLog                     |   16 +
 binutils/Makefile.am                   |   45 +-
 binutils/Makefile.in                   |  121 +-
 binutils/configure                     |   31 +-
 binutils/configure.ac                  |   27 -
 binutils/doc/Makefile.am               |    8 -
 binutils/doc/Makefile.in               |   10 -
 binutils/doc/binutils.texi             |  110 --
 binutils/nlmconv.c                     | 2166 --------------------------------
 binutils/nlmconv.h                     |   86 --
 binutils/nlmheader.y                   |  959 --------------
 binutils/po/POTFILES.in                |    2 -
 binutils/testsuite/binutils-all/nm.exp |    7 +-
 gas/ChangeLog                          |    9 +
 gas/Makefile.am                        |    1 -
 gas/Makefile.in                        |    1 -
 gas/config/tc-i386.c                   |    1 -
 gas/config/te-netware.h                |   28 -
 gas/configure.tgt                      |    1 -
 gas/po/POTFILES.in                     |    1 -
 gprof/ChangeLog                        |    4 +
 gprof/corefile.c                       |    1 -
 include/ChangeLog                      |   11 +
 include/nlm/ChangeLog-9315             |  127 --
 include/nlm/alpha-ext.h                |  167 ---
 include/nlm/common.h                   |  123 --
 include/nlm/external.h                 |  172 ---
 include/nlm/i386-ext.h                 |  117 --
 include/nlm/internal.h                 |  309 -----
 include/nlm/ppc-ext.h                  |  164 ---
 include/nlm/sparc32-ext.h              |  121 --
 ld/ChangeLog                           |   11 +
 ld/Makefile.am                         |    8 -
 ld/Makefile.in                         |   10 -
 ld/configure.tgt                       |    3 -
 ld/emulparams/i386nw.sh                |    8 -
 ld/emulparams/ppcnw.sh                 |    6 -
 ld/po/BLD-POTFILES.in                  |    2 -
 ld/scripttempl/nw.sc                   |  143 ---
 ld/testsuite/ld-powerpc/powerpc.exp    |    2 +-
 65 files changed, 135 insertions(+), 10547 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fe34344..9e26d90 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,31 @@
 2018-04-16  Alan Modra  <amodra@gmail.com>
 
+	* Makefile.am: Remove netware support.
+	* bfd-in.h: Likewise.
+	* bfd.c: Likewise.
+	* config.bfd: Likewise.
+	* configure.ac: Likewise.
+	* doc/bfdint.texi: Likewise.
+	* ecoff.c: Likewise.
+	* targets.c: Likewise.
+	* libnlm.h: Delete.
+	* nlm-target.h: Delete.
+	* nlm.c: Delete.
+	* nlm32-alpha.c: Delete.
+	* nlm32-i386.c: Delete.
+	* nlm32-ppc.c: Delete.
+	* nlm32-sparc.c: Delete.
+	* nlm32.c: Delete.
+	* nlm64.c: Delete.
+	* nlmcode.h: Delete.
+	* nlmswap.h: Delete.
+	* Makefile.in: Regenerate.
+	* bfd-in2.h: Regenerate.
+	* configure: Regenerate.
+	* po/SRC-POTFILES.in: Regenerate.
+
+2018-04-16  Alan Modra  <amodra@gmail.com>
+
 	* archures.c: Remove tahoe support.
 	* config.bfd: Likewise.
 	* configure.ac: Likewise.
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index a03e2b2..0ed96c9 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -411,11 +411,6 @@ BFD32_BACKENDS = \
 	mach-o-arm.lo \
 	mipsbsd.lo \
 	newsos3.lo \
-	nlm.lo \
-	nlm32-i386.lo \
-	nlm32-ppc.lo \
-	nlm32-sparc.lo \
-	nlm32.lo \
 	ns32knetbsd.lo \
 	oasys.lo \
 	pc532-mach.lo \
@@ -602,11 +597,6 @@ BFD32_BACKENDS_CFILES = \
 	mach-o-arm.c \
 	mipsbsd.c \
 	newsos3.c \
-	nlm.c \
-	nlm32-i386.c \
-	nlm32-ppc.c \
-	nlm32-sparc.c \
-	nlm32.c \
 	ns32knetbsd.c \
 	oasys.c \
 	pc532-mach.c \
@@ -690,8 +680,6 @@ BFD64_BACKENDS = \
 	mach-o-aarch64.lo \
 	mach-o-x86-64.lo \
 	mmo.lo \
-	nlm32-alpha.lo \
-	nlm64.lo \
 	pe-x86_64.lo \
 	pei-ia64.lo \
 	pei-x86_64.lo \
@@ -731,8 +719,6 @@ BFD64_BACKENDS_CFILES = \
 	mach-o-aarch64.c \
 	mach-o-x86-64.c \
 	mmo.c \
-	nlm32-alpha.c \
-	nlm64.c \
 	pe-x86_64.c \
 	pei-ia64.c \
 	pei-x86_64.c \
@@ -804,8 +790,8 @@ SOURCE_HFILES = \
 	elf64-hppa.h elfcode.h elfcore.h \
 	freebsd.h genlink.h go32stub.h \
 	libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
-	libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
-	netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
+	liboasys.h libpei.h libxcoff.h mach-o.h \
+	netbsd.h ns32k.h \
 	pef.h pef-traceback.h peicode.h som.h version.h \
 	vms.h xsym.h
 
diff --git a/bfd/Makefile.in b/bfd/Makefile.in
index d63aef9..91614ce 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -745,11 +745,6 @@ BFD32_BACKENDS = \
 	mach-o-arm.lo \
 	mipsbsd.lo \
 	newsos3.lo \
-	nlm.lo \
-	nlm32-i386.lo \
-	nlm32-ppc.lo \
-	nlm32-sparc.lo \
-	nlm32.lo \
 	ns32knetbsd.lo \
 	oasys.lo \
 	pc532-mach.lo \
@@ -936,11 +931,6 @@ BFD32_BACKENDS_CFILES = \
 	mach-o-arm.c \
 	mipsbsd.c \
 	newsos3.c \
-	nlm.c \
-	nlm32-i386.c \
-	nlm32-ppc.c \
-	nlm32-sparc.c \
-	nlm32.c \
 	ns32knetbsd.c \
 	oasys.c \
 	pc532-mach.c \
@@ -1025,8 +1015,6 @@ BFD64_BACKENDS = \
 	mach-o-aarch64.lo \
 	mach-o-x86-64.lo \
 	mmo.lo \
-	nlm32-alpha.lo \
-	nlm64.lo \
 	pe-x86_64.lo \
 	pei-ia64.lo \
 	pei-x86_64.lo \
@@ -1066,8 +1054,6 @@ BFD64_BACKENDS_CFILES = \
 	mach-o-aarch64.c \
 	mach-o-x86-64.c \
 	mmo.c \
-	nlm32-alpha.c \
-	nlm64.c \
 	pe-x86_64.c \
 	pei-ia64.c \
 	pei-x86_64.c \
@@ -1139,8 +1125,8 @@ SOURCE_HFILES = \
 	elf64-hppa.h elfcode.h elfcore.h \
 	freebsd.h genlink.h go32stub.h \
 	libaout.h libbfd.h libcoff.h libecoff.h libhppa.h libieee.h \
-	libnlm.h liboasys.h libpei.h libxcoff.h mach-o.h \
-	netbsd.h nlm-target.h nlmcode.h nlmswap.h ns32k.h \
+	liboasys.h libpei.h libxcoff.h mach-o.h \
+	netbsd.h ns32k.h \
 	pef.h pef-traceback.h peicode.h som.h version.h \
 	vms.h xsym.h
 
@@ -1594,13 +1580,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmo.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netbsd-core.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newsos3.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32-alpha.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32-i386.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32-ppc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32-sparc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm32.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nlm64.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ns32knetbsd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oasys.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opncls.Plo@am__quote@
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index a06cd74..cc59ed6 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -608,8 +608,6 @@ extern bfd_boolean _bfd_handle_already_linked
 
 /* Externally visible ECOFF routines.  */
 
-extern bfd_vma bfd_ecoff_get_gp_value
-  (bfd * abfd);
 extern bfd_boolean bfd_ecoff_set_gp_value
   (bfd *abfd, bfd_vma gp_value);
 extern bfd_boolean bfd_ecoff_set_regmasks
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 6a3d3d5..d04f028 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -615,8 +615,6 @@ extern bfd_boolean _bfd_handle_already_linked
 
 /* Externally visible ECOFF routines.  */
 
-extern bfd_vma bfd_ecoff_get_gp_value
-  (bfd * abfd);
 extern bfd_boolean bfd_ecoff_set_gp_value
   (bfd *abfd, bfd_vma gp_value);
 extern bfd_boolean bfd_ecoff_set_regmasks
@@ -7015,7 +7013,6 @@ struct bfd
       struct ihex_data_struct *ihex_data;
       struct tekhex_data_struct *tekhex_data;
       struct elf_obj_tdata *elf_obj_data;
-      struct nlm_obj_tdata *nlm_obj_data;
       struct mmo_data_struct *mmo_data;
       struct sun_core_struct *sun_core_data;
       struct sco5_core_struct *sco5_core_data;
@@ -7325,7 +7322,6 @@ enum bfd_flavour
   bfd_target_xcoff_flavour,
   bfd_target_elf_flavour,
   bfd_target_ieee_flavour,
-  bfd_target_nlm_flavour,
   bfd_target_oasys_flavour,
   bfd_target_tekhex_flavour,
   bfd_target_srec_flavour,
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 31bcc34..31df6cd 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -317,7 +317,6 @@ CODE_FRAGMENT
 .      struct ihex_data_struct *ihex_data;
 .      struct tekhex_data_struct *tekhex_data;
 .      struct elf_obj_tdata *elf_obj_data;
-.      struct nlm_obj_tdata *nlm_obj_data;
 .      struct mmo_data_struct *mmo_data;
 .      struct sun_core_struct *sun_core_data;
 .      struct sco5_core_struct *sco5_core_data;
diff --git a/bfd/config.bfd b/bfd/config.bfd
index 77ce4eb..4f6fb94 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -57,7 +57,6 @@ case $targ in
  mips*-*-irix5* | mips*-*-irix6*)
     # Not obsolete
     ;;
- *-*-netware* | \
  arm-epoc-pe* | \
  arm*-*-aout | \
  arm*-*-coff | \
@@ -75,7 +74,6 @@ case $targ in
  i[3-7]86-*-freebsd[12] | \
  i[3-7]86-*-netbsdaout* | i[3-7]86-*-netbsd* | \
  i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3] | \
- i[3-7]86-*-netware* | \
  i[3-7]86-*-linux*aout* | \
  i[3-7]86-*-mach* | i[3-7]86-*-osf1mk* | \
  i[3-7]86-*-os9k | \
@@ -106,7 +104,6 @@ case $targ in
  sparc-*-linux*aout* | \
  sparc-*-netbsdaout* | \
  sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1] | \
- sparc-*-netware* | \
  sparc64-*-aout* | \
  sparc*-*-coff* | \
  vax-*-bsd* | vax-*-ultrix* | \
@@ -130,6 +127,7 @@ esac
 case $targ in
  *-adobe-* | \
  *-go32-rtems* | \
+ *-*-netware* | \
  *-*-rtemsaout* | \
  *-*-rtemscoff* | \
  a29k-* | \
@@ -294,11 +292,6 @@ case "${targ}" in
     targ_selvecs=alpha_ecoff_le_vec
     want64=true
     ;;
-  alpha*-*-netware*)
-    targ_defvec=alpha_ecoff_le_vec
-    targ_selvecs=alpha_nlm32_vec
-    want64=true
-    ;;
   alpha*-*-linux*ecoff*)
     targ_defvec=alpha_ecoff_le_vec
     targ_selvecs=alpha_elf64_vec
@@ -732,10 +725,6 @@ case "${targ}" in
     targ_defvec=i386_elf32_vec
     targ_selvecs="iamcu_elf32_vec i386_aout_nbsd_vec"
     ;;
-  i[3-7]86-*-netware*)
-    targ_defvec=i386_elf32_vec
-    targ_selvecs="iamcu_elf32_vec i386_nlm32_vec i386_coff_vec i386_aout_vec"
-    ;;
   i[3-7]86-*-linux*aout*)
     targ_defvec=i386_aout_linux_vec
     targ_selvecs="i386_elf32_vec iamcu_elf32_vec"
@@ -1384,10 +1373,6 @@ case "${targ}" in
     targ_selvecs="rs6000_xcoff_vec"
     targ_cflags=-DSMALL_ARCHIVE
     ;;
-  powerpc-*-netware*)
-    targ_defvec=powerpc_elf32_vec
-    targ_selvecs="powerpc_nlm32_vec rs6000_xcoff_vec"
-    ;;
   powerpc-*-nto*)
     targ_defvec=powerpc_elf32_vec
     targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec powerpc_boot_vec"
@@ -1665,10 +1650,6 @@ case "${targ}" in
     targ_defvec=sparc_elf32_vxworks_vec
     targ_selvecs="sparc_elf32_vec sparc_aout_sunos_be_vec"
     ;;
-  sparc-*-netware*)
-    targ_defvec=sparc_elf32_vec
-    targ_selvecs="sparc_nlm32_vec sparc_aout_sunos_be_vec"
-    ;;
 #ifdef BFD64
   sparc64-*-aout*)
     targ_defvec=sparc_aout_sunos_be_vec
diff --git a/bfd/configure b/bfd/configure
index 5a06c7a..81befe3 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -14337,7 +14337,6 @@ do
     alpha_ecoff_le_vec)		 tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
     alpha_elf64_vec)		 tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
     alpha_elf64_fbsd_vec)	 tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
-    alpha_nlm32_vec)		 tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;;
     alpha_vms_vec)		 tb="$tb vms-alpha.lo vms-misc.lo vms-lib.lo"; target_size=64 ;;
     alpha_vms_lib_txt_vec)	 tb="$tb vms-lib.lo vms-misc.lo" ;;
     am33_elf32_linux_vec)	 tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
@@ -14424,7 +14423,6 @@ do
     i386_elf32_vxworks_vec)	 tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
     i386_mach_o_vec)		 tb="$tb mach-o-i386.lo" ;;
     i386_msdos_vec)		 tb="$tb i386msdos.lo" ;;
-    i386_nlm32_vec)		 tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
     i386_pe_vec)		 tb="$tb pe-i386.lo peigen.lo $coff" ;;
     i386_pei_vec)		 tb="$tb pei-i386.lo peigen.lo $coff" ;;
     iamcu_elf32_vec)		 tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
@@ -14539,7 +14537,6 @@ do
     powerpc_elf64_vec)		 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
     powerpc_elf64_le_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
     powerpc_elf64_fbsd_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
-    powerpc_nlm32_vec)		 tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
     powerpc_pe_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
     powerpc_pe_le_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
     powerpc_pei_vec)		 tb="$tb pei-ppc.lo peigen.lo $coff" ;;
@@ -14601,7 +14598,6 @@ do
     sparc_elf64_vec)		 tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     sparc_elf64_fbsd_vec)	 tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     sparc_elf64_sol2_vec)	 tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
-    sparc_nlm32_vec)		 tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
     spu_elf32_vec)		 tb="$tb elf32-spu.lo elf32.lo $elf" ;;
     sym_vec)			 tb="$tb xsym.lo" ;;
     tic30_aout_vec)		 tb="$tb aout-tic30.lo" ;;
diff --git a/bfd/configure.ac b/bfd/configure.ac
index afaa635..e8250ad 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -414,7 +414,6 @@ do
     alpha_ecoff_le_vec)		 tb="$tb coff-alpha.lo ecoff.lo $ecoff"; target_size=64 ;;
     alpha_elf64_vec)		 tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
     alpha_elf64_fbsd_vec)	 tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
-    alpha_nlm32_vec)		 tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;;
     alpha_vms_vec)		 tb="$tb vms-alpha.lo vms-misc.lo vms-lib.lo"; target_size=64 ;;
     alpha_vms_lib_txt_vec)	 tb="$tb vms-lib.lo vms-misc.lo" ;;
     am33_elf32_linux_vec)	 tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
@@ -501,7 +500,6 @@ do
     i386_elf32_vxworks_vec)	 tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
     i386_mach_o_vec)		 tb="$tb mach-o-i386.lo" ;;
     i386_msdos_vec)		 tb="$tb i386msdos.lo" ;;
-    i386_nlm32_vec)		 tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
     i386_pe_vec)		 tb="$tb pe-i386.lo peigen.lo $coff" ;;
     i386_pei_vec)		 tb="$tb pei-i386.lo peigen.lo $coff" ;;
     iamcu_elf32_vec)		 tb="$tb elf32-i386.lo elfxx-x86.lo elf-ifunc.lo elf-nacl.lo elf-vxworks.lo elf32.lo $elf" ;;
@@ -616,7 +614,6 @@ do
     powerpc_elf64_vec)		 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
     powerpc_elf64_le_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
     powerpc_elf64_fbsd_vec)	 tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
-    powerpc_nlm32_vec)		 tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
     powerpc_pe_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
     powerpc_pe_le_vec)		 tb="$tb pe-ppc.lo peigen.lo $coff" ;;
     powerpc_pei_vec)		 tb="$tb pei-ppc.lo peigen.lo $coff" ;;
@@ -678,7 +675,6 @@ do
     sparc_elf64_vec)		 tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     sparc_elf64_fbsd_vec)	 tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
     sparc_elf64_sol2_vec)	 tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
-    sparc_nlm32_vec)		 tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
     spu_elf32_vec)		 tb="$tb elf32-spu.lo elf32.lo $elf" ;;
     sym_vec)			 tb="$tb xsym.lo" ;;
     tic30_aout_vec)		 tb="$tb aout-tic30.lo" ;;
diff --git a/bfd/doc/bfdint.texi b/bfd/doc/bfdint.texi
index fa838c4..954a47a 100644
--- a/bfd/doc/bfdint.texi
+++ b/bfd/doc/bfdint.texi
@@ -338,8 +338,6 @@ ECOFF.
 ELF.
 @item bfd_target_ieee_flavour
 IEEE-695.
-@item bfd_target_nlm_flavour
-NLM.
 @item bfd_target_oasys_flavour
 OASYS.
 @item bfd_target_tekhex_flavour
@@ -1116,23 +1114,6 @@ various macros, and includes @file{aout-target.h}.
 Like @file{freebsd.h}, except that there are several files which include
 it.
 
-@item nlm-target.h
-@cindex @file{nlm-target.h}
-Defines the target vector for a standard NLM target.
-
-@item nlmcode.h
-@cindex @file{nlmcode.h}
-Like @file{elfcode.h}, but for NLM targets.  This is only included by
-@file{nlm32.c} and @file{nlm64.c}, both of which define the macro
-@samp{ARCH_SIZE} to an appropriate value.  There are no 64 bit NLM
-targets anyhow, so this is sort of useless.
-
-@item nlmswap.h
-@cindex @file{nlmswap.h}
-Like @file{coffswap.h}, but for NLM targets.  This is included by each
-NLM target, but I think it winds up compiling to the exact same code for
-every target, and as such is fairly useless.
-
 @item peicode.h
 @cindex @file{peicode.h}
 Provides swapping routines and other hooks for PE targets.
@@ -1826,11 +1807,6 @@ information.  Normally produced by a linker.
 Load Memory Address.  This is the address at which a section will be
 loaded.  Compare with VMA, below.
 
-@item NLM
-NetWare Loadable Module.  Used to describe the format of an object which
-be loaded into NetWare, which is some kind of PC based network server
-program.
-
 @item object file
 A binary file including machine instructions, symbols, and relocation
 information.  Normally produced by an assembler.
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index c947e60..b01f572 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -2218,22 +2218,6 @@ _bfd_ecoff_set_section_contents (bfd *abfd,
   return TRUE;
 }
 
-/* Get the GP value for an ECOFF file.  This is a hook used by
-   nlmconv.  */
-
-bfd_vma
-bfd_ecoff_get_gp_value (bfd *abfd)
-{
-  if (bfd_get_flavour (abfd) != bfd_target_ecoff_flavour
-      || bfd_get_format (abfd) != bfd_object)
-    {
-      bfd_set_error (bfd_error_invalid_operation);
-      return 0;
-    }
-
-  return ecoff_data (abfd)->gp;
-}
-
 /* Set the GP value for an ECOFF file.  This is a hook used by the
    assembler.  */
 
diff --git a/bfd/libnlm.h b/bfd/libnlm.h
deleted file mode 100644
index 042c3a4..0000000
--- a/bfd/libnlm.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/* BFD back-end data structures for NLM (NetWare Loadable Modules) files.
-   Copyright (C) 1993-2018 Free Software Foundation, Inc.
-   Written by Cygnus Support.
-
-   This file is part of BFD, the Binary File Descriptor library.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-   MA 02110-1301, USA.  */
-
-#ifndef _LIBNLM_H_
-#define _LIBNLM_H_ 1
-
-#ifdef ARCH_SIZE
-#  define NLM_ARCH_SIZE ARCH_SIZE
-#endif
-#include "nlm/common.h"
-#include "nlm/internal.h"
-#include "nlm/external.h"
-
-/* A reloc for an imported NLM symbol.  Normal relocs are associated
-   with sections, and include a symbol.  These relocs are associated
-   with (undefined) symbols, and include a section.  */
-
-struct nlm_relent
-{
-  /* Section of reloc.  */
-  asection *section;
-  /* Reloc info (sym_ptr_ptr field set only when canonicalized).  */
-  arelent reloc;
-};
-
-/* Information we keep for an NLM symbol.  */
-
-typedef struct
-{
-  /* BFD symbol.  */
-  asymbol symbol;
-  /* Number of reloc entries for imported symbol.  */
-  bfd_size_type rcnt;
-  /* Array of reloc information for imported symbol.  */
-  struct nlm_relent *relocs;
-} nlmNAME(symbol_type);
-
-extern bfd_boolean	  nlm_mkobject			  (bfd *);
-extern bfd_boolean	  nlm_set_arch_mach		  (bfd *, enum bfd_architecture, unsigned long);
-extern void		  nlmNAME (get_symbol_info)	  (bfd *, asymbol *, symbol_info *);
-extern long		  nlmNAME (get_symtab_upper_bound)(bfd *);
-extern long		  nlmNAME (canonicalize_symtab)	  (bfd *, asymbol **);
-extern asymbol *	  nlmNAME (make_empty_symbol)	  (bfd *);
-extern void		  nlmNAME (print_symbol)	  (bfd *, void *, asymbol *, bfd_print_symbol_type);
-extern long		  nlmNAME (get_reloc_upper_bound) (bfd *, asection *);
-extern long		  nlmNAME (canonicalize_reloc)	  (bfd *, asection *, arelent **, asymbol **);
-extern const bfd_target * nlmNAME (object_p)		  (bfd *);
-extern bfd_boolean	  nlmNAME (set_arch_mach)	  (bfd *, enum bfd_architecture, unsigned long);
-extern bfd_boolean	  nlmNAME (set_section_contents)  (bfd *, asection *, const void *, file_ptr, bfd_size_type);
-extern bfd_boolean	  nlmNAME (write_object_contents) (bfd *);
-
-/* Some private data is stashed away for future use using the tdata pointer
-   in the bfd structure.  */
-
-struct nlm_obj_tdata
-{
-  /* Actual data, but ref like ptr */
-  Nlm_Internal_Fixed_Header	nlm_fixed_hdr[1];
-  Nlm_Internal_Variable_Header	nlm_variable_hdr[1];
-  Nlm_Internal_Version_Header	nlm_version_hdr[1];
-  Nlm_Internal_Copyright_Header	nlm_copyright_hdr[1];
-  Nlm_Internal_Extended_Header	nlm_extended_hdr[1];
-  Nlm_Internal_Custom_Header	nlm_custom_hdr[1];
-  Nlm_Internal_Cygnus_Ext_Header nlm_cygnus_ext_hdr[1];
-  /* BFD NLM symbols.  */
-  nlmNAME (symbol_type)	*	nlm_symbols;
-  /* Lowest text and data VMA values.  */
-  bfd_vma			nlm_text_low;
-  bfd_vma			nlm_data_low;
-  /* Caches for data read from object file.  */
-  arelent *			nlm_reloc_fixups;
-  asection **			nlm_reloc_fixup_secs;
-  /* Backend specific information.  This should probably be a pointer,
-     but that would require yet another entry point to initialize the
-     structure.  */
-  union
-    {
-      struct	/* Alpha backend information.  */
-	{
-	  bfd_vma gp;			/* GP value.  */
-	  bfd_vma lita_address;		/* .lita section address.  */
-	  bfd_size_type lita_size;	/* .lita section size.  */
-	}
-      alpha_backend_data;
-    }
-  backend_data;
-};
-
-#define nlm_tdata(bfd)			((bfd) -> tdata.nlm_obj_data)
-#define nlm_fixed_header(bfd)		(nlm_tdata (bfd) -> nlm_fixed_hdr)
-#define nlm_variable_header(bfd)	(nlm_tdata (bfd) -> nlm_variable_hdr)
-#define nlm_version_header(bfd)		(nlm_tdata (bfd) -> nlm_version_hdr)
-#define nlm_copyright_header(bfd)	(nlm_tdata (bfd) -> nlm_copyright_hdr)
-#define nlm_extended_header(bfd)	(nlm_tdata (bfd) -> nlm_extended_hdr)
-#define nlm_custom_header(bfd)		(nlm_tdata (bfd) -> nlm_custom_hdr)
-#define nlm_cygnus_ext_header(bfd)	(nlm_tdata (bfd) -> nlm_cygnus_ext_hdr)
-#define nlm_get_symbols(bfd)		(nlm_tdata (bfd) -> nlm_symbols)
-#define nlm_set_symbols(bfd, p)		(nlm_tdata (bfd) -> nlm_symbols = (p))
-#define nlm_set_text_low(bfd, i)	(nlm_tdata (bfd) -> nlm_text_low = (i))
-#define nlm_get_text_low(bfd)		(nlm_tdata (bfd) -> nlm_text_low)
-#define nlm_set_data_low(bfd, i)	(nlm_tdata (bfd) -> nlm_data_low = (i))
-#define nlm_get_data_low(bfd)		(nlm_tdata (bfd) -> nlm_data_low)
-#define nlm_relocation_fixups(bfd)	(nlm_tdata (bfd) -> nlm_reloc_fixups)
-#define nlm_relocation_fixup_secs(bfd)	(nlm_tdata (bfd) -> nlm_reloc_fixup_secs)
-#define nlm_alpha_backend_data(bfd)    (&nlm_tdata (bfd) -> backend_data.alpha_backend_data)
-
-/* This is used when writing out the external relocs. */
-
-struct reloc_and_sec
-{
-  arelent *rel;
-  asection *sec;
-};
-
-/* We store some function pointer in the backend structure.  This lets
-   different NLM targets share most of the same code, while providing
-   slightly different code where necessary.  */
-
-struct nlm_backend_data
-{
-  /* Signature for this backend.  */
-  char signature[NLM_SIGNATURE_SIZE];
-  /* Size of the fixed header.  */
-  bfd_size_type fixed_header_size;
-  /* Size of optional prefix for this backend.  Some backend may
-     require this to be a function, but so far a constant is OK.  This
-     is for a prefix which precedes the standard NLM fixed header.  */
-  bfd_size_type optional_prefix_size;
-  /* Architecture.  */
-  enum bfd_architecture arch;
-  /* Machine.  */
-  unsigned int mach;
-  /* Some NLM formats do not use the uninitialized data section, so
-     all uninitialized data must be put into the regular data section
-     instead.  */
-  bfd_boolean no_uninitialized_data;
-  /* Some NLM formats have a prefix on the file.  If this function is
-     not NULL, it will be called by nlm_object_p.  It should return
-     TRUE if this file could match this format, and it should leave
-     the BFD such that a bfd_bread will pick up the fixed header.  */
-  bfd_boolean (*nlm_backend_object_p) (bfd *);
-  /* Write out the prefix.  This function may be NULL.  This must
-     write out the same number of bytes as is in the field
-     optional_prefix_size.  */
-  bfd_boolean (*nlm_write_prefix) (bfd *);
-  /* Read a relocation fixup from abfd.  The reloc information is
-     machine specific.  The second argument is the symbol if this is
-     an import, or NULL if this is a reloc fixup.  This function
-     should set the third argument to the section which the reloc
-     belongs in, and the fourth argument to the reloc itself; it does
-     not need to fill in the sym_ptr_ptr field for a reloc against an
-     import symbol.  */
-  bfd_boolean (*nlm_read_reloc) (bfd *, nlmNAME (symbol_type) *, asection **, arelent *);
-  /* To make objcopy to an i386 NLM work, the i386 backend needs a
-     chance to work over the relocs.  This is a bit icky.  */
-  bfd_boolean (*nlm_mangle_relocs) (bfd *, asection *, const void *, bfd_vma,  bfd_size_type);
-  /* Read an import record from abfd.  It would be nice if this
-     were in a machine-dependent format, but it doesn't seem to be. */
-  bfd_boolean (*nlm_read_import) (bfd *, nlmNAME (symbol_type) *);
-  /* Write an import record to abfd. */
-  bfd_boolean (*nlm_write_import) (bfd *, asection *, arelent *);
-  /* Set the section for a public symbol.  This may be NULL, in which
-     case a default method will be used.  */
-  bfd_boolean (*nlm_set_public_section) (bfd *, nlmNAME (symbol_type) *);
-  /* Get the offset to write out for a public symbol.  This may be
-     NULL, in which case a default method will be used.  */
-  bfd_vma (*nlm_get_public_offset) (bfd *, asymbol *);
-  /* Swap the fixed header in and out */
-  void (*nlm_swap_fhdr_in)  (bfd *, void *, Nlm_Internal_Fixed_Header *);
-  void (*nlm_swap_fhdr_out) (bfd *, struct nlm_internal_fixed_header *, void *);
-  /* Write out an external reference.  */
-  bfd_boolean (*nlm_write_external) (bfd *, bfd_size_type, asymbol *, struct reloc_and_sec *);
-  bfd_boolean (*nlm_write_export) (bfd *, asymbol *, bfd_vma);
-};
-
-#define nlm_backend(bfd)   ((struct nlm_backend_data *)((bfd) -> xvec -> backend_data))
-#define nlm_signature(bfd)		   (nlm_backend (bfd) -> signature)
-#define nlm_fixed_header_size(bfd)	   (nlm_backend (bfd) -> fixed_header_size)
-#define nlm_optional_prefix_size(bfd)	   (nlm_backend (bfd) -> optional_prefix_size)
-#define nlm_architecture(bfd)		   (nlm_backend (bfd) -> arch)
-#define nlm_machine(bfd)		   (nlm_backend (bfd) -> mach)
-#define nlm_no_uninitialized_data(bfd)	   (nlm_backend (bfd) -> no_uninitialized_data)
-#define nlm_backend_object_p_func(bfd)	   (nlm_backend (bfd) -> nlm_backend_object_p)
-#define nlm_write_prefix_func(bfd)	   (nlm_backend (bfd) -> nlm_write_prefix)
-#define nlm_read_reloc_func(bfd)	   (nlm_backend (bfd) -> nlm_read_reloc)
-#define nlm_mangle_relocs_func(bfd)	   (nlm_backend (bfd) -> nlm_mangle_relocs)
-#define nlm_read_import_func(bfd)	   (nlm_backend (bfd) -> nlm_read_import)
-#define nlm_write_import_func(bfd)	   (nlm_backend (bfd) -> nlm_write_import)
-#define nlm_set_public_section_func(bfd)   (nlm_backend (bfd) -> nlm_set_public_section)
-#define nlm_get_public_offset_func(bfd)	   (nlm_backend (bfd) -> nlm_get_public_offset)
-#define nlm_swap_fixed_header_in_func(bfd) (nlm_backend (bfd) -> nlm_swap_fhdr_in)
-#define nlm_swap_fixed_header_out_func(bfd)(nlm_backend (bfd) -> nlm_swap_fhdr_out)
-#define nlm_write_external_func(bfd)	   (nlm_backend (bfd) -> nlm_write_external)
-#define nlm_write_export_func(bfd)	   (nlm_backend (bfd) -> nlm_write_export)
-
-/* The NLM code, data, and uninitialized sections have no names defined
-   in the NLM, but bfd wants to give them names, so use the traditional
-   UNIX names.  */
-
-#define NLM_CODE_NAME			".text"
-#define NLM_INITIALIZED_DATA_NAME	".data"
-#define NLM_UNINITIALIZED_DATA_NAME	".bss"
-
-#endif /* _LIBNLM_H_ */
diff --git a/bfd/nlm-target.h b/bfd/nlm-target.h
deleted file mode 100644
index a299843..0000000
--- a/bfd/nlm-target.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/* Target definitions for 32/64-bit NLM (NetWare Loadable Module)
-   Copyright (C) 1993-2018 Free Software Foundation, Inc.
-
-   This file is part of BFD, the Binary File Descriptor library.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-   MA 02110-1301, USA.  */
-
-#define nlm_core_file_p _bfd_dummy_target
-
-#define nlm_get_symtab_upper_bound		nlmNAME (get_symtab_upper_bound)
-#define nlm_canonicalize_symtab			nlmNAME (canonicalize_symtab)
-#define nlm_make_empty_symbol			nlmNAME (make_empty_symbol)
-#define nlm_print_symbol			nlmNAME (print_symbol)
-#define nlm_get_symbol_info			nlmNAME (get_symbol_info)
-#define nlm_get_symbol_version_string		_bfd_nosymbols_get_symbol_version_string
-#define nlm_bfd_is_local_label_name		bfd_generic_is_local_label_name
-#define nlm_bfd_is_target_special_symbol	_bfd_bool_bfd_asymbol_false
-#define nlm_get_lineno				_bfd_nosymbols_get_lineno
-#define nlm_find_nearest_line			_bfd_nosymbols_find_nearest_line
-#define nlm_find_line				_bfd_nosymbols_find_line
-#define nlm_find_inliner_info			_bfd_nosymbols_find_inliner_info
-#define nlm_bfd_make_debug_symbol		_bfd_nosymbols_bfd_make_debug_symbol
-#define nlm_read_minisymbols			_bfd_generic_read_minisymbols
-#define nlm_minisymbol_to_symbol		_bfd_generic_minisymbol_to_symbol
-
-#define nlm_get_reloc_upper_bound		nlmNAME (get_reloc_upper_bound)
-#define nlm_canonicalize_reloc			nlmNAME (canonicalize_reloc)
-#define nlm_set_reloc				_bfd_generic_set_reloc
-#define nlm_bfd_reloc_type_lookup		bfd_default_reloc_type_lookup
-#define nlm_bfd_reloc_name_lookup	  _bfd_norelocs_bfd_reloc_name_lookup
-#define nlm_set_section_contents		nlmNAME (set_section_contents)
-
-#define nlm_sizeof_headers			_bfd_nolink_sizeof_headers
-#define nlm_bfd_get_relocated_section_contents	bfd_generic_get_relocated_section_contents
-#define nlm_bfd_relax_section			bfd_generic_relax_section
-#define nlm_bfd_gc_sections			bfd_generic_gc_sections
-#define nlm_bfd_lookup_section_flags		bfd_generic_lookup_section_flags
-#define nlm_bfd_merge_sections			bfd_generic_merge_sections
-#define nlm_bfd_is_group_section		bfd_generic_is_group_section
-#define nlm_bfd_discard_group			bfd_generic_discard_group
-#define nlm_section_already_linked		_bfd_generic_section_already_linked
-#define nlm_bfd_define_common_symbol		bfd_generic_define_common_symbol
-#define nlm_bfd_define_start_stop		bfd_generic_define_start_stop
-#define nlm_bfd_link_hash_table_create		_bfd_generic_link_hash_table_create
-#define nlm_bfd_link_add_symbols		_bfd_generic_link_add_symbols
-#define nlm_bfd_link_just_syms			_bfd_generic_link_just_syms
-#define nlm_bfd_copy_link_hash_symbol_type \
-  _bfd_generic_copy_link_hash_symbol_type
-#define nlm_bfd_final_link			_bfd_generic_final_link
-#define nlm_bfd_link_split_section		_bfd_generic_link_split_section
-#define nlm_bfd_link_check_relocs		_bfd_generic_link_check_relocs
-
-/* This structure contains everything that BFD knows about a target.
-   It includes things like its byte order, name, what routines to call
-   to do various operations, etc.  Every BFD points to a target structure
-   with its "xvec" member.
-
-   There are two such structures here:  one for big-endian machines and
-   one for little-endian machines.   */
-
-/* Forward declaration for use when initialising alternative_target field.  */
-#ifdef TARGET_LITTLE_SYM
-extern const bfd_target TARGET_LITTLE_SYM;
-#endif
-
-#ifdef TARGET_BIG_SYM
-const bfd_target TARGET_BIG_SYM =
-{
-  /* Name: identify kind of target.  */
-  TARGET_BIG_NAME,
-
-  /* Flavour: general indication about file.  */
-  bfd_target_nlm_flavour,
-
-  /* Byteorder: data is big endian.  */
-  BFD_ENDIAN_BIG,
-
-  /* Header_byteorder: header is also big endian.  */
-  BFD_ENDIAN_BIG,
-
-  /* Object_flags: mask of all file flags.  */
-  (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
-   | WP_TEXT),
-
-  /* Section_flags: mask of all section flags.  */
-  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
-   | SEC_CODE | SEC_DATA),
-
-   /* Leading_symbol_char: is the first char of a user symbol
-      predictable, and if so what is it.  */
-   0,
-
-  /* AR_pad_char: pad character for filenames within an archive header
-     FIXME:  this really has nothing to do with NLM, this is a characteristic
-     of the archiver and/or os and should be independently tunable.  */
-  '/',
-
-  /* AR_max_namelen: maximum number of characters in an archive header
-     FIXME:  this really has nothing to do with NLM, this is a characteristic
-     of the archiver and should be independently tunable.  This value is
-     a WAG (wild a** guess).  */
-  15,
-  0,				/* match priority.  */
-
-  /* Routines to byte-swap various sized integers from the data sections.  */
-  bfd_getb64, bfd_getb_signed_64, bfd_putb64,
-  bfd_getb32, bfd_getb_signed_32, bfd_putb32,
-  bfd_getb16, bfd_getb_signed_16, bfd_putb16,
-
-  /* Routines to byte-swap various sized integers from the file headers.  */
-  bfd_getb64, bfd_getb_signed_64, bfd_putb64,
-  bfd_getb32, bfd_getb_signed_32, bfd_putb32,
-  bfd_getb16, bfd_getb_signed_16, bfd_putb16,
-
-  /* bfd_check_format: check the format of a file being read.  */
-  { _bfd_dummy_target,		/* Unknown format.  */
-    nlmNAME (object_p),		/* Assembler/linker output (object file).  */
-    bfd_generic_archive_p,	/* An archive.  */
-    nlm_core_file_p		/* A core file.  */
-  },
-
-  /* bfd_set_format: set the format of a file being written.  */
-  { _bfd_bool_bfd_false_error,
-    nlm_mkobject,
-    _bfd_generic_mkarchive,
-    _bfd_bool_bfd_false_error
-  },
-
-  /* bfd_write_contents: write cached information into a file being written.  */
-  { _bfd_bool_bfd_false_error,
-    nlmNAME (write_object_contents),
-    _bfd_write_archive_contents,
-    _bfd_bool_bfd_false_error
-  },
-
-  /* Initialize a jump table with the standard macro.
-     All names start with "nlm".  */
-  BFD_JUMP_TABLE_GENERIC (_bfd_generic),
-  BFD_JUMP_TABLE_COPY (_bfd_generic),
-  BFD_JUMP_TABLE_CORE (_bfd_nocore),
-  BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
-  BFD_JUMP_TABLE_SYMBOLS (nlm),
-  BFD_JUMP_TABLE_RELOCS (nlm),
-  BFD_JUMP_TABLE_WRITE (nlm),
-  BFD_JUMP_TABLE_LINK (nlm),
-  BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
-  /* Alternative endian target.  */
-#ifdef TARGET_LITTLE_SYM
-  & TARGET_LITTLE_SYM,
-#else
-  NULL,
-#endif
-
-  /* Backend_data.  */
-  (void *) TARGET_BACKEND_DATA
-};
-#endif
-
-#ifdef TARGET_LITTLE_SYM
-const bfd_target TARGET_LITTLE_SYM =
-{
-  /* Name: identify kind of target.  */
-  TARGET_LITTLE_NAME,
-
-  /* Flavour: general indication about file.  */
-  bfd_target_nlm_flavour,
-
-  /* Byteorder: data is little endian.  */
-  BFD_ENDIAN_LITTLE,
-
-  /* Header_byteorder: header is also little endian.  */
-  BFD_ENDIAN_LITTLE,
-
-  /* Object_flags: mask of all file flags.  */
-  (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
-   | WP_TEXT),
-
-  /* Section_flags: mask of all section flags.  */
-  (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
-   | SEC_DATA),
-
-   /* Leading_symbol_char: is the first char of a user symbol
-      predictable, and if so what is it.  */
-   0,
-
-  /* AR_pad_char: pad character for filenames within an archive header
-     FIXME:  this really has nothing to do with NLM, this is a characteristic
-     of the archiver and/or os and should be independently tunable.  */
-  '/',
-
-  /* AR_max_namelen: maximum number of characters in an archive header
-     FIXME:  this really has nothing to do with NLM, this is a characteristic
-     of the archiver and should be independently tunable.  This value is
-     a WAG (wild a** guess).  */
-  15,
-  0,				/* match priority.  */
-
-  /* Routines to byte-swap various sized integers from the data sections.  */
-  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
-  bfd_getl32, bfd_getl_signed_32, bfd_putl32,
-  bfd_getl16, bfd_getl_signed_16, bfd_putl16,
-
-  /* Routines to byte-swap various sized integers from the file headers.  */
-  bfd_getl64, bfd_getl_signed_64, bfd_putl64,
-  bfd_getl32, bfd_getl_signed_32, bfd_putl32,
-  bfd_getl16, bfd_getl_signed_16, bfd_putl16,
-
-  /* bfd_check_format: check the format of a file being read.  */
-  { _bfd_dummy_target,		/* Unknown format.  */
-    nlmNAME(object_p),		/* Assembler/linker output (object file).  */
-    bfd_generic_archive_p,	/* An archive.  */
-    nlm_core_file_p		/* A core file.  */
-  },
-
-  /* bfd_set_format: set the format of a file being written.  */
-  { _bfd_bool_bfd_false_error,
-    nlm_mkobject,
-    _bfd_generic_mkarchive,
-    _bfd_bool_bfd_false_error
-  },
-
-  /* bfd_write_contents: write cached information into a file being written.  */
-  { _bfd_bool_bfd_false_error,
-    nlmNAME(write_object_contents),
-    _bfd_write_archive_contents,
-    _bfd_bool_bfd_false_error
-  },
-
-  /* Initialize a jump table with the standard macro.
-     All names start with "nlm".  */
-  BFD_JUMP_TABLE_GENERIC (_bfd_generic),
-  BFD_JUMP_TABLE_COPY (_bfd_generic),
-  BFD_JUMP_TABLE_CORE (_bfd_nocore),
-  BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
-  BFD_JUMP_TABLE_SYMBOLS (nlm),
-  BFD_JUMP_TABLE_RELOCS (nlm),
-  BFD_JUMP_TABLE_WRITE (nlm),
-  BFD_JUMP_TABLE_LINK (nlm),
-  BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
-  /* Alternative endian target.  */
-#ifdef TARGET_BIG_SYM
-  & TARGET_BIG_SYM,
-#else
-  NULL,
-#endif
-
-  /* Backend_data.  */
-  (void *) TARGET_BACKEND_DATA
-};
-#endif
diff --git a/bfd/nlm.c b/bfd/nlm.c
deleted file mode 100644
index 828a474..0000000
--- a/bfd/nlm.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* NLM (NetWare Loadable Module) executable support for BFD.
-   Copyright (C) 1993-2018 Free Software Foundation, Inc.
-
-   This file is part of BFD, the Binary File Descriptor library.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-   MA 02110-1301, USA.  */
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "libbfd.h"
-#include "libnlm.h"
-
-/* Make an NLM object.  We just need to allocate the backend
-   information.  */
-
-bfd_boolean
-nlm_mkobject (bfd * abfd)
-{
-  bfd_size_type amt = sizeof (struct nlm_obj_tdata);
-
-  nlm_tdata (abfd) = bfd_zalloc (abfd, amt);
-  if (nlm_tdata (abfd) == NULL)
-    return FALSE;
-
-  if (nlm_architecture (abfd) != bfd_arch_unknown)
-    bfd_default_set_arch_mach (abfd, nlm_architecture (abfd),
-			       nlm_machine (abfd));
-
-  /* Since everything is done at close time, do we need any initialization ?  */
-  return TRUE;
-}
-
-/* Set the architecture and machine for an NLM object.  */
-
-bfd_boolean
-nlm_set_arch_mach (bfd * abfd,
-		   enum bfd_architecture arch,
-		   unsigned long machine)
-{
-  bfd_default_set_arch_mach (abfd, arch, machine);
-  return arch == nlm_architecture (abfd);
-}
diff --git a/bfd/nlm32-alpha.c b/bfd/nlm32-alpha.c
deleted file mode 100644
index 05e36b0..0000000
--- a/bfd/nlm32-alpha.c
+++ /dev/null
@@ -1,859 +0,0 @@
-/* Support for 32-bit Alpha NLM (NetWare Loadable Module)
-   Copyright (C) 1993-2018 Free Software Foundation, Inc.
-   Written by Ian Lance Taylor, Cygnus Support.
-
-   This file is part of BFD, the Binary File Descriptor library.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-   MA 02110-1301, USA.  */
-
-
-/* This file describes the 32 bit Alpha NLM format.  You might think
-   that an Alpha chip would use a 64 bit format, but, for some reason,
-   it doesn't.  */
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "libbfd.h"
-
-#define ARCH_SIZE 32
-
-#include "nlm/alpha-ext.h"
-#define Nlm_External_Fixed_Header	Nlm32_alpha_External_Fixed_Header
-
-#include "libnlm.h"
-
-/* Alpha NLM's have a prefix header before the standard NLM.  This
-   function reads it in, verifies the version, and seeks the bfd to
-   the location before the regular NLM header.  */
-
-static bfd_boolean
-nlm_alpha_backend_object_p (bfd *abfd)
-{
-  struct nlm32_alpha_external_prefix_header s;
-  file_ptr size;
-
-  if (bfd_bread (&s, (bfd_size_type) sizeof s, abfd) != sizeof s)
-    return FALSE;
-
-  if (H_GET_32 (abfd, s.magic) != NLM32_ALPHA_MAGIC)
-    return FALSE;
-
-  /* FIXME: Should we check the format number?  */
-
-  /* Skip to the end of the header.  */
-  size = H_GET_32 (abfd, s.size);
-  if (bfd_seek (abfd, size, SEEK_SET) != 0)
-    return FALSE;
-
-  return TRUE;
-}
-
-/* Write out the prefix.  */
-
-static bfd_boolean
-nlm_alpha_write_prefix (bfd *abfd)
-{
-  struct nlm32_alpha_external_prefix_header s;
-
-  memset (&s, 0, sizeof s);
-  H_PUT_32 (abfd, NLM32_ALPHA_MAGIC, s.magic);
-  H_PUT_32 (abfd, 2, s.format);
-  H_PUT_32 (abfd, sizeof s, s.size);
-  if (bfd_bwrite (&s, (bfd_size_type) sizeof s, abfd) != sizeof s)
-    return FALSE;
-  return TRUE;
-}
-
-#define ONES(n) (((bfd_vma) 1 << ((n) - 1) << 1) - 1)
-
-/* How to process the various reloc types.  */
-
-static reloc_howto_type nlm32_alpha_howto_table[] =
-{
-  /* Reloc type 0 is ignored by itself.  However, it appears after a
-     GPDISP reloc to identify the location where the low order 16 bits
-     of the gp register are loaded.  */
-  HOWTO (ALPHA_R_IGNORE,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 0,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 8,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_dont, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "IGNORE",		/* Name.  */
-	 FALSE,			/* Partial_inplace.  */
-	 0,			/* Source mask.  */
-	 0,			/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* A 32 bit reference to a symbol.  */
-  HOWTO (ALPHA_R_REFLONG,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "REFLONG",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* A 64 bit reference to a symbol.  */
-  HOWTO (ALPHA_R_REFQUAD,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 4,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 64,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "REFQUAD",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 ONES (64),		/* Source mask.  */
-	 ONES (64),		/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* A 32 bit GP relative offset.  This is just like REFLONG except
-     that when the value is used the value of the gp register will be
-     added in.  */
-  HOWTO (ALPHA_R_GPREL32,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "GPREL32",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* Used for an instruction that refers to memory off the GP
-     register.  The offset is 16 bits of the 32 bit instruction.  This
-     reloc always seems to be against the .lita section.  */
-  HOWTO (ALPHA_R_LITERAL,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "LITERAL",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* This reloc only appears immediately following a LITERAL reloc.
-     It identifies a use of the literal.  It seems that the linker can
-     use this to eliminate a portion of the .lita section.  The symbol
-     index is special: 1 means the literal address is in the base
-     register of a memory format instruction; 2 means the literal
-     address is in the byte offset register of a byte-manipulation
-     instruction; 3 means the literal address is in the target
-     register of a jsr instruction.  This does not actually do any
-     relocation.  */
-  HOWTO (ALPHA_R_LITUSE,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_dont, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "LITUSE",		/* Name.  */
-	 FALSE,			/* Partial_inplace.  */
-	 0,			/* Source mask.  */
-	 0,			/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* Load the gp register.  This is always used for a ldah instruction
-     which loads the upper 16 bits of the gp register.  The next reloc
-     will be an IGNORE reloc which identifies the location of the lda
-     instruction which loads the lower 16 bits.  The symbol index of
-     the GPDISP instruction appears to actually be the number of bytes
-     between the ldah and lda instructions.  This gives two different
-     ways to determine where the lda instruction is; I don't know why
-     both are used.  The value to use for the relocation is the
-     difference between the GP value and the current location; the
-     load will always be done against a register holding the current
-     address.  */
-  HOWTO (ALPHA_R_GPDISP,	/* Type.  */
-	 16,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 TRUE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_dont, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "GPDISP",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 TRUE),			/* PCrel_offset.  */
-
-  /* A 21 bit branch.  The native assembler generates these for
-     branches within the text segment, and also fills in the PC
-     relative offset in the instruction.  It seems to me that this
-     reloc, unlike the others, is not partial_inplace.  */
-  HOWTO (ALPHA_R_BRADDR,	/* Type.  */
-	 2,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 21,			/* Bitsize.  */
-	 TRUE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "BRADDR",		/* Name.  */
-	 FALSE,			/* Partial_inplace.  */
-	 0,			/* Source mask.  */
-	 0x1fffff,		/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* A hint for a jump to a register.  */
-  HOWTO (ALPHA_R_HINT,		/* Type.  */
-	 2,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 14,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_dont, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "HINT",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0x3fff,		/* Source mask.  */
-	 0x3fff,		/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* 16 bit PC relative offset.  */
-  HOWTO (ALPHA_R_SREL16,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 1,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 TRUE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "SREL16",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* 32 bit PC relative offset.  */
-  HOWTO (ALPHA_R_SREL32,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 TRUE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "SREL32",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* A 64 bit PC relative offset.  */
-  HOWTO (ALPHA_R_SREL64,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 4,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 64,			/* Bitsize.  */
-	 TRUE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "SREL64",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 ONES (64),		/* Source mask.  */
-	 ONES (64),		/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* Push a value on the reloc evaluation stack.  */
-  HOWTO (ALPHA_R_OP_PUSH,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 0,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 0,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_dont, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "OP_PUSH",		/* Name.  */
-	 FALSE,			/* Partial_inplace.  */
-	 0,			/* Source mask.  */
-	 0,			/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* Store the value from the stack at the given address.  Store it in
-     a bitfield of size r_size starting at bit position r_offset.  */
-  HOWTO (ALPHA_R_OP_STORE,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 4,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 64,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_dont, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "OP_STORE",		/* Name.  */
-	 FALSE,			/* Partial_inplace.  */
-	 0,			/* Source mask.  */
-	 ONES (64),		/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* Subtract the reloc address from the value on the top of the
-     relocation stack.  */
-  HOWTO (ALPHA_R_OP_PSUB,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 0,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 0,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_dont, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "OP_PSUB",		/* Name.  */
-	 FALSE,			/* Partial_inplace.  */
-	 0,			/* Source mask.  */
-	 0,			/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* Shift the value on the top of the relocation stack right by the
-     given value.  */
-  HOWTO (ALPHA_R_OP_PRSHIFT,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 0,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 0,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_dont, /* Complain_on_overflow.  */
-	 0,			 /* Special_function.  */
-	 "OP_PRSHIFT",		/* Name.  */
-	 FALSE,			/* Partial_inplace.  */
-	 0,			/* Source mask.  */
-	 0,			/* Dest mask.  */
-	 FALSE),		/* PCrel_offset.  */
-
-  /* Adjust the GP value for a new range in the object file.  */
-  HOWTO (ALPHA_R_GPVALUE,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 0,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 0,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_dont, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "GPVALUE",		/* Name.  */
-	 FALSE,			/* Partial_inplace.  */
-	 0,			/* Source mask.  */
-	 0,			/* Dest mask.  */
-	 FALSE)			/* PCrel_offset.  */
-};
-
-static reloc_howto_type nlm32_alpha_nw_howto =
-  HOWTO (ALPHA_R_NW_RELOC,	/* Type.  */
-	 0,			/* Rightshift.  */
-	 0,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 0,			/* Bitsize.  */
-	 FALSE,			/* PC_relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_dont, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "NW_RELOC",		/* Name.  */
-	 FALSE,			/* Partial_inplace.  */
-	 0,			/* Source mask.  */
-	 0,			/* Dest mask.  */
-	 FALSE);		/* PCrel_offset.  */
-
-/* Read an Alpha NLM reloc.  This routine keeps some static data which
-   it uses when handling local relocs.  This only works correctly
-   because all the local relocs are read at once.  */
-
-static bfd_boolean
-nlm_alpha_read_reloc (bfd *abfd,
-		      nlmNAME (symbol_type) *sym,
-		      asection **secp,
-		      arelent *rel)
-{
-  static bfd_vma gp_value;
-  static bfd_vma lita_address;
-  struct nlm32_alpha_external_reloc ext;
-  bfd_vma r_vaddr;
-  long r_symndx;
-  int r_type, r_extern, r_offset, r_size;
-  asection *code_sec, *data_sec;
-
-  /* Read the reloc from the file.  */
-  if (bfd_bread (&ext, (bfd_size_type) sizeof ext, abfd) != sizeof ext)
-    return FALSE;
-
-  /* Swap in the reloc information.  */
-  r_vaddr = H_GET_64 (abfd, ext.r_vaddr);
-  r_symndx = H_GET_32 (abfd, ext.r_symndx);
-
-  BFD_ASSERT (bfd_little_endian (abfd));
-
-  r_type = ((ext.r_bits[0] & RELOC_BITS0_TYPE_LITTLE)
-	    >> RELOC_BITS0_TYPE_SH_LITTLE);
-  r_extern = (ext.r_bits[1] & RELOC_BITS1_EXTERN_LITTLE) != 0;
-  r_offset = ((ext.r_bits[1] & RELOC_BITS1_OFFSET_LITTLE)
-	      >> RELOC_BITS1_OFFSET_SH_LITTLE);
-  /* Ignore the reserved bits.  */
-  r_size = ((ext.r_bits[3] & RELOC_BITS3_SIZE_LITTLE)
-	    >> RELOC_BITS3_SIZE_SH_LITTLE);
-
-  /* Fill in the BFD arelent structure.  */
-  code_sec = bfd_get_section_by_name (abfd, NLM_CODE_NAME);
-  data_sec = bfd_get_section_by_name (abfd, NLM_INITIALIZED_DATA_NAME);
-  if (r_extern)
-    {
-      /* External relocations are only used for imports.  */
-      BFD_ASSERT (sym != NULL);
-      /* We don't need to set sym_ptr_ptr for this case.  It is set in
-	 nlm_canonicalize_reloc.  */
-      rel->sym_ptr_ptr = NULL;
-      rel->addend = 0;
-    }
-  else
-    {
-      /* Internal relocations are only used for local relocation
-	 fixups.  If they are not NW_RELOC or GPDISP or IGNORE, they
-	 must be against .text or .data.  */
-      BFD_ASSERT (r_type == ALPHA_R_NW_RELOC || sym == NULL);
-      if (r_type == ALPHA_R_NW_RELOC
-	  || r_type == ALPHA_R_GPDISP
-	  || r_type == ALPHA_R_IGNORE)
-	{
-	  rel->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
-	  rel->addend = 0;
-	}
-      else if (r_symndx == ALPHA_RELOC_SECTION_TEXT)
-	{
-	  rel->sym_ptr_ptr = code_sec->symbol_ptr_ptr;
-	  BFD_ASSERT (bfd_get_section_vma (abfd, code_sec) == 0);
-	  rel->addend = 0;
-	}
-      else if (r_symndx == ALPHA_RELOC_SECTION_DATA)
-	{
-	  rel->sym_ptr_ptr = data_sec->symbol_ptr_ptr;
-	  rel->addend = - bfd_get_section_vma (abfd, data_sec);
-	}
-      else
-	{
-	  BFD_ASSERT (0);
-	  rel->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
-	  rel->addend = 0;
-	}
-    }
-
-  /* We use the address to determine whether the reloc is in the .text
-     or .data section.  R_NW_RELOC relocs don't really have a section,
-     so we put them in .text.  */
-  if (r_type == ALPHA_R_NW_RELOC
-      || r_vaddr < code_sec->size)
-    {
-      *secp = code_sec;
-      rel->address = r_vaddr;
-    }
-  else
-    {
-      *secp = data_sec;
-      rel->address = r_vaddr - code_sec->size;
-    }
-
-  /* We must adjust the addend based on the type.  */
-  BFD_ASSERT ((r_type >= 0 && r_type <= ALPHA_R_GPVALUE)
-	      || r_type == ALPHA_R_NW_RELOC);
-
-  switch (r_type)
-    {
-    case ALPHA_R_BRADDR:
-    case ALPHA_R_SREL16:
-    case ALPHA_R_SREL32:
-    case ALPHA_R_SREL64:
-      /* The PC relative relocs do not seem to use the section VMA as
-	 a negative addend.  */
-      rel->addend = 0;
-      break;
-
-    case ALPHA_R_GPREL32:
-      /* Copy the gp value for this object file into the addend, to
-	 ensure that we are not confused by the linker.  */
-      if (! r_extern)
-	rel->addend += gp_value;
-      break;
-
-    case ALPHA_R_LITERAL:
-      BFD_ASSERT (! r_extern);
-      rel->addend += lita_address;
-      break;
-
-    case ALPHA_R_LITUSE:
-    case ALPHA_R_GPDISP:
-      /* The LITUSE and GPDISP relocs do not use a symbol, or an
-	 addend, but they do use a special code.  Put this code in the
-	 addend field.  */
-      rel->addend = r_symndx;
-      rel->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
-      break;
-
-    case ALPHA_R_OP_STORE:
-      /* The STORE reloc needs the size and offset fields.  We store
-	 them in the addend.  */
-      BFD_ASSERT (r_offset < 256 && r_size < 256);
-      rel->addend = (r_offset << 8) + r_size;
-      break;
-
-    case ALPHA_R_OP_PUSH:
-    case ALPHA_R_OP_PSUB:
-    case ALPHA_R_OP_PRSHIFT:
-      /* The PUSH, PSUB and PRSHIFT relocs do not actually use an
-	 address.  I believe that the address supplied is really an
-	 addend.  */
-      rel->addend = r_vaddr;
-      break;
-
-    case ALPHA_R_GPVALUE:
-      /* Record the new gp value.  */
-      gp_value += r_symndx;
-      rel->addend = gp_value;
-      break;
-
-    case ALPHA_R_IGNORE:
-      /* If the type is ALPHA_R_IGNORE, make sure this is a reference
-	 to the absolute section so that the reloc is ignored.  For
-	 some reason the address of this reloc type is not adjusted by
-	 the section vma.  We record the gp value for this object file
-	 here, for convenience when doing the GPDISP relocation.  */
-      rel->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
-      rel->address = r_vaddr;
-      rel->addend = gp_value;
-      break;
-
-    case ALPHA_R_NW_RELOC:
-      /* If this is SETGP, we set the addend to 0.  Otherwise we set
-	 the addend to the size of the .lita section (this is
-	 r_symndx) plus 1.  We have already set the address of the
-	 reloc to r_vaddr.  */
-      if (r_size == ALPHA_R_NW_RELOC_SETGP)
-	{
-	  gp_value = r_vaddr;
-	  rel->addend = 0;
-	}
-      else if (r_size == ALPHA_R_NW_RELOC_LITA)
-	{
-	  lita_address = r_vaddr;
-	  rel->addend = r_symndx + 1;
-	}
-      else
-	BFD_ASSERT (0);
-      rel->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
-      break;
-
-    default:
-      break;
-    }
-
-  if (r_type == ALPHA_R_NW_RELOC)
-    rel->howto = &nlm32_alpha_nw_howto;
-  else
-    rel->howto = &nlm32_alpha_howto_table[r_type];
-
-  return TRUE;
-}
-
-/* Mangle Alpha NLM relocs for output.  */
-
-static bfd_boolean
-nlm_alpha_mangle_relocs (bfd *abfd ATTRIBUTE_UNUSED,
-			 asection *sec ATTRIBUTE_UNUSED,
-			 const void * data ATTRIBUTE_UNUSED,
-			 bfd_vma offset ATTRIBUTE_UNUSED,
-			 bfd_size_type count ATTRIBUTE_UNUSED)
-{
-  return TRUE;
-}
-
-/* Read an ALPHA NLM import record.  */
-
-static bfd_boolean
-nlm_alpha_read_import (bfd *abfd, nlmNAME (symbol_type) * sym)
-{
-  struct nlm_relent *nlm_relocs;	/* Relocation records for symbol.  */
-  bfd_size_type rcount;			/* Number of relocs.  */
-  bfd_byte temp[NLM_TARGET_LONG_SIZE];	/* Temporary 32-bit value.  */
-  unsigned char symlength;		/* Length of symbol name.  */
-  char *name;
-  bfd_size_type amt;
-
-  if (bfd_bread (& symlength, (bfd_size_type) sizeof (symlength), abfd)
-      != sizeof (symlength))
-    return FALSE;
-  sym -> symbol.the_bfd = abfd;
-  name = bfd_alloc (abfd, (bfd_size_type) symlength + 1);
-  if (name == NULL)
-    return FALSE;
-  if (bfd_bread (name, (bfd_size_type) symlength, abfd) != symlength)
-    return FALSE;
-  name[symlength] = '\0';
-  sym -> symbol.name = name;
-  sym -> symbol.flags = 0;
-  sym -> symbol.value = 0;
-  sym -> symbol.section = bfd_und_section_ptr;
-  if (bfd_bread (temp, (bfd_size_type) sizeof (temp), abfd)
-      != sizeof (temp))
-    return FALSE;
-  rcount = H_GET_32 (abfd, temp);
-  amt = rcount * sizeof (struct nlm_relent);
-  nlm_relocs = bfd_alloc (abfd, amt);
-  if (!nlm_relocs)
-    return FALSE;
-  sym -> relocs = nlm_relocs;
-  sym -> rcnt = 0;
-  while (sym -> rcnt < rcount)
-    {
-      asection *section;
-
-      if (! nlm_alpha_read_reloc (abfd, sym, &section, &nlm_relocs -> reloc))
-	return FALSE;
-      nlm_relocs -> section = section;
-      nlm_relocs++;
-      sym -> rcnt++;
-    }
-
-  return TRUE;
-}
-
-/* Write an Alpha NLM reloc.  */
-
-static bfd_boolean
-nlm_alpha_write_import (bfd * abfd, asection * sec, arelent * rel)
-{
-  asymbol *sym;
-  bfd_vma r_vaddr;
-  long r_symndx;
-  int r_type, r_extern, r_offset, r_size;
-  struct nlm32_alpha_external_reloc ext;
-
-  sym = *rel->sym_ptr_ptr;
-
-  /* Get values for the relocation fields.  */
-  r_type = rel->howto->type;
-  if (r_type != ALPHA_R_NW_RELOC)
-    {
-      r_vaddr = bfd_get_section_vma (abfd, sec) + rel->address;
-      if ((sec->flags & SEC_CODE) == 0)
-	r_vaddr += bfd_get_section_by_name (abfd, NLM_CODE_NAME) -> size;
-      if (bfd_is_und_section (bfd_get_section (sym)))
-	{
-	  r_extern = 1;
-	  r_symndx = 0;
-	}
-      else
-	{
-	  r_extern = 0;
-	  if (bfd_get_section_flags (abfd, bfd_get_section (sym)) & SEC_CODE)
-	    r_symndx = ALPHA_RELOC_SECTION_TEXT;
-	  else
-	    r_symndx = ALPHA_RELOC_SECTION_DATA;
-	}
-      r_offset = 0;
-      r_size = 0;
-
-      switch (r_type)
-	{
-	case ALPHA_R_LITUSE:
-	case ALPHA_R_GPDISP:
-	  r_symndx = rel->addend;
-	  break;
-
-	case ALPHA_R_OP_STORE:
-	  r_size = rel->addend & 0xff;
-	  r_offset = (rel->addend >> 8) & 0xff;
-	  break;
-
-	case ALPHA_R_OP_PUSH:
-	case ALPHA_R_OP_PSUB:
-	case ALPHA_R_OP_PRSHIFT:
-	  r_vaddr = rel->addend;
-	  break;
-
-	case ALPHA_R_IGNORE:
-	  r_vaddr = rel->address;
-	  break;
-
-	default:
-	  break;
-	}
-    }
-  else
-    {
-      /* r_type == ALPHA_R_NW_RELOC.  */
-      r_vaddr = rel->address;
-      if (rel->addend == 0)
-	{
-	  r_symndx = 0;
-	  r_size = ALPHA_R_NW_RELOC_SETGP;
-	}
-      else
-	{
-	  r_symndx = rel->addend - 1;
-	  r_size = ALPHA_R_NW_RELOC_LITA;
-	}
-      r_extern = 0;
-      r_offset = 0;
-    }
-
-  /* Swap out the relocation fields.  */
-  H_PUT_64 (abfd, r_vaddr, ext.r_vaddr);
-  H_PUT_32 (abfd, r_symndx, ext.r_symndx);
-
-  BFD_ASSERT (bfd_little_endian (abfd));
-
-  ext.r_bits[0] = ((r_type << RELOC_BITS0_TYPE_SH_LITTLE)
-		   & RELOC_BITS0_TYPE_LITTLE);
-  ext.r_bits[1] = ((r_extern ? RELOC_BITS1_EXTERN_LITTLE : 0)
-		   | ((r_offset << RELOC_BITS1_OFFSET_SH_LITTLE)
-		      & RELOC_BITS1_OFFSET_LITTLE));
-  ext.r_bits[2] = 0;
-  ext.r_bits[3] = ((r_size << RELOC_BITS3_SIZE_SH_LITTLE)
-		   & RELOC_BITS3_SIZE_LITTLE);
-
-  /* Write out the relocation.  */
-  if (bfd_bwrite (&ext, (bfd_size_type) sizeof ext, abfd) != sizeof ext)
-    return FALSE;
-
-  return TRUE;
-}
-
-/* Alpha NetWare does not use the high bit to determine whether a
-   public symbol is in the code segment or the data segment.  Instead,
-   it just uses the address.  The set_public_section and
-   get_public_offset routines override the default code which uses the
-   high bit.  */
-
-/* Set the section for a public symbol.  */
-
-static bfd_boolean
-nlm_alpha_set_public_section (bfd * abfd, nlmNAME (symbol_type) * sym)
-{
-  asection *code_sec, *data_sec;
-
-  code_sec = bfd_get_section_by_name (abfd, NLM_CODE_NAME);
-  data_sec = bfd_get_section_by_name (abfd, NLM_INITIALIZED_DATA_NAME);
-  if (sym->symbol.value < code_sec->size)
-    {
-      sym->symbol.section = code_sec;
-      sym->symbol.flags |= BSF_FUNCTION;
-    }
-  else
-    {
-      sym->symbol.section = data_sec;
-      sym->symbol.value -= code_sec->size;
-      /* The data segment had better be aligned.  */
-      BFD_ASSERT ((code_sec->size & 0xf) == 0);
-    }
-  return TRUE;
-}
-
-/* Get the offset to write out for a public symbol.  */
-
-static bfd_vma
-nlm_alpha_get_public_offset (bfd * abfd ATTRIBUTE_UNUSED, asymbol * sym)
-{
-  return bfd_asymbol_value (sym);
-}
-
-/* Write an Alpha NLM external symbol.  */
-
-static bfd_boolean
-nlm_alpha_write_external (bfd *abfd,
-			  bfd_size_type count,
-			  asymbol *sym,
-			  struct reloc_and_sec *relocs)
-{
-  bfd_size_type i;
-  bfd_byte len;
-  unsigned char temp[NLM_TARGET_LONG_SIZE];
-  arelent r;
-
-  len = strlen (sym->name);
-  if ((bfd_bwrite (&len, (bfd_size_type) sizeof (bfd_byte), abfd)
-       != sizeof (bfd_byte))
-      || bfd_bwrite (sym->name, (bfd_size_type) len, abfd) != len)
-    return FALSE;
-
-  bfd_put_32 (abfd, count + 2, temp);
-  if (bfd_bwrite (temp, (bfd_size_type) sizeof (temp), abfd) != sizeof (temp))
-    return FALSE;
-
-  /* The first two relocs for each external symbol are the .lita
-     address and the GP value.  */
-  r.sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
-  r.howto = &nlm32_alpha_nw_howto;
-
-  r.address = nlm_alpha_backend_data (abfd)->lita_address;
-  r.addend = nlm_alpha_backend_data (abfd)->lita_size + 1;
-  if (! nlm_alpha_write_import (abfd, NULL, &r))
-    return FALSE;
-
-  r.address = nlm_alpha_backend_data (abfd)->gp;
-  r.addend = 0;
-  if (! nlm_alpha_write_import (abfd, NULL, &r))
-    return FALSE;
-
-  for (i = 0; i < count; i++)
-    if (! nlm_alpha_write_import (abfd, relocs[i].sec, relocs[i].rel))
-      return FALSE;
-
-  return TRUE;
-}
-
-#include "nlmswap.h"
-
-static const struct nlm_backend_data nlm32_alpha_backend =
-{
-  "NetWare Alpha Module   \032",
-  sizeof (Nlm32_alpha_External_Fixed_Header),
-  sizeof (struct nlm32_alpha_external_prefix_header),
-  bfd_arch_alpha,
-  0,
-  TRUE, /* No uninitialized data permitted by Alpha NetWare.  */
-  nlm_alpha_backend_object_p,
-  nlm_alpha_write_prefix,
-  nlm_alpha_read_reloc,
-  nlm_alpha_mangle_relocs,
-  nlm_alpha_read_import,
-  nlm_alpha_write_import,
-  nlm_alpha_set_public_section,
-  nlm_alpha_get_public_offset,
-  nlm_swap_fixed_header_in,
-  nlm_swap_fixed_header_out,
-  nlm_alpha_write_external,
-  0,	/* Write_export.  */
-};
-
-#define TARGET_LITTLE_NAME		"nlm32-alpha"
-#define TARGET_LITTLE_SYM		alpha_nlm32_vec
-#define TARGET_BACKEND_DATA		& nlm32_alpha_backend
-
-#include "nlm-target.h"
diff --git a/bfd/nlm32-i386.c b/bfd/nlm32-i386.c
deleted file mode 100644
index b8de2b8..0000000
--- a/bfd/nlm32-i386.c
+++ /dev/null
@@ -1,429 +0,0 @@
-/* Support for 32-bit i386 NLM (NetWare Loadable Module)
-   Copyright (C) 1993-2018 Free Software Foundation, Inc.
-
-   This file is part of BFD, the Binary File Descriptor library.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-   MA 02110-1301, USA.  */
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "libbfd.h"
-
-#define ARCH_SIZE 32
-
-#include "nlm/i386-ext.h"
-#define Nlm_External_Fixed_Header	Nlm32_i386_External_Fixed_Header
-
-#include "libnlm.h"
-
-/* Adjust the reloc location by an absolute value.  */
-
-static reloc_howto_type nlm_i386_abs_howto =
-  HOWTO (0,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "32",			/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE);		/* PR rel_offset.  */
-
-/* Adjust the reloc location by a PC relative displacement.  */
-
-static reloc_howto_type nlm_i386_pcrel_howto =
-  HOWTO (1,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 TRUE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "DISP32",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 TRUE);			/* PR rel_offset.  */
-
-/* Read a NetWare i386 reloc.  */
-
-static bfd_boolean
-nlm_i386_read_reloc (bfd *abfd,
-		     nlmNAME (symbol_type) *sym,
-		     asection **secp,
-		     arelent *rel)
-{
-  bfd_byte temp[4];
-  bfd_vma val;
-  const char *name;
-
-  if (bfd_bread (temp, (bfd_size_type) sizeof (temp), abfd) != sizeof (temp))
-    return FALSE;
-
-  val = bfd_get_32 (abfd, temp);
-
-  /* The value is an offset into either the code or data segment.
-     This is the location which needs to be adjusted.
-
-     If this is a relocation fixup rather than an imported symbol (the
-     sym argument is NULL) then the high bit is 0 if the location
-     needs to be adjusted by the address of the data segment, or 1 if
-     the location needs to be adjusted by the address of the code
-     segment.  If this is an imported symbol, then the high bit is 0
-     if the location is 0 if the location should be adjusted by the
-     offset to the symbol, or 1 if the location should adjusted by the
-     absolute value of the symbol.
-
-     The second most significant bit is 0 if the value is an offset
-     into the data segment, or 1 if the value is an offset into the
-     code segment.
-
-     All this translates fairly easily into a BFD reloc.  */
-
-  if (sym == NULL)
-    {
-      if ((val & NLM_HIBIT) == 0)
-	name = NLM_INITIALIZED_DATA_NAME;
-      else
-	{
-	  name = NLM_CODE_NAME;
-	  val &=~ NLM_HIBIT;
-	}
-      rel->sym_ptr_ptr = bfd_get_section_by_name (abfd, name)->symbol_ptr_ptr;
-      rel->howto = &nlm_i386_abs_howto;
-    }
-  else
-    {
-      /* In this case we do not need to set the sym_ptr_ptr field.  */
-      rel->sym_ptr_ptr = NULL;
-      if ((val & NLM_HIBIT) == 0)
-	rel->howto = &nlm_i386_pcrel_howto;
-      else
-	{
-	  rel->howto = &nlm_i386_abs_howto;
-	  val &=~ NLM_HIBIT;
-	}
-    }
-
-  if ((val & (NLM_HIBIT >> 1)) == 0)
-    *secp = bfd_get_section_by_name (abfd, NLM_INITIALIZED_DATA_NAME);
-  else
-    {
-      *secp = bfd_get_section_by_name (abfd, NLM_CODE_NAME);
-      val &=~ (NLM_HIBIT >> 1);
-    }
-
-  rel->address = val;
-  rel->addend = 0;
-
-  return TRUE;
-}
-
-/* Write a NetWare i386 reloc.  */
-
-static bfd_boolean
-nlm_i386_write_import (bfd * abfd, asection * sec, arelent * rel)
-{
-  asymbol *sym;
-  bfd_vma val;
-  bfd_byte temp[4];
-
-  /* NetWare only supports two kinds of relocs.  We should check
-     special_function here, as well, but at the moment coff-i386
-     relocs uses a special_function which does not affect what we do
-     here.  */
-  if (rel->addend != 0
-      || rel->howto == NULL
-      || rel->howto->rightshift != 0
-      || rel->howto->size != 2
-      || rel->howto->bitsize != 32
-      || rel->howto->bitpos != 0
-      || rel->howto->src_mask != 0xffffffff
-      || rel->howto->dst_mask != 0xffffffff)
-    {
-      bfd_set_error (bfd_error_invalid_operation);
-      return FALSE;
-    }
-
-  sym = *rel->sym_ptr_ptr;
-
-  /* The value we write out is the offset into the appropriate
-     segment.  This offset is the section vma, adjusted by the vma of
-     the lowest section in that segment, plus the address of the
-     relocation.  */
-  val = bfd_get_section_vma (abfd, sec) + rel->address;
-
-  /* The second most significant bit is 0 if the value is an offset
-     into the data segment, or 1 if the value is an offset into the
-     code segment.  */
-  if (bfd_get_section_flags (abfd, sec) & SEC_CODE)
-    {
-      val -= nlm_get_text_low (abfd);
-      val |= NLM_HIBIT >> 1;
-    }
-  else
-    val -= nlm_get_data_low (abfd);
-
-  if (! bfd_is_und_section (bfd_get_section (sym)))
-    {
-      /* NetWare only supports absolute internal relocs.  */
-      if (rel->howto->pc_relative)
-	{
-	  bfd_set_error (bfd_error_invalid_operation);
-	  return FALSE;
-	}
-
-      /* The high bit is 1 if the reloc is against the code section, 0
-	 if against the data section.  */
-      if (bfd_get_section_flags (abfd, bfd_get_section (sym)) & SEC_CODE)
-	val |= NLM_HIBIT;
-    }
-  else
-    {
-      /* The high bit is 1 if this is an absolute reloc, 0 if it is PC
-	 relative.  */
-      if (! rel->howto->pc_relative)
-	val |= NLM_HIBIT;
-      else
-	{
-	  /* PC relative relocs on NetWare must be pcrel_offset.  */
-	  if (! rel->howto->pcrel_offset)
-	    {
-	      bfd_set_error (bfd_error_invalid_operation);
-	      return FALSE;
-	    }
-	}
-    }
-
-  bfd_put_32 (abfd, val, temp);
-  if (bfd_bwrite (temp, (bfd_size_type) sizeof (temp), abfd) != sizeof (temp))
-    return FALSE;
-
-  return TRUE;
-}
-
-/* I want to be able to use objcopy to turn an i386 a.out or COFF file
-   into a NetWare i386 module.  That means that the relocs from the
-   source file have to be mapped into relocs that apply to the target
-   file.  This function is called by nlm_set_section_contents to give
-   it a chance to rework the relocs.
-
-   This is actually a fairly general concept.  However, this is not a
-   general implementation.  */
-
-static bfd_boolean
-nlm_i386_mangle_relocs (bfd *abfd,
-			asection *sec,
-			const void * data,
-			bfd_vma offset,
-			bfd_size_type count)
-{
-  arelent **rel_ptr_ptr, **rel_end;
-
-  rel_ptr_ptr = sec->orelocation;
-  rel_end = rel_ptr_ptr + sec->reloc_count;
-  for (; rel_ptr_ptr < rel_end; rel_ptr_ptr++)
-    {
-      arelent *rel;
-      asymbol *sym;
-      bfd_vma addend;
-
-      rel = *rel_ptr_ptr;
-      sym = *rel->sym_ptr_ptr;
-
-      /* Note that no serious harm will ensue if we fail to change a
-	 reloc.  We will wind up failing in nlm_i386_write_import.  */
-
-      /* Make sure this reloc is within the data we have.  We only 4
-	 byte relocs here, so we insist on having 4 bytes.  */
-      if (rel->address < offset
-	  || rel->address + 4 > offset + count)
-	continue;
-
-      /* NetWare doesn't support reloc addends, so we get rid of them
-	 here by simply adding them into the object data.  We handle
-	 the symbol value, if any, the same way.  */
-      addend = rel->addend + sym->value;
-
-      /* The value of a symbol is the offset into the section.  If the
-	 symbol is in the .bss segment, we need to include the size of
-	 the data segment in the offset as well.  Fortunately, we know
-	 that at this point the size of the data section is in the NLM
-	 header.  */
-      if (((bfd_get_section_flags (abfd, bfd_get_section (sym))
-	    & SEC_LOAD) == 0)
-	  && ((bfd_get_section_flags (abfd, bfd_get_section (sym))
-	       & SEC_ALLOC) != 0))
-	addend += nlm_fixed_header (abfd)->dataImageSize;
-
-      if (addend != 0
-	  && rel->howto != NULL
-	  && rel->howto->rightshift == 0
-	  && rel->howto->size == 2
-	  && rel->howto->bitsize == 32
-	  && rel->howto->bitpos == 0
-	  && rel->howto->src_mask == 0xffffffff
-	  && rel->howto->dst_mask == 0xffffffff)
-	{
-	  bfd_vma val;
-
-	  val = bfd_get_32 (abfd, (bfd_byte *) data + rel->address - offset);
-	  val += addend;
-	  bfd_put_32 (abfd, val, (bfd_byte *) data + rel->address - offset);
-	  rel->addend = 0;
-	}
-
-      /* NetWare uses a reloc with pcrel_offset set.  We adjust
-	 pc_relative relocs accordingly.  We are going to change the
-	 howto field, so we can only do this if the current one is
-	 compatible.  We should check special_function here, but at
-	 the moment coff-i386 uses a special_function which does not
-	 affect what we are doing here.  */
-      if (rel->howto != NULL
-	  && rel->howto->pc_relative
-	  && ! rel->howto->pcrel_offset
-	  && rel->howto->rightshift == 0
-	  && rel->howto->size == 2
-	  && rel->howto->bitsize == 32
-	  && rel->howto->bitpos == 0
-	  && rel->howto->src_mask == 0xffffffff
-	  && rel->howto->dst_mask == 0xffffffff)
-	{
-	  bfd_vma val;
-
-	  /* When pcrel_offset is not set, it means that the negative
-	     of the address of the memory location is stored in the
-	     memory location.  We must add it back in.  */
-	  val = bfd_get_32 (abfd, (bfd_byte *) data + rel->address - offset);
-	  val += rel->address;
-	  bfd_put_32 (abfd, val, (bfd_byte *) data + rel->address - offset);
-
-	  rel->howto = &nlm_i386_pcrel_howto;
-	}
-    }
-
-  return TRUE;
-}
-
-/* Read a NetWare i386 import record.  */
-
-static bfd_boolean
-nlm_i386_read_import (bfd * abfd, nlmNAME (symbol_type) * sym)
-{
-  struct nlm_relent *nlm_relocs;	/* Relocation records for symbol.  */
-  bfd_size_type rcount;			/* Number of relocs.  */
-  bfd_byte temp[NLM_TARGET_LONG_SIZE];	/* Temporary 32-bit value.  */
-  unsigned char symlength;		/* Length of symbol name.  */
-  char *name;
-
-  if (bfd_bread (& symlength, (bfd_size_type) sizeof (symlength), abfd)
-      != sizeof (symlength))
-    return FALSE;
-  sym -> symbol.the_bfd = abfd;
-  name = bfd_alloc (abfd, (bfd_size_type) symlength + 1);
-  if (name == NULL)
-    return FALSE;
-  if (bfd_bread (name, (bfd_size_type) symlength, abfd) != symlength)
-    return FALSE;
-  name[symlength] = '\0';
-  sym -> symbol.name = name;
-  sym -> symbol.flags = 0;
-  sym -> symbol.value = 0;
-  sym -> symbol.section = bfd_und_section_ptr;
-  if (bfd_bread (temp, (bfd_size_type) sizeof (temp), abfd) != sizeof (temp))
-    return FALSE;
-  rcount = H_GET_32 (abfd, temp);
-  nlm_relocs = bfd_alloc (abfd, rcount * sizeof (struct nlm_relent));
-  if (!nlm_relocs)
-    return FALSE;
-  sym -> relocs = nlm_relocs;
-  sym -> rcnt = 0;
-  while (sym -> rcnt < rcount)
-    {
-      asection *section;
-
-      if (! nlm_i386_read_reloc (abfd, sym, &section, &nlm_relocs -> reloc))
-	return FALSE;
-      nlm_relocs -> section = section;
-      nlm_relocs++;
-      sym -> rcnt++;
-    }
-  return TRUE;
-}
-
-/* Write out an external reference.  */
-
-static bfd_boolean
-nlm_i386_write_external (bfd *abfd,
-			 bfd_size_type count,
-			 asymbol *sym,
-			 struct reloc_and_sec *relocs)
-{
-  unsigned int i;
-  bfd_byte len;
-  unsigned char temp[NLM_TARGET_LONG_SIZE];
-
-  len = strlen (sym->name);
-  if ((bfd_bwrite (&len, (bfd_size_type) sizeof (bfd_byte), abfd)
-       != sizeof (bfd_byte))
-      || bfd_bwrite (sym->name, (bfd_size_type) len, abfd) != len)
-    return FALSE;
-
-  bfd_put_32 (abfd, count, temp);
-  if (bfd_bwrite (temp, (bfd_size_type) sizeof (temp), abfd) != sizeof (temp))
-    return FALSE;
-
-  for (i = 0; i < count; i++)
-    if (! nlm_i386_write_import (abfd, relocs[i].sec, relocs[i].rel))
-      return FALSE;
-
-  return TRUE;
-}
-
-#include "nlmswap.h"
-
-static const struct nlm_backend_data nlm32_i386_backend =
-{
-  "NetWare Loadable Module\032",
-  sizeof (Nlm32_i386_External_Fixed_Header),
-  0,	/* Optional_prefix_size.  */
-  bfd_arch_i386,
-  0,
-  FALSE,
-  0,	/* Backend_object_p.  */
-  0,	/* Write_prefix_func.  */
-  nlm_i386_read_reloc,
-  nlm_i386_mangle_relocs,
-  nlm_i386_read_import,
-  nlm_i386_write_import,
-  0,	/* Set_public_section.  */
-  0,	/* Set_public_offset.  */
-  nlm_swap_fixed_header_in,
-  nlm_swap_fixed_header_out,
-  nlm_i386_write_external,
-  0,	/* Write_export.  */
-};
-
-#define TARGET_LITTLE_NAME		"nlm32-i386"
-#define TARGET_LITTLE_SYM		i386_nlm32_vec
-#define TARGET_BACKEND_DATA		& nlm32_i386_backend
-
-#include "nlm-target.h"
diff --git a/bfd/nlm32-ppc.c b/bfd/nlm32-ppc.c
deleted file mode 100644
index 3e3fdef..0000000
--- a/bfd/nlm32-ppc.c
+++ /dev/null
@@ -1,986 +0,0 @@
-/* Support for 32-bit PowerPC NLM (NetWare Loadable Module)
-   Copyright (C) 1994-2018 Free Software Foundation, Inc.
-
-   This file is part of BFD, the Binary File Descriptor library.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-   MA 02110-1301, USA.  */
-
-#include "sysdep.h"
-#include "bfd.h"
-#include "libbfd.h"
-
-/* The format of a PowerPC NLM changed.  Define OLDFORMAT to get the
-   old format.  */
-
-#define ARCH_SIZE 32
-
-#include "nlm/ppc-ext.h"
-#define Nlm_External_Fixed_Header	Nlm32_powerpc_External_Fixed_Header
-
-#include "libnlm.h"
-
-#ifdef OLDFORMAT
-
-/* The prefix header is only used in the old format.  */
-
-/* PowerPC NLM's have a prefix header before the standard NLM.  This
-   function reads it in, verifies the version, and seeks the bfd to
-   the location before the regular NLM header.  */
-
-static bfd_boolean
-nlm_powerpc_backend_object_p (bfd *abfd)
-{
-  struct nlm32_powerpc_external_prefix_header s;
-
-  if (bfd_bread (& s, (bfd_size_type) sizeof s, abfd) != sizeof s)
-    return FALSE;
-
-  if (memcmp (s.signature, NLM32_POWERPC_SIGNATURE, sizeof s.signature) != 0
-      || H_GET_32 (abfd, s.headerVersion) != NLM32_POWERPC_HEADER_VERSION)
-    return FALSE;
-
-  return TRUE;
-}
-
-/* Write out the prefix.  */
-
-static bfd_boolean
-nlm_powerpc_write_prefix (bfd *abfd)
-{
-  struct nlm32_powerpc_external_prefix_header s;
-
-  memset (&s, 0, sizeof s);
-  memcpy (s.signature, NLM32_POWERPC_SIGNATURE, sizeof s.signature);
-  H_PUT_32 (abfd, NLM32_POWERPC_HEADER_VERSION, s.headerVersion);
-  H_PUT_32 (abfd, 0, s.origins);
-
-  /* FIXME: What should we do about the date?  */
-
-  if (bfd_bwrite (& s, (bfd_size_type) sizeof s, abfd) != sizeof s)
-    return FALSE;
-
-  return TRUE;
-}
-
-/* This reloc handling is only applicable to the old format.  */
-
-/* How to process the various reloc types.  PowerPC NLMs use XCOFF
-   reloc types, and I have just copied the XCOFF reloc table here.  */
-
-static reloc_howto_type nlm_powerpc_howto_table[] =
-{
-  /* Standard 32 bit relocation.  */
-  HOWTO (0,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_POS",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* 32 bit relocation, but store negative value.  */
-  HOWTO (1,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 -2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_NEG",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* 32 bit PC relative relocation.  */
-  HOWTO (2,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 TRUE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_REL",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* 16 bit TOC relative relocation.  */
-  HOWTO (3,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 1,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_TOC",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* I don't really know what this is.  */
-  HOWTO (4,			/* Type.  */
-	 1,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_RTB",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* External TOC relative symbol.  */
-  HOWTO (5,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_GL",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* Local TOC relative symbol.  */
-  HOWTO (6,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_TCL",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  { 7 },
-
-  /* Non modifiable absolute branch.  */
-  HOWTO (8,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 26,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_BA",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0x3fffffc,		/* Source mask.  */
-	 0x3fffffc,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  { 9 },
-
-  /* Non modifiable relative branch.  */
-  HOWTO (0xa,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 26,			/* Bitsize.  */
-	 TRUE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_BR",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0x3fffffc,		/* Source mask.  */
-	 0x3fffffc,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  { 0xb },
-
-  /* Indirect load.  */
-  HOWTO (0xc,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_RL",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* Load address.  */
-  HOWTO (0xd,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_RLA",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  { 0xe },
-
-  /* Non-relocating reference.  */
-  HOWTO (0xf,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_REF",		/* Name.  */
-	 FALSE,			/* Partial_inplace.  */
-	 0,			/* Source mask.  */
-	 0,			/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  { 0x10 },
-  { 0x11 },
-
-  /* TOC relative indirect load.  */
-  HOWTO (0x12,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_TRL",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* TOC relative load address.  */
-  HOWTO (0x13,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_TRLA",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* Modifiable relative branch.  */
-  HOWTO (0x14,			/* Type.  */
-	 1,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_RRTBI",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* Modifiable absolute branch.  */
-  HOWTO (0x15,			/* Type.  */
-	 1,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_RRTBA",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* Modifiable call absolute indirect.  */
-  HOWTO (0x16,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_CAI",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* Modifiable call relative.  */
-  HOWTO (0x17,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_REL",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* Modifiable branch absolute.  */
-  HOWTO (0x18,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_RBA",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* Modifiable branch absolute.  */
-  HOWTO (0x19,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_RBAC",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* Modifiable branch relative.  */
-  HOWTO (0x1a,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 26,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_signed, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_REL",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE),		/* PC rel offset.  */
-
-  /* Modifiable branch absolute.  */
-  HOWTO (0x1b,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 16,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "R_REL",		/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffff,		/* Source mask.  */
-	 0xffff,		/* Dest mask.  */
-	 FALSE)			/* PC rel offset.  */
-};
-
-#define HOWTO_COUNT (sizeof nlm_powerpc_howto_table		\
-		     / sizeof nlm_powerpc_howto_table[0])
-
-/* Read a PowerPC NLM reloc.  */
-
-static bfd_boolean
-nlm_powerpc_read_reloc (bfd *abfd,
-			nlmNAME (symbol_type) *sym,
-			asection **secp,
-			arelent *rel)
-{
-  struct nlm32_powerpc_external_reloc ext;
-  bfd_vma l_vaddr;
-  unsigned long l_symndx;
-  int l_rtype;
-  int l_rsecnm;
-  asection *code_sec, *data_sec, *bss_sec;
-
-  /* Read the reloc from the file.  */
-  if (bfd_bread (&ext, (bfd_size_type) sizeof ext, abfd) != sizeof ext)
-    return FALSE;
-
-  /* Swap in the fields.  */
-  l_vaddr = H_GET_32 (abfd, ext.l_vaddr);
-  l_symndx = H_GET_32 (abfd, ext.l_symndx);
-  l_rtype = H_GET_16 (abfd, ext.l_rtype);
-  l_rsecnm = H_GET_16 (abfd, ext.l_rsecnm);
-
-  /* Get the sections now, for convenience.  */
-  code_sec = bfd_get_section_by_name (abfd, NLM_CODE_NAME);
-  data_sec = bfd_get_section_by_name (abfd, NLM_INITIALIZED_DATA_NAME);
-  bss_sec = bfd_get_section_by_name (abfd, NLM_UNINITIALIZED_DATA_NAME);
-
-  /* Work out the arelent fields.  */
-  if (sym != NULL)
-    /* This is an import.  sym_ptr_ptr is filled in by
-       nlm_canonicalize_reloc.  */
-    rel->sym_ptr_ptr = NULL;
-  else
-    {
-      asection *sec;
-
-      if (l_symndx == 0)
-	sec = code_sec;
-      else if (l_symndx == 1)
-	sec = data_sec;
-      else if (l_symndx == 2)
-	sec = bss_sec;
-      else
-	{
-	  bfd_set_error (bfd_error_bad_value);
-	  return FALSE;
-	}
-
-      rel->sym_ptr_ptr = sec->symbol_ptr_ptr;
-    }
-
-  rel->addend = 0;
-
-  BFD_ASSERT ((l_rtype & 0xff) < HOWTO_COUNT);
-
-  rel->howto = nlm_powerpc_howto_table + (l_rtype & 0xff);
-
-  BFD_ASSERT (rel->howto->name != NULL
-	      && ((l_rtype & 0x8000) != 0
-		  ? (rel->howto->complain_on_overflow
-		     == complain_overflow_signed)
-		  : (rel->howto->complain_on_overflow
-		     == complain_overflow_bitfield))
-	      && ((l_rtype >> 8) & 0x1f) == rel->howto->bitsize - 1);
-
-  if (l_rsecnm == 0)
-    *secp = code_sec;
-  else if (l_rsecnm == 1)
-    {
-      *secp = data_sec;
-      l_vaddr -= code_sec->size;
-    }
-  else
-    {
-      bfd_set_error (bfd_error_bad_value);
-      return FALSE;
-    }
-
-  rel->address = l_vaddr;
-
-  return TRUE;
-}
-
-#else /* not OLDFORMAT */
-
-/* There is only one type of reloc in a PowerPC NLM.  */
-
-static reloc_howto_type nlm_powerpc_howto =
-  HOWTO (0,			/* Type.  */
-	 0,			/* Rightshift.  */
-	 2,			/* Size (0 = byte, 1 = short, 2 = long).  */
-	 32,			/* Bitsize.  */
-	 FALSE,			/* PC relative.  */
-	 0,			/* Bitpos.  */
-	 complain_overflow_bitfield, /* Complain_on_overflow.  */
-	 0,			/* Special_function.  */
-	 "32",			/* Name.  */
-	 TRUE,			/* Partial_inplace.  */
-	 0xffffffff,		/* Source mask.  */
-	 0xffffffff,		/* Dest mask.  */
-	 FALSE);		/* PC rel_offset.  */
-
-/* Read a PowerPC NLM reloc.  */
-
-static bfd_boolean
-nlm_powerpc_read_reloc (bfd *abfd,
-			nlmNAME (symbol_type) *sym,
-			asection **secp,
-			arelent *rel)
-{
-  bfd_byte temp[4];
-  bfd_vma val;
-  const char *name;
-
-  if (bfd_bread (temp, (bfd_size_type) sizeof (temp), abfd) != sizeof (temp))
-    return FALSE;
-
-  val = bfd_get_32 (abfd, temp);
-
-  /* The value is a word offset into either the code or data segment.
-     This is the location which needs to be adjusted.
-
-     The high bit is 0 if the value is an offset into the data
-     segment, or 1 if the value is an offset into the text segment.
-
-     If this is a relocation fixup rather than an imported symbol (the
-     sym argument is NULL), then [...]

[diff truncated at 100000 bytes]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]