Add binutils support for v850e1 processor
[deliverable/binutils-gdb.git] / gas / config / obj-bout.h
index 60f28e0661f76a349e08774080afdf5b7becc75c..374abbcc5586ec19d1cb21a1b31eda2d8996af77 100644 (file)
@@ -1,5 +1,6 @@
 /* b.out object file format
-   Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
+   Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000,
+   2002, 2003 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -15,8 +16,8 @@
 
    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. */
+   to the Free Software Foundation, 59 Temple Place - Suite 330, Cambridge, MA
+   02139, USA.  */
 
 /*
  * This file is a modified version of 'a.out.h'.  It is to be used in all GNU
  *       relocation info are never sent to the target.
  */
 
-
 #define OBJ_BOUT 1
 
-#include "targ-cpu.h"
+#define OUTPUT_FLAVOR bfd_target_aout_flavour
 
-/* We want \v. */
-#define BACKSLASH_V 1
+#include "targ-cpu.h"
 
 #define OBJ_DEFAULT_OUTPUT_FILE_NAME   "b.out"
 
@@ -108,7 +107,7 @@ struct exec
   };
 
 #define N_BADMAG(x)    (((x).a_magic)!=BMAGIC)
-#define N_TXTOFF(x)    ( sizeof(struct exec) )
+#define N_TXTOFF(x)    ( sizeof (struct exec) )
 #define N_DATOFF(x)    ( N_TXTOFF(x) + (x).a_text )
 #define N_TROFF(x)     ( N_DATOFF(x) + (x).a_data )
 #define N_DROFF(x)     ( N_TROFF(x) + (x).a_trsize )
@@ -182,25 +181,36 @@ struct relocation_info
 
 /* True if symbol has been defined, ie is in N_{TEXT,DATA,BSS,ABS} or N_EXT */
 #define S_IS_DEFINED(s)                ((S_GET_TYPE(s) != N_UNDF) || (S_GET_DESC(s) != 0))
+
+/* Return true for symbols that should not be reduced to section
+   symbols or eliminated from expressions, because they may be
+   overridden by the linker.  */
+#define S_FORCE_RELOC(s, strict) \
+  (!SEG_NORMAL (S_GET_SEGMENT (s)))
+
+#define S_IS_COMMON(s) \
+  (S_GET_TYPE (s) == N_UNDF && S_GET_VALUE (s) != 0)
+
 #define S_IS_REGISTER(s)       ((s)->sy_symbol.n_type == N_REGISTER)
 
 /* True if a debug special symbol entry */
 #define S_IS_DEBUG(s)          ((s)->sy_symbol.n_type & N_STAB)
 /* True if a symbol is local symbol name */
-/* A symbol name whose name begin with ^A is a gas internal pseudo symbol
-   nameless symbols come from .stab directives. */
-#define S_IS_LOCAL(s)          (S_GET_NAME(s) && \
-                                !S_IS_DEBUG(s) && \
-                                (S_GET_NAME(s)[0] == '\001' || \
-                                 (S_LOCAL_NAME(s) && !flagseen['L'])))
+#define S_IS_LOCAL(s)                                  \
+  ((S_GET_NAME (s)                                     \
+    && !S_IS_DEBUG (s)                                         \
+    && (strchr (S_GET_NAME (s), '\001') != NULL                \
+        || strchr (S_GET_NAME (s), '\002') != NULL     \
+        || (S_LOCAL_NAME(s) && !flag_keep_locals)))    \
+   || (flag_strip_local_absolute                       \
+       && !S_IS_EXTERNAL(s)                            \
+       && S_GET_SEGMENT(s) == absolute_section))
 /* True if a symbol is not defined in this file */
 #define S_IS_EXTERN(s)         ((s)->sy_symbol.n_type & N_EXT)
 /* True if the symbol has been generated because of a .stabd directive */
 #define S_IS_STABD(s)          (S_GET_NAME(s) == NULL)
 
 /* Accessors */
-/* The value of the symbol */
-#define S_GET_VALUE(s)         ((unsigned long) ((s)->sy_symbol.n_value))
 /* The name of the symbol */
 #define S_GET_NAME(s)          ((s)->sy_symbol.n_un.n_name)
 /* The pointer to the string table */
