aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-12-12 21:55:28 +0000
committerIan Lance Taylor <ian@airs.com>1996-12-12 21:55:28 +0000
commit73d257842747877c8fed65f4b2ae7aa34111cc66 (patch)
tree4f46b15680ee2254b707ad7633ec2a22d9072b6d /gas/write.c
parente5c3708d54024910f1adc2a12d69791bcab997ed (diff)
downloadgdb-73d257842747877c8fed65f4b2ae7aa34111cc66.zip
gdb-73d257842747877c8fed65f4b2ae7aa34111cc66.tar.gz
gdb-73d257842747877c8fed65f4b2ae7aa34111cc66.tar.bz2
* write.c (adjust_reloc_syms): Make sure that symbols are
resolved; expression symbols may have been skipped. PR 11240.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gas/write.c b/gas/write.c
index b85ffa7..a7649bf 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -669,6 +669,15 @@ adjust_reloc_syms (abfd, sec, xxx)
sym = fixp->fx_addsy;
symsec = sym->bsym->section;
+ /* All symbols should have already been resolved at this
+ point. It is possible to see unresolved expression
+ symbols, though, since they are not in the regular symbol
+ table. */
+ if (sym != NULL && ! sym->sy_resolved)
+ resolve_symbol_value (sym);
+ if (fixp->fx_subsy != NULL && ! fixp->fx_subsy->sy_resolved)
+ resolve_symbol_value (fixp->fx_subsy);
+
if (sym != NULL && sym->sy_mri_common)
{
/* These symbols are handled specially in fixup_segment. */
@@ -912,7 +921,8 @@ write_relocs (abfd, sec, xxx)
data = fixp->fx_frag->fr_literal + fixp->fx_where;
if (fixp->fx_where + fixp->fx_size
> fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
- abort ();
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ "internal error: fixup not contained within frag");
for (j = 0; reloc[j]; j++)
{
s = bfd_install_relocation (stdoutput, reloc[j],