aboutsummaryrefslogtreecommitdiff
path: root/gas/read.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-09-21 22:21:25 +0000
committerKen Raeburn <raeburn@cygnus>1994-09-21 22:21:25 +0000
commitef1988706623f7b739ec04a035dcd846f13da106 (patch)
treef8816fcfbd82a1a26b140cd6923bef61702eba40 /gas/read.c
parentba466c4c9d804a31b9f9d28b2d9cd11a5ccb141f (diff)
downloadgdb-ef1988706623f7b739ec04a035dcd846f13da106.zip
gdb-ef1988706623f7b739ec04a035dcd846f13da106.tar.gz
gdb-ef1988706623f7b739ec04a035dcd846f13da106.tar.bz2
Combine two existing mechanisms for copying symbol attributes, and fix a bug:
* symbols.c (copy_symbol_attributes): New function. Copies BFD symbol flags and calls OBJ_COPY_SYMBOL_ATTRIBUTES. (resolve_symbol_value, case O_symbol): Call it, if X_add_number is zero. Don't call obj_frob_forward_symbol. * read.c (pseudo_set): Call copy_symbol_attributes, but only if X_add_number is zero. * config/obj-elf.h (obj_frob_forward_symbol): Deleted.
Diffstat (limited to 'gas/read.c')
-rw-r--r--gas/read.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/gas/read.c b/gas/read.c
index 305cd61..48739de 100644
--- a/gas/read.c
+++ b/gas/read.c
@@ -1579,7 +1579,8 @@ pseudo_set (symbolP)
break;
case O_symbol:
- if (S_GET_SEGMENT (exp.X_add_symbol) == undefined_section)
+ if (S_GET_SEGMENT (exp.X_add_symbol) == undefined_section
+ || exp.X_add_number != 0)
symbolP->sy_value = exp;
else
{
@@ -1595,15 +1596,7 @@ pseudo_set (symbolP)
S_SET_VALUE (symbolP,
exp.X_add_number + S_GET_VALUE (s));
symbolP->sy_frag = s->sy_frag;
-#ifdef BFD_ASSEMBLER
- /* In an expression, transfer the settings of these flags.
- The user can override later, of course. */
-#define COPIED_SYMFLAGS (BSF_FUNCTION)
- symbolP->bsym->flags |= s->bsym->flags & COPIED_SYMFLAGS;
-#endif
-#ifdef OBJ_COPY_SYMBOL_ATTRIBUTES
- OBJ_COPY_SYMBOL_ATTRIBUTES (symbolP, s);
-#endif
+ copy_symbol_attributes (symbolP, s);
}
break;