diff --git a/gas/ChangeLog b/gas/ChangeLog index cd2abaf919..8558a87093 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2021-04-06 Jan Beulich + + * write.c (fixup_segment): Move add_symbol_segment declaration + into main loop. + 2021-04-05 Alan Modra * configure.ac: Don't check for string.h, strings.h, stdlib.h, diff --git a/gas/write.c b/gas/write.c index c8e6ab4a6c..706c9c043c 100644 --- a/gas/write.c +++ b/gas/write.c @@ -922,7 +922,6 @@ fixup_segment (fixS *fixP, segT this_segment) { valueT add_number; fragS *fragP; - segT add_symbol_segment = absolute_section; if (fixP != NULL && abs_section_sym == NULL) abs_section_sym = section_symbol (absolute_section); @@ -953,6 +952,8 @@ fixup_segment (fixS *fixP, segT this_segment) for (; fixP; fixP = fixP->fx_next) { + segT add_symbol_segment = absolute_section; + #ifdef DEBUG5 fprintf (stderr, "\nprocessing fixup:\n"); print_fixup (fixP);