Commit b4b594e3 authored by Alan Modra's avatar Alan Modra

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.
parent fceadf09
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.
......
......@@ -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
......
......@@ -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@
......
......@@ -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
......
......@@ -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,
......
......@@ -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;
......
......@@ -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
......
......@@ -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" ;;
......
......@@ -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" ;;
......
......@@ -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.
......
......@@ -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. */
......
/* 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_ */
/* 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