aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-elf.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>1999-09-02 15:12:01 +0000
committerAlan Modra <amodra@gmail.com>1999-09-02 15:12:01 +0000
commit4ca72d382982b09b4a838e6170792d657cc707ff (patch)
tree7c989fb9562e1e88ae43671e9127ee7ee87b6242 /gas/config/obj-elf.h
parentbcef92fa2302e7e7728bc92c28571672b6efd9c1 (diff)
downloadgdb-4ca72d382982b09b4a838e6170792d657cc707ff.zip
gdb-4ca72d382982b09b4a838e6170792d657cc707ff.tar.gz
gdb-4ca72d382982b09b4a838e6170792d657cc707ff.tar.bz2
Enable --emulation={i386coff,i386elf} for i386 gas.
Diffstat (limited to 'gas/config/obj-elf.h')
-rw-r--r--gas/config/obj-elf.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h
index d39998e..0d16ca2 100644
--- a/gas/config/obj-elf.h
+++ b/gas/config/obj-elf.h
@@ -28,7 +28,9 @@
#define OBJ_ELF 1
+#ifndef OUTPUT_FLAVOR
#define OUTPUT_FLAVOR bfd_target_elf_flavour
+#endif
#include <bfd.h>
@@ -52,10 +54,6 @@ extern int alpha_flag_mdebug;
#endif /* TC_MIPS */
/* Additional information we keep for each symbol. */
-
-/* FIXME: For some reason, this structure is needed both here and in
- obj-multi.h. */
-#ifndef OBJ_SYMFIELD_TYPE
struct elf_obj_sy
{
/* Whether the symbol has been marked as local. */
@@ -76,7 +74,6 @@ struct elf_obj_sy
valueT ecoff_extern_size;
#endif
};
-#endif
#define OBJ_SYMFIELD_TYPE struct elf_obj_sy
@@ -91,15 +88,23 @@ extern void elf_begin PARAMS ((void));
/* should be conditional on address size! */
#define elf_symbol(asymbol) ((elf_symbol_type *)(&(asymbol)->the_bfd))
+#ifndef S_GET_SIZE
#define S_GET_SIZE(S) \
(elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_size)
+#endif
+#ifndef S_SET_SIZE
#define S_SET_SIZE(S,V) \
(elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_size = (V))
+#endif
+#ifndef S_GET_ALIGN
#define S_GET_ALIGN(S) \
(elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_value)
+#endif
+#ifndef S_SET_ALIGN
#define S_SET_ALIGN(S,V) \
(elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_value = (V))
+#endif
#define S_GET_OTHER(S) \
(elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_other)
@@ -108,10 +113,14 @@ extern void elf_begin PARAMS ((void));
extern asection *gdb_section;
+#ifndef obj_frob_file
#define obj_frob_file elf_frob_file
+#endif
extern void elf_frob_file PARAMS ((void));
+#ifndef obj_frob_file_after_relocs
#define obj_frob_file_after_relocs elf_frob_file_after_relocs
+#endif
extern void elf_frob_file_after_relocs PARAMS ((void));
#define obj_app_file elf_file_symbol
@@ -128,11 +137,14 @@ extern void obj_elf_text PARAMS ((int));
/* BFD wants to write the udata field, which is a no-no for the
globally defined sections. */
+#ifndef obj_sec_sym_ok_for_reloc
#define obj_sec_sym_ok_for_reloc(SEC) ((SEC)->owner != 0)
+#endif
/* When setting one symbol equal to another, by default we probably
want them to have the same "size", whatever it means in the current
context. */
+#ifndef OBJ_COPY_SYMBOL_ATTRIBUTES
#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST,SRC) \
do \
{ \
@@ -155,6 +167,7 @@ do \
S_SET_OTHER ((DEST), S_GET_OTHER (SRC)); \
} \
while (0)
+#endif
/* Stabs go in a separate section. */
#define SEPARATE_STAB_SECTIONS 1
@@ -175,6 +188,7 @@ extern void obj_elf_init_stab_section PARAMS ((segT));
#define INIT_STAB_SECTION(seg) \
((void)(ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0)))
+#undef OBJ_PROCESS_STAB
#define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \
if (ECOFF_DEBUGGING) \
ecoff_stab ((seg), (what), (string), (type), (other), (desc))
@@ -186,7 +200,9 @@ extern void elf_frob_symbol PARAMS ((symbolS *, int *));
#endif
extern void elf_pop_insert PARAMS ((void));
+#ifndef obj_pop_insert
#define obj_pop_insert() elf_pop_insert()
+#endif
#ifndef OBJ_MAYBE_ELF
#define obj_ecoff_set_ext elf_ecoff_set_ext