merge from gcc
[external/binutils.git] / gas / ecoff.c
index 2fecf73..f4e22ac 100644 (file)
@@ -1,6 +1,6 @@
 /* ECOFF debugging support.
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006, 2007, 2008
+   2003, 2004, 2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    This file was put together by Ian Lance Taylor <ian@cygnus.com>.  A
@@ -1506,6 +1506,16 @@ ecoff_symbol_new_hook (symbolS *symbolP)
   obj->ecoff_symbol = NULL;
   obj->ecoff_extern_size = 0;
 }
+
+void
+ecoff_symbol_clone_hook (symbolS *newsymP, symbolS *orgsymP)
+{
+  OBJ_SYMFIELD_TYPE *n, *o;
+
+  n = symbol_get_obj (newsymP);
+  o = symbol_get_obj (orgsymP);
+  memcpy (n, o, sizeof *n);
+}
 \f
 /* Add a page to a varray object.  */
 
@@ -3323,7 +3333,7 @@ mark_stabs (int ignore ATTRIBUTE_UNUSED)
     {
       /* Add a dummy @stabs dymbol.  */
       stabs_seen = 1;
-      (void) add_ecoff_symbol (stabs_symbol, stNil, scInfo,
+      (void) add_ecoff_symbol (stabs_symbol, st_Nil, sc_Info,
                               (symbolS *) NULL,
                               (bfd_vma) 0, (symint_t) -1,
                               ECOFF_MARK_STAB (0));
@@ -3616,7 +3626,7 @@ ecoff_add_bytes (char **buf,
   if (need < PAGE_SIZE)
     need = PAGE_SIZE;
   want = (*bufend - *buf) + need;
-  *buf = xrealloc (*buf, want);
+  *buf = (char *) xrealloc (*buf, want);
   *bufend = *buf + want;
   return *buf + at;
 }
@@ -4129,7 +4139,7 @@ ecoff_build_symbols (const struct ecoff_debug_swap *backend,
                        sym_ptr->ecoff_sym.asym.iss =
                          begin_ptr->ecoff_sym.asym.iss;
 
-                     begin_type = begin_ptr->ecoff_sym.asym.st;
+                     begin_type = (st_t) begin_ptr->ecoff_sym.asym.st;
                      if (begin_type == st_File
                          || begin_type == st_Block)
                        {
@@ -4697,7 +4707,7 @@ ecoff_build_debug (HDRR *hdr,
 
   /* Build the symbolic information.  */
   offset = 0;
-  buf = xmalloc (PAGE_SIZE);
+  buf = (char *) xmalloc (PAGE_SIZE);
   bufend = buf + PAGE_SIZE;
 
   /* Build the line number information.  */