From b58c9faf2fef1746403a4e4734654dd8a57fad82 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 24 May 2001 23:52:22 +0000 Subject: [PATCH] From 2.11 branch 2001-03-30 Richard Henderson * config/tc-i386.c (md_convert_frag): Don't die on local symbols that have been finalized. --- gas/ChangeLog | 4 ++++ gas/config/tc-i386.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index f9a03e2f896..6f5b600418c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ 2001-05-25 Alan Modra + From 2.11 branch 2001-03-30 Richard Henderson + * config/tc-i386.c (md_convert_frag): Don't die on local symbols + that have been finalized. + * symbols.c (resolve_symbol_value): Clear sy_resolving before taking exit_dont_set_value. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index a710532500a..2a13bd93298 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -4049,7 +4049,12 @@ md_convert_frag (abfd, sec, fragP) target_address = S_GET_VALUE (fragP->fr_symbol) + fragP->fr_offset; #ifdef BFD_ASSEMBLER /* Not needed otherwise? */ - target_address += symbol_get_frag (fragP->fr_symbol)->fr_address; + { + /* Local symbols which have already been resolved have a NULL frag. */ + fragS *sym_frag = symbol_get_frag (fragP->fr_symbol); + if (sym_frag) + target_address += sym_frag->fr_address; + } #endif /* Address opcode resides at in file space. */ -- 2.30.2