aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-coff.h
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-05-04 06:19:26 +0000
committerKen Raeburn <raeburn@cygnus>1994-05-04 06:19:26 +0000
commit8fb85d50cdcb86bc13cd652a75e4e55af84d39bd (patch)
tree5eb78a32d17cdde512563cc8ef8a213ffc2b1c3e /gas/config/obj-coff.h
parentde9117a714162d3d9fb682418ca333698d265f1b (diff)
downloadgdb-8fb85d50cdcb86bc13cd652a75e4e55af84d39bd.zip
gdb-8fb85d50cdcb86bc13cd652a75e4e55af84d39bd.tar.gz
gdb-8fb85d50cdcb86bc13cd652a75e4e55af84d39bd.tar.bz2
* obj-coff.h (TARGET_FORMAT) [TC_I960]: Select little endian version.
* obj-coffbfd.h (TARGET_FORMAT) [TC_I960]: Ditto. * obj-coff.c (coff_frob_section): Round up the size of every section to a multiple of the alignment, so that BFD doesn't surprise us. Eliminate many simple differences between the two COFF back ends: * obj-coffbfd.c: Removed all uses of DEFUN and DEFUN_VOID. Made minor stylistic changes, deleted some register declarations. (stack_top): Deleted. (symbol_to_chars): Use absolute_section and reg_section instead of the corresponding SEG_* symbols. (obj_coff_endef, tag_find_or_make, fixup_segment): Likewise. (stack typedef, stack_init, stack_delete, stack_push, stack_pop): Moved to just after pseudo-op table. All functions now static. (stack_delete): Removed declaration. (tag_init, tag_insert, tag_find_or_make, tag_find): Moved to just after stack functions. * obj-coffbfd.h: Reordered some declarations and macros. (stack_init, stack_delete, stack_push, stack_pop): Don't declare. (stack typedef): Deleted. (SYMBOLS_NEED_BACKPOINTERS): Always undef then define; don't test. (SYM_AUXENT): New macro. (SA_GET_*, SA_SET_*): Define in terms of SYM_AUXENT when feasible. (SF_GET_*, SF_SET_*): Define in terms of SF_GET when feasible. (SA_GET_SYM_TAGNDX, SA_GET_SYM_ENDNDX, SA_SET_SYM_TAGNDX, SA_SET_SYM_ENDNDX, object_headers typedef, data_section_header, text_section_header): Delete non-BFD_HEADERS versions, since we always define that symbol now. * obj-coff.c (stack_top): Deleted. (obj_coff_endef, obj_coff_dim, obj_coff_line, obj_coff_size, obj_coff_scl, obj_coff_tag, obj_coff_type, obj_coff_val): Change argument name from "ignored" to "ignore". (obj_coff_val): Use frag_now_fix. (obj_pseudo_table): Removed IGNORE_DEBUG version, since it doesn't get used. (stack typedef, stack_init, stack_delete, stack_push, stack_pop): Moved to just after pseudo-op table. All functions now static. (tag_init, tag_insert, tag_find_or_make, tag_find): Moved to just after stack functions. * obj-coff.h: Reordered some declarations and macros. Protected against multiple inclusions. (stack_init, stack_delete, stack_push, stack_pop): Don't declare. (stack typedef): Deleted. (SYMBOLS_NEED_BACKPOINTERS): Always undef then define; don't test. (stdoutput): Deleted declaration. (TARGET_FORMAT) [TC_I386]: Don't define if already defined.
Diffstat (limited to 'gas/config/obj-coff.h')
-rw-r--r--gas/config/obj-coff.h80
1 files changed, 34 insertions, 46 deletions
diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h
index 0d5a68c..57dbc6a 100644
--- a/gas/config/obj-coff.h
+++ b/gas/config/obj-coff.h
@@ -17,44 +17,24 @@
along with GAS; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+#ifndef OBJ_FORMAT_H
+#define OBJ_FORMAT_H
+
#define OBJ_COFF 1
#include "targ-cpu.h"
+#include "bfd.h"
+
/* This internal_lineno crap is to stop namespace pollution from the
bfd internal coff headerfile. */
-#include "bfd.h"
#define internal_lineno bfd_internal_lineno
#include "coff/internal.h"
#undef internal_lineno
#include "../bfd/libcoff.h"
-#ifdef TC_A29K
-#include "coff/a29k.h"
-#define TARGET_FORMAT "coff-a29k-big"
-extern bfd *stdoutput;
-
-#endif /* TC_A29K */
-
-#ifdef TC_I960
-#include "coff/i960.h"
-#define TARGET_FORMAT "coff-i960-big"
-#endif
-
-#ifdef TC_I386
-# include "coff/i386.h"
-# define TARGET_FORMAT "coff-i386"
-extern bfd *stdoutput;
-
-#endif /* TC_I386 */
-
-#ifdef TC_M68K
-# include "coff/m68k.h"
-# define TARGET_FORMAT "coff-m68k"
-#endif /* TC_M68K */
-
#ifdef TC_PPC
#include "coff/rs6000.h"
#endif
@@ -68,12 +48,35 @@ extern bfd *stdoutput;
#endif
#endif
+#ifdef TC_I386
+#include "coff/i386.h"
+#ifndef TARGET_FORMAT
+#define TARGET_FORMAT "coff-i386"
+#endif
+#endif
+
+#ifdef TC_M68K
+#include "coff/m68k.h"
+#ifndef TARGET_FORMAT
+#define TARGET_FORMAT "coff-m68k"
+#endif
+#endif
+
+#ifdef TC_A29K
+#include "coff/a29k.h"
+#define TARGET_FORMAT "coff-a29k-big"
+#endif
+
+#ifdef TC_I960
+#include "coff/i960.h"
+#define TARGET_FORMAT "coff-Intel-little"
+#endif
+
/* SYMBOL TABLE */
/* targets may also set this */
-#ifndef SYMBOLS_NEED_BACKPOINTERS
+#undef SYMBOLS_NEED_BACKPOINTERS
#define SYMBOLS_NEED_BACKPOINTERS 1
-#endif /* SYMBOLS_NEED_BACKPOINTERS */
/* Alter the field names, for now, until we've fixed up the other
references to use the new name. */
@@ -219,24 +222,8 @@ extern int coff_line_base;
#define obj_emit_lineno(WHERE,LINE,FILE_START) abort ()
extern void coff_add_linesym PARAMS ((struct symbol *));
-/* stack stuff */
-typedef struct
- {
- unsigned long chunk_size;
- unsigned long element_size;
- unsigned long size;
- char *data;
- unsigned long pointer;
- }
-stack;
-
-char *stack_pop PARAMS ((stack * st));
-char *stack_push PARAMS ((stack * st, char *element));
-char *stack_top PARAMS ((stack * st));
-stack *stack_init PARAMS ((unsigned long chunk_size,
- unsigned long element_size));
+
void c_dot_file_symbol PARAMS ((char *filename));
-void stack_delete PARAMS ((stack * st));
#ifndef tc_coff_symbol_emit_hook
void tc_coff_symbol_emit_hook PARAMS ((/* symbolS * */));
@@ -272,11 +259,12 @@ hey ! Where is the C_LEAFSTAT definition ? i960 - coff support is depending on i
#endif /* no C_LEAFSTAT */
#endif /* TC_I960 */
+/* Stabs in a coff file go into their own section. */
#define SEPARATE_STAB_SECTIONS
+
/* We need 12 bytes at the start of the section to hold some initial
information. */
extern void obj_coff_init_stab_section PARAMS ((segT));
#define INIT_STAB_SECTION(seg) obj_coff_init_stab_section (seg)
-
-/* end of obj-coff.h */
+#endif /* OBJ_FORMAT_H */