* config/obj-aout.c: Include aout/aout64.h.
[deliverable/binutils-gdb.git] / gas / config / obj-aout.c
index c074df2cd58d6fedb7caf50c4f4c3845b1768d00..b43826fc0156c5cfeff959a7e3009ef3f01b5fe4 100644 (file)
@@ -19,6 +19,7 @@ to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
 
 #include "as.h"
 #include "aout/stab_gnu.h"
+#include "aout/aout64.h"
 #include "obstack.h"
 
 #ifndef BFD_ASSEMBLER
@@ -30,11 +31,8 @@ const short seg_N_TYPE[] =
   N_DATA,
   N_BSS,
   N_UNDF,                      /* unknown */
-  N_UNDF,                      /* absent */
-  N_UNDF,                      /* pass1 */
   N_UNDF,                      /* error */
-  N_UNDF,                      /* bignum/flonum */
-  N_UNDF,                      /* difference */
+  N_UNDF,                      /* expression */
   N_UNDF,                      /* debug */
   N_UNDF,                      /* ntv */
   N_UNDF,                      /* ptv */
@@ -110,17 +108,6 @@ obj_aout_frob_symbol (sym, punt)
   asection *sec;
   int desc, type, other;
 
-  /* Is this part format-dependent?  */
-  if (sym->sy_forward)
-    {
-      S_SET_VALUE (sym,
-                  S_GET_VALUE (sym)
-                  + S_GET_VALUE (sym->sy_forward)
-                  + sym->sy_forward->sy_frag->fr_address
-                  );
-      sym->sy_forward = 0;
-    }
-
   flags = sym->bsym->flags;
   desc = S_GET_DESC (sym);
   type = S_GET_TYPE (sym);
@@ -128,13 +115,25 @@ obj_aout_frob_symbol (sym, punt)
   sec = sym->bsym->section;
 
   /* Only frob simple symbols this way right now.  */
-  if (! (type & ~0x1f))
+  if (! (type & ~ (N_TYPE | N_EXT)))
     {
       if (sec == &bfd_abs_section
          || sec == &bfd_und_section)
        return;
       if (flags & BSF_EXPORT)
-       type |= 1;
+       type |= N_EXT;
+
+      /* Set the debugging flag for constructor symbols so that BFD
+        leaves them alone.  */
+      switch (type & N_TYPE)
+       {
+       case N_SETA:
+       case N_SETT:
+       case N_SETD:
+       case N_SETB:
+         sym->bsym->flags |= BSF_DEBUGGING;
+         break;
+       }
     }
   else
     {
@@ -450,19 +449,6 @@ obj_crawl_symbol_chain (headers)
   symbolS **symbolPP;
   int symbol_number = 0;
 
-  /* JF deal with forward references first... */
-  for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP))
-    {
-      if (symbolP->sy_forward)
-       {
-         S_SET_VALUE (symbolP, S_GET_VALUE (symbolP)
-                      + S_GET_VALUE (symbolP->sy_forward)
-                      + symbolP->sy_forward->sy_frag->fr_address);
-
-         symbolP->sy_forward = 0;
-       }                       /* if it has a forward reference */
-    }                          /* walk the symbol chain */
-
   tc_crawl_symbol_chain (headers);
 
   symbolPP = &symbol_rootP;    /*->last symbol chain link. */
@@ -473,7 +459,7 @@ obj_crawl_symbol_chain (headers)
          S_SET_SEGMENT (symbolP, SEG_TEXT);
        }                       /* if pusing data into text */
 
-      S_SET_VALUE (symbolP, S_GET_VALUE (symbolP) + symbolP->sy_frag->fr_address);
+      resolve_symbol_value (symbolP);
 
       /* OK, here is how we decide which symbols go out into the brave
         new symtab.  Symbols that do are:
This page took 0.026027 seconds and 4 git commands to generate.