diff options
author | Alan Modra <amodra@gmail.com> | 2001-08-08 13:11:58 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-08-08 13:11:58 +0000 |
commit | 8fd3e36b8404118d6331e42fef1257af6fa54e5e (patch) | |
tree | 8ffec551dceafc0029f0af54b333e4718fc998c5 /gas/config/obj-elf.h | |
parent | 2517a57fdf395c6e5068577d1d4f86b3c6935e6d (diff) | |
download | gdb-8fd3e36b8404118d6331e42fef1257af6fa54e5e.zip gdb-8fd3e36b8404118d6331e42fef1257af6fa54e5e.tar.gz gdb-8fd3e36b8404118d6331e42fef1257af6fa54e5e.tar.bz2 |
* config/obj-elf.c (elf_copy_symbol_attributes): Make it a global
function, and expand old obj-elf.h OBJ_COPY_SYMBOL_ATTRIBUTES here.
* config/obj-elf.h (elf_copy_symbol_attributes): Declare.
(OBJ_COPY_SYMBOL_ATTRIBUTES): Call elf_copy_symbol_attributes.
Diffstat (limited to 'gas/config/obj-elf.h')
-rw-r--r-- | gas/config/obj-elf.h | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h index 8e3ce7d..33c5f43 100644 --- a/gas/config/obj-elf.h +++ b/gas/config/obj-elf.h @@ -182,32 +182,10 @@ void elf_obj_symbol_new_hook PARAMS ((symbolS *)); #define obj_symbol_new_hook elf_obj_symbol_new_hook #endif -/* When setting one symbol equal to another, by default we probably - want them to have the same "size", whatever it means in the current - context. */ +void elf_copy_symbol_attributes PARAMS ((symbolS *, symbolS *)); #ifndef OBJ_COPY_SYMBOL_ATTRIBUTES -#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST,SRC) \ -do \ - { \ - struct elf_obj_sy *srcelf = symbol_get_obj (SRC); \ - struct elf_obj_sy *destelf = symbol_get_obj (DEST); \ - if (srcelf->size) \ - { \ - if (destelf->size == NULL) \ - destelf->size = \ - (expressionS *) xmalloc (sizeof (expressionS)); \ - *destelf->size = *srcelf->size; \ - } \ - else \ - { \ - if (destelf->size != NULL) \ - free (destelf->size); \ - destelf->size = NULL; \ - } \ - S_SET_SIZE ((DEST), S_GET_SIZE (SRC)); \ - S_SET_OTHER ((DEST), S_GET_OTHER (SRC)); \ - } \ -while (0) +#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST, SRC) \ + (elf_copy_symbol_attributes (DEST, SRC)) #endif #ifndef SEPARATE_STAB_SECTIONS |