aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Unrau <runrau@cygnus>1998-07-31 21:56:15 +0000
committerRon Unrau <runrau@cygnus>1998-07-31 21:56:15 +0000
commit4f528afaf1f0dc867427fe92197e40deaa2a0696 (patch)
treedcbe93f9fa15e99cbd3693393c54f91eb6d407e9
parentea89ffaec58a4bde0439c1604f63e9a772886d31 (diff)
downloadgdb-4f528afaf1f0dc867427fe92197e40deaa2a0696.zip
gdb-4f528afaf1f0dc867427fe92197e40deaa2a0696.tar.gz
gdb-4f528afaf1f0dc867427fe92197e40deaa2a0696.tar.bz2
Start of changes to remove mdebug section from mips*-elf
Based on MIPS_STAB_ELF definition * acconfig.h: undef if not configured * config.in: undef if not configured * config/mips-elf.h: only set ECOFF debugging if not stabs-in-elf * config/tc-mips.c (s_ent): set BSF_FUNCTION * stabs.c (s_stab_generic): flush frag
-rw-r--r--gas/ChangeLog12
-rw-r--r--gas/acconfig.h3
-rw-r--r--gas/config/obj-elf.h46
3 files changed, 48 insertions, 13 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0733f6c..9f5fe94 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,9 +1,13 @@
-start-sanitize-armelf
-Fri Jul 31 16:40:34 1998 Catherine Moore <clm@cygnus.com>
+Fri Jul 31 16:45:54 1998 Ron Unrau <runrau@cygnus.com>
- * config/tc-arm.h: Add definitions for OBJ_ELF.
+ Start of changes to remove mdebug section from mips*-elf
+ Based on MIPS_STAB_ELF definition
+ * acconfig.h: undef if not configured
+ * config.in: undef if not configured
+ * config/mips-elf.h: only set ECOFF debugging if not stabs-in-elf
+ * config/tc-mips.c (s_ent): set BSF_FUNCTION
+ * stabs.c (s_stab_generic): flush frag
-end-sanitize-armelf
start-sanitize-armelf
Fri Jul 31 16:14:45 1998 Catherine Moore <clm@cygnus.com>
diff --git a/gas/acconfig.h b/gas/acconfig.h
index 95e970b..9e9ff8b 100644
--- a/gas/acconfig.h
+++ b/gas/acconfig.h
@@ -78,6 +78,9 @@
/* Needed only for SCO 5. */
#undef SCO_ELF
+/* needed for non irix ELF targets */
+#undef MIPS_STABS_ELF
+
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS
diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h
index bd4d58c..291b50a 100644
--- a/gas/config/obj-elf.h
+++ b/gas/config/obj-elf.h
@@ -36,6 +36,9 @@
/* 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
{
/* Use this to keep track of .size expressions that involve
@@ -45,6 +48,7 @@ struct elf_obj_sy
/* The name specified by the .symver directive. */
char *versioned_name;
};
+#endif
#define OBJ_SYMFIELD_TYPE struct elf_obj_sy
@@ -90,6 +94,8 @@ extern void elf_frob_file_after_relocs PARAMS ((void));
#define obj_app_file elf_file_symbol
extern void elf_file_symbol PARAMS ((char *));
+extern void obj_elf_section_change_hook PARAMS ((void));
+
extern void obj_elf_section PARAMS ((int));
extern void obj_elf_previous PARAMS ((int));
extern void obj_elf_version PARAMS ((int));
@@ -101,12 +107,25 @@ extern void obj_elf_version PARAMS ((int));
/* 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. */
-#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST,SRC) \
-do \
- { \
- S_SET_SIZE ((DEST), S_GET_SIZE (SRC)); \
- S_SET_OTHER ((DEST), S_GET_OTHER (SRC)); \
- } \
+#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST,SRC) \
+do \
+ { \
+ if ((SRC)->sy_obj.size) \
+ { \
+ if ((DEST)->sy_obj.size == NULL) \
+ (DEST)->sy_obj.size = \
+ (expressionS *) xmalloc (sizeof (expressionS)); \
+ *(DEST)->sy_obj.size = *(SRC)->sy_obj.size; \
+ } \
+ else \
+ { \
+ if ((DEST)->sy_obj.size != NULL) \
+ free ((DEST)->sy_obj.size); \
+ (DEST)->sy_obj.size = NULL; \
+ } \
+ S_SET_SIZE ((DEST), S_GET_SIZE (SRC)); \
+ S_SET_OTHER ((DEST), S_GET_OTHER (SRC)); \
+ } \
while (0)
/* Stabs go in a separate section. */
@@ -124,10 +143,14 @@ extern void obj_elf_init_stab_section PARAMS ((segT));
/* For now, always set ECOFF_DEBUGGING for a MIPS target. */
#ifdef TC_MIPS
+#ifdef MIPS_STABS_ELF
+#define ECOFF_DEBUGGING 0
+#else
#define ECOFF_DEBUGGING 1
-#endif
+#endif /* MIPS_STABS_ELF */
+#endif /* TC_MIPS */
-#if ECOFF_DEBUGGING
+#if (ECOFF_DEBUGGING == 1) || defined(MIPS_STABS_ELF)
/* If we are generating ECOFF debugging information, we need some
additional fields for each symbol. */
@@ -138,6 +161,7 @@ extern void obj_elf_init_stab_section PARAMS ((segT));
struct localsym *ecoff_symbol; \
valueT ecoff_extern_size;
+#ifndef MIPS_STABS_ELF
/* We smuggle stabs in ECOFF rather than using a separate section.
The Irix linker can not handle a separate stabs section. */
#undef SEPARATE_STAB_SECTIONS
@@ -148,6 +172,7 @@ extern void obj_elf_init_stab_section PARAMS ((segT));
#define OBJ_GENERATE_ASM_LINENO(filename, lineno) \
ecoff_generate_asm_lineno ((filename), (lineno))
+#endif /* MIPS_STABS_ELF */
#endif /* ECOFF_DEBUGGING */
extern void elf_frob_symbol PARAMS ((struct symbol *, int *));
@@ -158,7 +183,10 @@ extern void elf_pop_insert PARAMS ((void));
#ifndef OBJ_MAYBE_ELF
#define obj_ecoff_set_ext elf_ecoff_set_ext
-extern void elf_ecoff_set_ext ();
+#ifdef ANSI_PROTOTYPES
+struct ecoff_extr;
+#endif
+extern void elf_ecoff_set_ext PARAMS ((struct symbol *, struct ecoff_extr *));
#endif
#endif /* _OBJ_ELF_H */