At the very least this has been causing bogus diagnostics, e.g.
.text
.data
.long .bss - .
.long -.text
.bss
yielding
Error: can't resolve `0' {.bss section} - `.text' {.text section}
instead of
Error: can't resolve `0' {*ABS* section} - `.text' {.text section}
In particular for targets overriding any of TC_FORCE_RELOCATION_* & Co
or for ones setting md_register_arithmetic to true the problems may be
worse.
+2021-04-06 Jan Beulich <jbeulich@suse.com>
+
+ * write.c (fixup_segment): Move add_symbol_segment declaration
+ into main loop.
+
2021-04-05 Alan Modra <amodra@gmail.com>
* configure.ac: Don't check for string.h, strings.h, stdlib.h,
{
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);
for (; fixP; fixP = fixP->fx_next)
{
+ segT add_symbol_segment = absolute_section;
+
#ifdef DEBUG5
fprintf (stderr, "\nprocessing fixup:\n");
print_fixup (fixP);