* obj.h (struct format_ops): Add adjust_symtab.
authorAlan Modra <amodra@gmail.com>
Mon, 25 Oct 2010 12:38:42 +0000 (12:38 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 25 Oct 2010 12:38:42 +0000 (12:38 +0000)
* config/obj-multi.h (obj_adjust_symtab): Define.
* config/obj-aout.c (aout_format_ops): Init new field.
* config/obj-coff.c (coff_format_ops): Likewise.
* config/obj-ecoff.c (ecoff_format_ops): Likewise.
* config/obj-elf.c (elf_format_ops): Likewise.

gas/ChangeLog
gas/config/obj-aout.c
gas/config/obj-coff.c
gas/config/obj-ecoff.c
gas/config/obj-elf.c
gas/config/obj-multi.h
gas/obj.h

index 020f927..121be85 100644 (file)
@@ -1,3 +1,12 @@
+2010-10-25  Mark Mitchell  <mark@codesourcery.com>
+
+       * obj.h (struct format_ops): Add adjust_symtab.
+       * config/obj-multi.h (obj_adjust_symtab): Define.
+       * config/obj-aout.c (aout_format_ops): Init new field.
+       * config/obj-coff.c (coff_format_ops): Likewise.
+       * config/obj-ecoff.c (ecoff_format_ops): Likewise.
+       * config/obj-elf.c (elf_format_ops): Likewise.
+
 2010-10-25  Alan Modra  <amodra@gmail.com>
 
        PR gas/12049
index 366fc5b..32c68aa 100644 (file)
@@ -309,8 +309,9 @@ const struct format_ops aout_format_ops =
   aout_pop_insert,
   0,   /* ecoff_set_ext.  */
   0,   /* read_begin_hook.  */
-  0,   /* symbol_new_hook.  */
-  0    /* symbol_clone_hook.  */
+  0,   /* symbol_new_hook.  */
+  0,   /* symbol_clone_hook.  */
+  0    /* adjust_symtab.  */
 };
 
 const pseudo_typeS aout_pseudo_table[] =
index d0a4999..04695ba 100644 (file)
@@ -1943,5 +1943,6 @@ const struct format_ops coff_format_ops =
   0,   /* ecoff_set_ext */
   coff_obj_read_begin_hook,
   coff_obj_symbol_new_hook,
-  coff_obj_symbol_clone_hook
+  coff_obj_symbol_clone_hook,
+  coff_obj_adjust_symtab
 };
index ad9f250..a3e5308 100644 (file)
@@ -1,6 +1,6 @@
 /* ECOFF object file format.
    Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
-   2005, 2007, 2009  Free Software Foundation, Inc.
+   2005, 2007, 2009, 2010  Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    This file was put together by Ian Lance Taylor <ian@cygnus.com>.
 
@@ -315,5 +315,6 @@ const struct format_ops ecoff_format_ops =
   ecoff_set_ext,
   ecoff_read_begin_hook,
   ecoff_symbol_new_hook,
-  ecoff_symbol_clone_hook
+  ecoff_symbol_clone_hook,
+  0    /* adjust_symtab.  */
 };
index 9f73616..79f8033 100644 (file)
@@ -2446,5 +2446,6 @@ const struct format_ops elf_format_ops =
 #endif
   elf_obj_read_begin_hook,
   elf_obj_symbol_new_hook,
-  0
+  0,
+  elf_adjust_symtab
 };
index b78e836..353162e 100644 (file)
@@ -1,5 +1,5 @@
 /* Multiple object format emulation.
-   Copyright 1995, 1996, 1997, 1999, 2000, 2002, 2004, 2005, 2007, 2009
+   Copyright 1995, 1996, 1997, 1999, 2000, 2002, 2004, 2005, 2007, 2009, 2010
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
         ? (*this_format->sec_sym_ok_for_reloc) (A)     \
         : 0)
 
+#define obj_adjust_symtab()                            \
+       (this_format->adjust_symtab                     \
+        ? (*this_format->adjust_symtab) ()             \
+        : (void) 0)
+
 #define S_GET_SIZE                                     \
        (*this_format->s_get_size)
 
index 7dc33e6..c2d4836 100644 (file)
--- a/gas/obj.h
+++ b/gas/obj.h
@@ -2,7 +2,7 @@
    format backends.
 
    Copyright 1987, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1999, 2000,
-   2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+   2002, 2003, 2004, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -72,6 +72,7 @@ struct format_ops {
   void (*read_begin_hook) (void);
   void (*symbol_new_hook) (symbolS *);
   void (*symbol_clone_hook) (symbolS *, symbolS *);
+  void (*adjust_symtab) (void);
 };
 
 extern const struct format_ops elf_format_ops;