aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1993-10-21 20:03:19 +0000
committerKen Raeburn <raeburn@cygnus>1993-10-21 20:03:19 +0000
commitefa0c22e67c2858aec856d734b2a89da68cde606 (patch)
treef9dd3d6dcd31640c93f951bdb3eb265485452224 /gas/write.c
parent2d4f509a1f37b5fce0c713f5201e6a250753bf6e (diff)
downloadgdb-efa0c22e67c2858aec856d734b2a89da68cde606.zip
gdb-efa0c22e67c2858aec856d734b2a89da68cde606.tar.gz
gdb-efa0c22e67c2858aec856d734b2a89da68cde606.tar.bz2
Various arious PA changes from Utah.
V9 bugfix. See changelog...
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c33
1 files changed, 28 insertions, 5 deletions
diff --git a/gas/write.c b/gas/write.c
index 38771b4..2b8aec9 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -544,6 +544,15 @@ adjust_reloc_syms (abfd, sec, xxx)
continue;
}
#endif
+
+ /* Is there some other (target cpu dependent) reason we can't adjust
+ this one? (E.g. relocations involving function addresses on
+ the PA. */
+#ifdef tc_fix_adjustable
+ if (! tc_fix_adjustable (fixp))
+ continue;
+#endif
+
/* If the section symbol isn't going to be output, the relocs
at least should still work. If not, figure out what to do
when we run into that case. */
@@ -858,6 +867,7 @@ relax_and_size_all_segments ()
bss_address_frag.fr_address = (H_GET_TEXT_SIZE (&headers) +
H_GET_DATA_SIZE (&headers));
+#endif /* ! OBJ_BOUT */
/* Slide all the frags */
if (bss_frag_root)
@@ -870,8 +880,6 @@ relax_and_size_all_segments ()
} /* for each bss frag */
}
-#endif /* ! OBJ_BOUT */
-
if (bss_last_frag)
H_SET_BSS_SIZE (&headers,
bss_last_frag->fr_address - bss_frag_root->fr_address);
@@ -1865,6 +1873,7 @@ fixup_segment (fixP, this_segment_type)
add_symbolP = NULL;
fixP->fx_addsy = NULL;
}
+#if !defined(SEG_DIFF_ALLOWED) && !defined (GLOBAL_DIFF_ALLOWED)
else
{
/* Different segments in subtraction. */
@@ -1896,6 +1905,14 @@ fixup_segment (fixP, this_segment_type)
segment_name (S_GET_SEGMENT (sub_symbolP)),
S_GET_NAME (sub_symbolP), buf);
}
+#else
+ else
+ {
+ seg_reloc_count++;
+ fixP->fx_addnumber = add_number; /* Remember value for emit_reloc */
+ continue;
+ } /* if absolute */
+#endif
}
}
@@ -1920,7 +1937,9 @@ fixup_segment (fixP, this_segment_type)
add_number += S_GET_VALUE (add_symbolP);
add_number -= md_pcrel_from (fixP);
pcrel = 0; /* Lie. Don't want further pcrel processing. */
+#ifndef TC_HPPA
fixP->fx_addsy = NULL; /* No relocations please. */
+#endif
}
else
{
@@ -1994,10 +2013,14 @@ fixup_segment (fixP, this_segment_type)
if ((add_number & mask) != 0
&& (add_number & mask) != mask)
{
- char buf[50];
+ char buf[50], buf2[50];
sprint_value (buf, fragP->fr_address + where);
- as_bad ("Value of %ld too large for field of %d bytes at %s",
- (long) add_number, size, buf);
+ if (add_number > 1000)
+ sprint_value (buf2, add_number);
+ else
+ sprintf (buf2, "%d", (long) add_number);
+ as_bad ("Value of %s too large for field of %d bytes at %s",
+ buf2, size, buf);
} /* generic error checking */
#ifdef WARN_SIGNED_OVERFLOW_WORD
/* Warn if a .word value is too large when treated as a signed