aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-coffbfd.h
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1992-11-23 20:42:33 +0000
committerKen Raeburn <raeburn@cygnus>1992-11-23 20:42:33 +0000
commit355afbcd8b1a0253180ac565f8e7a18afdfc5977 (patch)
tree9c89a5d0eb2513cdbcbdd7cecb48dd714ccdcdc6 /gas/config/obj-coffbfd.h
parent6efd877de5ab683fc5d7c216049f9f888bf18828 (diff)
downloadgdb-355afbcd8b1a0253180ac565f8e7a18afdfc5977.zip
gdb-355afbcd8b1a0253180ac565f8e7a18afdfc5977.tar.gz
gdb-355afbcd8b1a0253180ac565f8e7a18afdfc5977.tar.bz2
Ran "indent", for GNU coding style; some code & comments still need fixup.
Removed some unneeded files. obj-coff.c (obj_coff_endef): Use as_warn, not fprintf. tc-m68k.c (md_assemble): 68000+68881 is okay -- could be emulating.
Diffstat (limited to 'gas/config/obj-coffbfd.h')
-rw-r--r--gas/config/obj-coffbfd.h204
1 files changed, 108 insertions, 96 deletions
diff --git a/gas/config/obj-coffbfd.h b/gas/config/obj-coffbfd.h
index ad8b5d4..5e98027 100644
--- a/gas/config/obj-coffbfd.h
+++ b/gas/config/obj-coffbfd.h
@@ -1,18 +1,22 @@
+
+
+
+
/* coff object file format
Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
-
+
This file is part of GAS.
-
+
GAS 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 2, or (at your option)
any later version.
-
+
GAS 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 GAS; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
@@ -69,32 +73,32 @@
#else
help me
#endif
-
+
#if 0
- /* Define some processor dependent values according to the processor we are
+/* Define some processor dependent values according to the processor we are
on. */
#if defined(TC_H8300)
#define BYTE_ORDERING 0
#define FILE_HEADER_MAGIC H8300MAGIC
#elif defined(TC_M68K)
-#define BYTE_ORDERING F_AR32W /* See filehdr.h for more info. */
+#define BYTE_ORDERING F_AR32W /* See filehdr.h for more info. */
#ifndef FILE_HEADER_MAGIC
-#define FILE_HEADER_MAGIC MC68MAGIC /* ... */
+#define FILE_HEADER_MAGIC MC68MAGIC /* ... */
#endif /* FILE_HEADER_MAGIC */
#elif defined(TC_I386)
-#define BYTE_ORDERING F_AR32WR /* See filehdr.h for more info. */
+#define BYTE_ORDERING F_AR32WR /* See filehdr.h for more info. */
#ifndef FILE_HEADER_MAGIC
-#define FILE_HEADER_MAGIC I386MAGIC /* ... */
+#define FILE_HEADER_MAGIC I386MAGIC /* ... */
#endif /* FILE_HEADER_MAGIC */
#elif defined(TC_I960)
-#define BYTE_ORDERING F_AR32WR /* See filehdr.h for more info. */
+#define BYTE_ORDERING F_AR32WR /* See filehdr.h for more info. */
#ifndef FILE_HEADER_MAGIC
-#define FILE_HEADER_MAGIC I960ROMAGIC /* ... */
+#define FILE_HEADER_MAGIC I960ROMAGIC /* ... */
#endif /* FILE_HEADER_MAGIC */
#elif defined(TC_A29K)
@@ -104,17 +108,17 @@ help me
#define FILE_HEADER_MAGIC SIPFBOMAGIC
#endif /* FILE_HEADER_MAGIC */
#else
-you lose
-#endif
-
+ you lose
+#endif
+
#endif
-
+
#ifndef OBJ_COFF_MAX_AUXENTRIES
#define OBJ_COFF_MAX_AUXENTRIES 1
#endif /* OBJ_COFF_MAX_AUXENTRIES */
-
-
- extern const segT N_TYPE_seg[];
+
+
+extern const segT N_TYPE_seg[];
/* Magic number of paged executable. */
#define DEFAULT_MAGIC_NUMBER_FOR_OBJECT_FILE 0x8300
@@ -129,13 +133,15 @@ you lose
/* Symbol table entry data type */
-typedef struct
+typedef struct
{
- struct internal_syment ost_entry; /* Basic symbol */
- union internal_auxent ost_auxent[OBJ_COFF_MAX_AUXENTRIES]; /* Auxiliary entry. */
-
- unsigned int ost_flags; /* obj_coff internal use only flags */
-} obj_symbol_type;
+ struct internal_syment ost_entry; /* Basic symbol */
+ union internal_auxent ost_auxent[OBJ_COFF_MAX_AUXENTRIES]; /* Auxiliary entry. */
+
+ unsigned int ost_flags; /* obj_coff internal use only flags */
+}
+
+obj_symbol_type;
#ifndef DO_NOT_STRIP
#define DO_NOT_STRIP 0
@@ -143,7 +149,7 @@ typedef struct
#endif
/* Symbol table macros and constants */
-/* Possible and usefull section number in symbol table
+/* Possible and usefull section number in symbol table
* The values of TEXT, DATA and BSS may not be portable.
*/
@@ -194,7 +200,7 @@ typedef struct
/* The zeroes if symbol name is longer than 8 chars */
#define S_GET_ZEROES(s) ((s)->sy_symbol.ost_entry.n_zeroes)
/* The value of the symbol */
-#define S_GET_VALUE(s) ((unsigned) ((s)->sy_symbol.ost_entry.n_value))
+#define S_GET_VALUE(s) ((unsigned) ((s)->sy_symbol.ost_entry.n_value))
/* The numeric value of the segment */
#define S_GET_SEGMENT(s) s_get_segment(s)
/* The data type */
@@ -280,27 +286,27 @@ typedef struct
* differently.
*/
-#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */
-#define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */
-#define SF_IS_SYSPROC (0x00000040) /* bit 6 marks symbols that are sysprocs */
-#define SF_BALNAME (0x00000080) /* bit 7 marks BALNAME symbols */
-#define SF_CALLNAME (0x00000100) /* bit 8 marks CALLNAME symbols */
+#define SF_I960_MASK (0x000001ff) /* Bits 0-8 are used by the i960 port. */
+#define SF_SYSPROC (0x0000003f) /* bits 0-5 are used to store the sysproc number */
+#define SF_IS_SYSPROC (0x00000040) /* bit 6 marks symbols that are sysprocs */
+#define SF_BALNAME (0x00000080) /* bit 7 marks BALNAME symbols */
+#define SF_CALLNAME (0x00000100) /* bit 8 marks CALLNAME symbols */
-#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */
+#define SF_NORMAL_MASK (0x0000ffff) /* bits 12-15 are general purpose. */
-#define SF_STATICS (0x00001000) /* Mark the .text & all symbols */
-#define SF_DEFINED (0x00002000) /* Symbol is defined in this file */
-#define SF_STRING (0x00004000) /* Symbol name length > 8 */
-#define SF_LOCAL (0x00008000) /* Symbol must not be emitted */
+#define SF_STATICS (0x00001000) /* Mark the .text & all symbols */
+#define SF_DEFINED (0x00002000) /* Symbol is defined in this file */
+#define SF_STRING (0x00004000) /* Symbol name length > 8 */
+#define SF_LOCAL (0x00008000) /* Symbol must not be emitted */
-#define SF_DEBUG_MASK (0xffff0000) /* bits 16-31 are debug info */
+#define SF_DEBUG_MASK (0xffff0000) /* bits 16-31 are debug info */
-#define SF_FUNCTION (0x00010000) /* The symbol is a function */
-#define SF_PROCESS (0x00020000) /* Process symbol before write */
-#define SF_TAGGED (0x00040000) /* Is associated with a tag */
-#define SF_TAG (0x00080000) /* Is a tag */
-#define SF_DEBUG (0x00100000) /* Is in debug or abs section */
-#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */
+#define SF_FUNCTION (0x00010000) /* The symbol is a function */
+#define SF_PROCESS (0x00020000) /* Process symbol before write */
+#define SF_TAGGED (0x00040000) /* Is associated with a tag */
+#define SF_TAG (0x00080000) /* Is a tag */
+#define SF_DEBUG (0x00100000) /* Is in debug or abs section */
+#define SF_GET_SEGMENT (0x00200000) /* Get the section of the forward symbol. */
/* All other bits are unused. */
/* Accessors */
@@ -318,11 +324,11 @@ typedef struct
#define SF_GET_TAGGED(s) ((s)->sy_symbol.ost_flags & SF_TAGGED)
#define SF_GET_TAG(s) ((s)->sy_symbol.ost_flags & SF_TAG)
#define SF_GET_GET_SEGMENT(s) ((s)->sy_symbol.ost_flags & SF_GET_SEGMENT)
-#define SF_GET_I960(s) ((s)->sy_symbol.ost_flags & SF_I960_MASK) /* used by i960 */
-#define SF_GET_BALNAME(s) ((s)->sy_symbol.ost_flags & SF_BALNAME) /* used by i960 */
-#define SF_GET_CALLNAME(s) ((s)->sy_symbol.ost_flags & SF_CALLNAME) /* used by i960 */
-#define SF_GET_IS_SYSPROC(s) ((s)->sy_symbol.ost_flags & SF_IS_SYSPROC) /* used by i960 */
-#define SF_GET_SYSPROC(s) ((s)->sy_symbol.ost_flags & SF_SYSPROC) /* used by i960 */
+#define SF_GET_I960(s) ((s)->sy_symbol.ost_flags & SF_I960_MASK) /* used by i960 */
+#define SF_GET_BALNAME(s) ((s)->sy_symbol.ost_flags & SF_BALNAME) /* used by i960 */
+#define SF_GET_CALLNAME(s) ((s)->sy_symbol.ost_flags & SF_CALLNAME) /* used by i960 */
+#define SF_GET_IS_SYSPROC(s) ((s)->sy_symbol.ost_flags & SF_IS_SYSPROC) /* used by i960 */
+#define SF_GET_SYSPROC(s) ((s)->sy_symbol.ost_flags & SF_SYSPROC) /* used by i960 */
/* Modifiers */
#define SF_SET(s,v) ((s)->sy_symbol.ost_flags = (v))
@@ -340,11 +346,11 @@ typedef struct
#define SF_SET_TAGGED(s) ((s)->sy_symbol.ost_flags |= SF_TAGGED)
#define SF_SET_TAG(s) ((s)->sy_symbol.ost_flags |= SF_TAG)
#define SF_SET_GET_SEGMENT(s) ((s)->sy_symbol.ost_flags |= SF_GET_SEGMENT)
-#define SF_SET_I960(s,v) ((s)->sy_symbol.ost_flags |= ((v) & SF_I960_MASK)) /* used by i960 */
-#define SF_SET_BALNAME(s) ((s)->sy_symbol.ost_flags |= SF_BALNAME) /* used by i960 */
-#define SF_SET_CALLNAME(s) ((s)->sy_symbol.ost_flags |= SF_CALLNAME) /* used by i960 */
-#define SF_SET_IS_SYSPROC(s) ((s)->sy_symbol.ost_flags |= SF_IS_SYSPROC) /* used by i960 */
-#define SF_SET_SYSPROC(s,v) ((s)->sy_symbol.ost_flags |= ((v) & SF_SYSPROC)) /* used by i960 */
+#define SF_SET_I960(s,v) ((s)->sy_symbol.ost_flags |= ((v) & SF_I960_MASK)) /* used by i960 */
+#define SF_SET_BALNAME(s) ((s)->sy_symbol.ost_flags |= SF_BALNAME) /* used by i960 */
+#define SF_SET_CALLNAME(s) ((s)->sy_symbol.ost_flags |= SF_CALLNAME) /* used by i960 */
+#define SF_SET_IS_SYSPROC(s) ((s)->sy_symbol.ost_flags |= SF_IS_SYSPROC) /* used by i960 */
+#define SF_SET_SYSPROC(s,v) ((s)->sy_symbol.ost_flags |= ((v) & SF_SYSPROC)) /* used by i960 */
/* File header macro and type definition */
@@ -451,79 +457,85 @@ typedef struct
/* Segment flipping */
#define segment_name(v) (seg_name[(int) (v)])
-typedef struct {
+typedef struct
+ {
#ifdef BFD_HEADERS
- struct internal_aouthdr aouthdr; /* a.out header */
- struct internal_filehdr filehdr; /* File header, not machine dep. */
+ struct internal_aouthdr aouthdr; /* a.out header */
+ struct internal_filehdr filehdr; /* File header, not machine dep. */
#else
- AOUTHDR aouthdr; /* a.out header */
- FILHDR filehdr; /* File header, not machine dep. */
+ AOUTHDR aouthdr; /* a.out header */
+ FILHDR filehdr; /* File header, not machine dep. */
#endif
- long string_table_size; /* names + '\0' + sizeof(int) */
- long relocation_size; /* Cumulated size of relocation
+ long string_table_size; /* names + '\0' + sizeof(int) */
+ long relocation_size; /* Cumulated size of relocation
information for all sections in
bytes. */
- long lineno_size; /* Size of the line number information
+ long lineno_size; /* Size of the line number information
table in bytes */
-} object_headers;
+ }
+
+object_headers;
struct lineno_list
{
-
- struct bfd_internal_lineno line;
- char* frag; /* Frag to which the line number is related */
- struct lineno_list* next; /* Forward chain pointer */
-} ;
+
+ struct bfd_internal_lineno line;
+ char *frag; /* Frag to which the line number is related */
+ struct lineno_list *next; /* Forward chain pointer */
+};
/* stack stuff */
-typedef struct {
- unsigned long chunk_size;
- unsigned long element_size;
- unsigned long size;
- char* data;
- unsigned long pointer;
-} stack;
+typedef struct
+ {
+ unsigned long chunk_size;
+ unsigned long element_size;
+ unsigned long size;
+ char *data;
+ unsigned long pointer;
+ }
+
+stack;
+
+char *EXFUN (stack_pop, (stack * st));
+char *EXFUN (stack_push, (stack * st, char *element));
+char *EXFUN (stack_top, (stack * st));
+stack *EXFUN (stack_init, (unsigned long chunk_size, unsigned long element_size));
+void EXFUN (c_dot_file_symbol, (char *filename));
+void EXFUN (obj_extra_stuff, (object_headers * headers));
+void EXFUN (stack_delete, (stack * st));
-char *EXFUN(stack_pop,(stack *st));
-char *EXFUN(stack_push,(stack *st, char *element));
-char *EXFUN(stack_top,(stack *st));
-stack *EXFUN(stack_init,(unsigned long chunk_size, unsigned long element_size));
-void EXFUN(c_dot_file_symbol,(char *filename));
-void EXFUN(obj_extra_stuff,(object_headers *headers));
-void EXFUN(stack_delete,(stack *st));
+void EXFUN (c_section_header, (
-void EXFUN(c_section_header,(
-
- struct internal_scnhdr *header,
- char *name,
- long core_address,
- long size,
- long data_ptr,
- long reloc_ptr,
- long lineno_ptr,
- long reloc_number,
- long lineno_number,
- long alignment));
+ struct internal_scnhdr * header,
+ char *name,
+ long core_address,
+ long size,
+ long data_ptr,
+ long reloc_ptr,
+ long lineno_ptr,
+ long reloc_number,
+ long lineno_number,
+ long alignment));
/* sanity check */
#ifdef TC_I960
#ifndef C_LEAFSTAT
-hey! Where is the C_LEAFSTAT definition? i960-coff support is depending on it.
+hey ! Where is the C_LEAFSTAT definition ? i960 - coff support is depending on it.
#endif /* no C_LEAFSTAT */
#endif /* TC_I960 */
#ifdef BFD_HEADERS
- extern struct internal_scnhdr data_section_header;
+extern struct internal_scnhdr data_section_header;
extern struct internal_scnhdr text_section_header;
#else
extern SCNHDR data_section_header;