--- binutils-2.31.1/gas/write.c.orig 2018-07-06 10:47:19.030146560 +0000 +++ binutils-2.31.1/gas/write.c 2018-10-02 15:36:34.909115392 +0000 @@ -827,6 +827,22 @@ sym = newsym; } + /* Also convert fx_subsy if present */ + if (fixp->fx_subsy != NULL) + { + symbolS *sub_sym = fixp->fx_subsy; + while (symbol_equated_reloc_p (sub_sym) + || S_IS_WEAKREFR (sub_sym)) + { + symbolS *newsym = symbol_get_value_expression (sub_sym)->X_add_symbol; + if (sub_sym == newsym) + break; + fixp->fx_offset -= symbol_get_value_expression (sub_sym)->X_add_number; + fixp->fx_subsy = newsym; + sub_sym = newsym; + } + } + if (symbol_mri_common_p (sym)) { fixp->fx_offset += S_GET_VALUE (sym);