diff options
author | Ken Raeburn <raeburn@cygnus> | 1994-09-19 16:40:00 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@cygnus> | 1994-09-19 16:40:00 +0000 |
commit | 80d80c640ac7762bafe27916e71ca087ed5e2762 (patch) | |
tree | ade3875931ff5299e207257cfa1017a73b73ca39 /gas/read.c | |
parent | 9a36b83fcb37be9397982987720f89a9e195a2fc (diff) | |
download | gdb-80d80c640ac7762bafe27916e71ca087ed5e2762.zip gdb-80d80c640ac7762bafe27916e71ca087ed5e2762.tar.gz gdb-80d80c640ac7762bafe27916e71ca087ed5e2762.tar.bz2 |
* read.c (pseudo_set, case O_symbol): If OBJ_COPY_SYMBOL_ATTRIBUTES is defined,
invoke it.
[BFD_ASSEMBLER]: Copy BSF_FUNCTION setting too.
* config/obj-elf.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Define.
Also minor VMS support from Pat Rankin.
Diffstat (limited to 'gas/read.c')
-rw-r--r-- | gas/read.c | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -1467,6 +1467,9 @@ s_text (ignore) temp = get_absolute_expression (); subseg_set (text_section, (subsegT) temp); demand_empty_rest_of_line (); +#ifdef OBJ_VMS + const_flag &= ~IN_DEFAULT_SECTION; +#endif } /* s_text() */ @@ -1580,7 +1583,9 @@ pseudo_set (symbolP) symbolP->sy_value = exp; else { - S_SET_SEGMENT (symbolP, S_GET_SEGMENT (exp.X_add_symbol)); + symbolS *s = exp.X_add_symbol; + + S_SET_SEGMENT (symbolP, S_GET_SEGMENT (s)); #if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER) if (ext) S_SET_EXTERNAL (symbolP); @@ -1588,8 +1593,17 @@ pseudo_set (symbolP) S_CLEAR_EXTERNAL (symbolP); #endif /* OBJ_AOUT or OBJ_BOUT */ S_SET_VALUE (symbolP, - exp.X_add_number + S_GET_VALUE (exp.X_add_symbol)); - symbolP->sy_frag = exp.X_add_symbol->sy_frag; + 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 } break; |