From b1c86ef190810e341c32b12aeadeec0f55bfc732 Mon Sep 17 00:00:00 2001 From: Sean Eric Fagan Date: Thu, 19 Sep 1991 22:28:00 +0000 Subject: [PATCH] *** empty log message *** --- bfd/bfd.c | 17 +++++++++-------- include/coff-i386.h | 28 +++++++++++++++++++--------- include/coff-m68k.h | 25 ++++++++++++++++++++++--- include/internalcoff.h | 28 ++++++++++++++++++++++------ 4 files changed, 72 insertions(+), 26 deletions(-) diff --git a/bfd/bfd.c b/bfd/bfd.c index 0bf4a651ffc..331312e8e9c 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -21,14 +21,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id$ */ /*proto* -@section typedef bfd +@section @code{typedef bfd} -Pointers to bfd structs are the cornerstone of any application using -@code{libbfd}. References though the BFD and to data in the BFD give the -entire BFD functionality. +A BFD is has type @code{bfd}; objects of this type are the cornerstone +of any application using @code{libbfd}. References though the BFD and +to data in the BFD give the entire BFD functionality. -Here is the BFD struct itself. This contains the major data about -the file, and contains pointers to the rest of the data. +Here is the struct used to define the type @code{bfd}. This contains +the major data about the file, and contains pointers to the rest of +the data. *+++ @@ -81,7 +82,7 @@ File modified time $ long mtime; -For output files, channel we locked (is this used?). +Reserved for an unimplemented file locking extension. $int ifd; @@ -218,7 +219,7 @@ bfd_error_vector_type bfd_error_vector = bfd_nonrepresentable_section }; -#if 1 || !defined(ANSI_LIBRARIES) && !defined(__STDC__) +#if !defined(ANSI_LIBRARIES) && !defined(__STDC__) || HOST_SYS==SUN4_SYS char * strerror (code) int code; diff --git a/include/coff-i386.h b/include/coff-i386.h index a3e902e3bc3..baf7cca6956 100755 --- a/include/coff-i386.h +++ b/include/coff-i386.h @@ -22,15 +22,24 @@ struct external_filehdr { * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) */ -#define F_RELFLG (0x0001) -#define F_EXEC (0x0002) -#define F_LNNO (0x0004) -#define F_LSYMS (0x0008) - - - -#define I386MAGIC 0x14c +#define F_RELFLG 0000001 +#define F_EXEC 0000002 +#define F_LNNO 0000004 +#define F_LSYMS 0000010 +#define F_MINMAL 0000020 +#define F_UPDATE 0000040 +#define F_SWABD 0000100 +#define F_AR16WR 0000200 +#define F_AR32WR 0000400 +#define F_AR32W 0001000 +#define F_PATCH 0002000 +#define F_NODF 0002000 + +#define I386MAGIC 0514 #define I386BADMAG(x) (((x).f_magic!=I386MAGIC)) +#define I386AOUTMAGIC 0413 +#define I386AOUTVSTAMP 0000 +#define COFF_TIMESTAMP #define FILHDR struct external_filehdr @@ -110,7 +119,7 @@ struct external_scnhdr { #define _TEXT ".text" #define _DATA ".data" #define _BSS ".bss" - +#define _COMMENT ".comment" /* * s_flags "type" */ @@ -311,5 +320,6 @@ struct external_reloc { #define DEFAULT_DATA_SECTION_ALIGNMENT 4 #define DEFAULT_BSS_SECTION_ALIGNMENT 4 #define DEFAULT_TEXT_SECTION_ALIGNMENT 4 +#define DEFAULT_COMMENT_SECTION_ALIGNMENT 4 /* For new sections we havn't heard of before */ #define DEFAULT_SECTION_ALIGNMENT 4 diff --git a/include/coff-m68k.h b/include/coff-m68k.h index fb215bbaab6..b9a7e69f6dc 100755 --- a/include/coff-m68k.h +++ b/include/coff-m68k.h @@ -13,7 +13,7 @@ struct external_filehdr { }; -/* Motorola 68000/68008/68010/68020 */ +/* Motorola 68000/68008/68010/68020 file magic numbers*/ #define MC68MAGIC 0520 #define MC68KWRMAGIC 0520 /* writeable text segments */ #define MC68TVMAGIC 0521 @@ -22,8 +22,15 @@ struct external_filehdr { #define M68MAGIC 0210 #define M68TVMAGIC 0211 -#define M68KBADMAG(x) (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) && ((x).f_magic!=MC68TVMAGIC) && \ - ((x).f_magic!=MC68KROMAGIC) && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) && ((x).f_magic!=M68TVMAGIC) ) +# define COFF_TIMESTAMP +# define XPG3_FLAG +# define MC68KBCSMAGIC 0526 +#define M68KBADMAG(x) \ + (((x).f_magic!=MC68MAGIC) && ((x).f_magic!=MC68KWRMAGIC) \ + && ((x).f_magic!=MC68TVMAGIC) && ((x).f_magic!=MC68KROMAGIC) \ + && ((x).f_magic!=MC68KPGMAGIC) && ((x).f_magic!=M68MAGIC) \ + && ((x).f_magic!=M68TVMAGIC) && ((x).f_magic!=MC68KBCSMAGIC) ) + @@ -50,6 +57,14 @@ AOUTHDR; #define AOUTSZ (sizeof(AOUTHDR)) + +/* a.out header magic numbers */ + +#define MC68PGMAGIC 0413 /* Page aligned shared a.out */ +#define MC68WRMAGIC 0407 /* Private text */ +#define MC68ROMAGIC 0410 /* Shared text */ +#define MC68PGLIBMAGIC 0443 /* Page aligned shared lib */ +#define MC68AOUTVSTAMP 0000 /* Version stamp */ /********************** SECTION HEADER **********************/ @@ -74,6 +89,10 @@ struct external_scnhdr { #define _TEXT ".text" #define _DATA ".data" #define _BSS ".bss" +#define _TV ".tv" +#define _NL ".nl" +#define _INIT ".init" +#define _FINI ".fini" #define SCNHDR struct external_scnhdr diff --git a/include/internalcoff.h b/include/internalcoff.h index 1cfd0d4a012..03e40c53f6a 100755 --- a/include/internalcoff.h +++ b/include/internalcoff.h @@ -18,12 +18,21 @@ struct internal_filehdr * F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax) */ -#define F_RELFLG (0x0001) -#define F_EXEC (0x0002) -#define F_LNNO (0x0004) -#define F_LSYMS (0x0008) -#define F_AR32WR (0x0010) -#define F_AR32W 0x200 +#define F_RELFLG 0000001 +#define F_EXEC 0000002 +#define F_LNNO 0000004 +#define F_LSYMS 0000010 +#define F_MINMAL 0000020 +#define F_UPDATE 0000040 +#define F_SWABD 0000100 +#define F_AR16WR 0000200 +#define F_AR32WR 0000400 +#define F_AR32W 0001000 +#define F_PATCH 0002000 +#define F_NODF 0002000 +#define F_XPG3 0004000 +#define F_MC68NULLPTR 0020000 + /********************** AOUT "OPTIONAL HEADER" **********************/ struct internal_aouthdr { short magic; /* type of file */ @@ -104,6 +113,13 @@ struct internal_scnhdr { #endif }; +/* + * names of "special" sections + */ +#define _TEXT ".text" +#define _DATA ".data" +#define _BSS ".bss" +#define _COMMENT ".comment" /* * s_flags "type" -- 2.30.2