diff --git a/gas/ChangeLog b/gas/ChangeLog index 265a272274..31c6291bc5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -2,6 +2,10 @@ * config/tc-score7.c: Replace sprintf with strcpy where appropriate. + (s7_b32_relax_to_b16): Use symbol_get_frag() to access a symbol's + frag. + * config/tc-score.c (s3_relax_branch_inst16): Likewise. + (s3_relax_cmpbranch_inst32): Likewise. 2014-06-07 Alan Modra diff --git a/gas/config/tc-score.c b/gas/config/tc-score.c index 6242b8c5b8..e8c8b6ddb7 100644 --- a/gas/config/tc-score.c +++ b/gas/config/tc-score.c @@ -6854,8 +6854,8 @@ s3_relax_branch_inst16 (fragS * fragp) frag_addr = 0; else { - if (s->bsym != 0) - symbol_address = (addressT) s->sy_frag->fr_address; + if (s->bsym != NULL) + symbol_address = (addressT) symbol_get_frag (s)->fr_address; } inst_value = s3_md_chars_to_number (fragp->fr_literal, s3_INSN16_SIZE); @@ -6901,8 +6901,8 @@ s3_relax_cmpbranch_inst32 (fragS * fragp) frag_addr = 0; else { - if (s->bsym != 0) - symbol_address = (addressT) s->sy_frag->fr_address; + if (s->bsym != NULL) + symbol_address = (addressT) symbol_get_frag (s)->fr_address; } inst_value = s3_md_chars_to_number (fragp->fr_literal, s3_INSN_SIZE); diff --git a/gas/config/tc-score7.c b/gas/config/tc-score7.c index 4719680e0c..7bf0ad6ff1 100644 --- a/gas/config/tc-score7.c +++ b/gas/config/tc-score7.c @@ -5263,8 +5263,8 @@ s7_b32_relax_to_b16 (fragS * fragp) frag_addr = 0; else { - if (s->bsym != 0) - symbol_address = (addressT) s->sy_frag->fr_address; + if (s->bsym != NULL) + symbol_address = (addressT) symbol_get_frag (s)->fr_address; } value = s7_md_chars_to_number (fragp->fr_literal, s7_INSN_SIZE);