@@ -215,8 +225,6 @@ struct relocation_info
 #define S_GET_DESC(s)          ((s)->sy_symbol.n_desc)
 
 /* Modifiers */
-/* Set the value of the symbol */
-#define S_SET_VALUE(s,v)       ((s)->sy_symbol.n_value = (unsigned long) (v))
 /* Assume that a symbol cannot be simultaneously in more than on segment */
 /* set segment */
 #define S_SET_SEGMENT(s,seg)   ((s)->sy_symbol.n_type &= ~N_TYPE,(s)->sy_symbol.n_type|=SEGMENT_TO_SYMBOL_TYPE(seg))
@@ -232,17 +240,19 @@ struct relocation_info
 #define S_SET_OTHER(s,v)       ((s)->sy_symbol.n_other = (v))
 /* Set the n_desc expression value */
 #define S_SET_DESC(s,v)                ((s)->sy_symbol.n_desc = (v))
+/* Set the n_type value */
+#define S_SET_TYPE(s,v)                ((s)->sy_symbol.n_type = (v))
 
 /* File header macro and type definition */
 
-#define H_GET_FILE_SIZE(h)     (sizeof(struct exec) + \
+#define H_GET_FILE_SIZE(h)     (sizeof (struct exec) + \
                                 H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \
                                 H_GET_SYMBOL_TABLE_SIZE(h) + \
                                 H_GET_TEXT_RELOCATION_SIZE(h) + \
                                 H_GET_DATA_RELOCATION_SIZE(h) + \
                                 (h)->string_table_size)
 
-#define H_GET_HEADER_SIZE(h)           (sizeof(struct exec))
+#define H_GET_HEADER_SIZE(h)           (sizeof (struct exec))
 #define H_GET_TEXT_SIZE(h)             ((h)->header.a_text)
 #define H_GET_DATA_SIZE(h)             ((h)->header.a_data)
 #define H_GET_BSS_SIZE(h)              ((h)->header.a_bss)
@@ -271,7 +281,7 @@ struct relocation_info
 #define H_SET_TEXT_RELOCATION_SIZE(h,v)        ((h)->header.a_trsize = (v))
 #define H_SET_DATA_RELOCATION_SIZE(h,v)        ((h)->header.a_drsize = (v))
 #define H_SET_SYMBOL_TABLE_SIZE(h,v)   ((h)->header.a_syms = (v) * \
-                                        sizeof(struct nlist))
+                                        sizeof (struct nlist))
 
 #define H_SET_MAGIC_NUMBER(h,v)                ((h)->header.a_magic = (v))
 
@@ -284,37 +294,26 @@ struct relocation_info
 #define H_SET_VERSION(h,v)             ((h)->header.a_version = (v))
 #endif /* EXEC_VERSION */
 
-/*
- * Current means for getting the name of a segment.
- * This will change for infinite-segments support (e.g. COFF).
- */
-#define        segment_name(seg)  ( seg_name[(int)(seg)] )
-extern char *const seg_name[];
-
 typedef struct
   {
     struct exec header;                /* a.out header */
-    long string_table_size;    /* names + '\0' + sizeof(int) */
+    long string_table_size;    /* names + '\0' + sizeof (int) */
   }
 
 object_headers;
 
-/* unused hooks. */
+/* unused hooks.  */
 #define OBJ_EMIT_LINENO(a, b, c)       {;}
 #define obj_pre_write_hook(a)          {;}
 
 #if __STDC__
 struct fix;
-void tc_aout_fix_to_chars (char *where, struct fix *fixP, relax_addressT segment_address);
-#else /* not __STDC__ */
-void tc_aout_fix_to_chars ();
-#endif /* not __STDC__ */
-
-/*
- * Local Variables:
- * comment-column: 0
- * fill-column: 131
- * End:
- */
-
-/* end of obj-bout.h */
+#endif
+extern void tc_aout_fix_to_chars PARAMS ((char *where,
+                                         struct fix *fixP,
+                                         relax_addressT segment_address));
+extern void tc_bout_fix_to_chars PARAMS ((char *where,
+                                         struct fix *fixP,
+                                         relax_addressT segment_address));
+
+#define AOUT_STABS
This page took 0.04749 seconds and 4 git commands to generate.