* ecoff.h (ecoff_symbol_clone_hook): Declare.
* obj.h (struct format_ops): Add symbol_clone_hook.
* 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.
* config/obj-ecoff.h (obj_symbol_clone_hook): Define.
* config/obj-multi.h (obj_symbol_clone_hook): Define.
+2009-11-02 Alan Modra <amodra@bigpond.net.au>
+
+ * ecoff.c (ecoff_symbol_clone_hook): New function.
+ * ecoff.h (ecoff_symbol_clone_hook): Declare.
+ * obj.h (struct format_ops): Add symbol_clone_hook.
+ * 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.
+ * config/obj-ecoff.h (obj_symbol_clone_hook): Define.
+ * config/obj-multi.h (obj_symbol_clone_hook): Define.
+
2009-11-02 Alan Modra <amodra@bigpond.net.au>
* messages.c (as_fatal): Apply 2001-01-15 change and followup
aout_pop_insert,
0, /* ecoff_set_ext. */
0, /* read_begin_hook. */
- 0 /* symbol_new_hook. */
+ 0, /* symbol_new_hook. */
+ 0 /* symbol_clone_hook. */
};
const pseudo_typeS aout_pseudo_table[] =
coff_pop_insert,
0, /* ecoff_set_ext */
coff_obj_read_begin_hook,
- coff_obj_symbol_new_hook
+ coff_obj_symbol_new_hook,
+ coff_obj_symbol_clone_hook
};
ecoff_pop_insert,
ecoff_set_ext,
ecoff_read_begin_hook,
- ecoff_symbol_new_hook
+ ecoff_symbol_new_hook,
+ ecoff_symbol_clone_hook
};
/* ECOFF object file format header file.
Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2002, 2004, 2005,
- 2007 Free Software Foundation, Inc.
+ 2007, 2009 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Ian Lance Taylor <ian@cygnus.com>.
/* We use the ECOFF functions as our hooks. */
#define obj_read_begin_hook ecoff_read_begin_hook
#define obj_symbol_new_hook ecoff_symbol_new_hook
+#define obj_symbol_clone_hook ecoff_symbol_clone_hook
/* Record file switches in the ECOFF symbol table. */
#define obj_app_file(name, app) ecoff_new_file (name, app)
0, /* ecoff_set_ext */
#endif
elf_obj_read_begin_hook,
- elf_obj_symbol_new_hook
+ elf_obj_symbol_new_hook,
+ 0
};
? (*this_format->symbol_new_hook) (S) \
: (void) 0)
+#define obj_symbol_clone_hook(N, O) \
+ (this_format->symbol_clone_hook \
+ ? (*this_format->symbol_clone_hook) (N, O) \
+ : (void) 0)
+
#define obj_sec_sym_ok_for_reloc(A) \
(this_format->sec_sym_ok_for_reloc \
? (*this_format->sec_sym_ok_for_reloc) (A) \
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. */
/* ecoff.h -- header file for ECOFF debugging support
- Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2004, 2005, 2007
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2004, 2005,
+ 2007, 2009 Free Software Foundation, Inc.
Contributed by Cygnus Support.
Put together by Ian Lance Taylor <ian@cygnus.com>.
obj_symbol_new_hook. */
extern void ecoff_symbol_new_hook (symbolS *);
+extern void ecoff_symbol_clone_hook (symbolS *, symbolS *);
+
/* This function should be called by the obj_frob_symbol hook. */
extern void ecoff_frob_symbol (symbolS *);