aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-09-13 17:19:27 +0000
committerIan Lance Taylor <ian@airs.com>1995-09-13 17:19:27 +0000
commitf00f5ecd1dfe466c1a25dd50032f4f1f6d72b9f6 (patch)
tree056fe5625e13e95adcd945b64f88adb35c381f06 /gas/write.c
parent2e977a3ae49f9c9508b2e2ad0113efecebc7a890 (diff)
downloadgdb-f00f5ecd1dfe466c1a25dd50032f4f1f6d72b9f6.zip
gdb-f00f5ecd1dfe466c1a25dd50032f4f1f6d72b9f6.tar.gz
gdb-f00f5ecd1dfe466c1a25dd50032f4f1f6d72b9f6.tar.bz2
* write.c (relax_and_size_seg): Change to the segment we are
relaxing, in case md_convert_frag, called by cvt_frag_to_fill, wants to call fix_new. * config/tc-m68k.c (m68k_ip): Permit PC relative code if the segment of the symbol is the current segment, not just in text_section. (md_convert_frag_1): Don't call subseg_change. (md_estimate_size_before_relax): Likewise.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gas/write.c b/gas/write.c
index 2539990..6dd4ff1 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -130,6 +130,12 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel,
fixP->fx_frag = frag;
fixP->fx_where = where;
fixP->fx_size = size;
+ /* We've made fx_size a narrow field; check that it's wide enough. */
+ if (fixP->fx_size != size)
+ {
+ as_bad ("field fx_size too small to hold %d", size);
+ abort ();
+ }
fixP->fx_addsy = add_symbol;
fixP->fx_subsy = sub_symbol;
fixP->fx_offset = offset;
@@ -142,12 +148,11 @@ fix_new_internal (frag, where, size, add_symbol, sub_symbol, offset, pcrel,
fixP->fx_pcrel_adjust = 0;
fixP->fx_bit_fixP = 0;
fixP->fx_addnumber = 0;
- fixP->tc_fix_data = NULL;
fixP->fx_tcbit = 0;
fixP->fx_done = 0;
-#if defined (TC_I960) || defined (TC_NS32K)
- fixP->fx_bsr = 0;
+#ifdef TC_FIX_TYPE
+ TC_INIT_FIX_DATA(fixP);
#endif
as_where (&fixP->fx_file, &fixP->fx_line);
@@ -502,6 +507,8 @@ relax_and_size_seg (abfd, sec, xxx)
int x;
valueT size, newsize;
+ subseg_change (sec, 0);
+
flags = bfd_get_section_flags (abfd, sec);
seginfo = seg_info (sec);
@@ -2323,7 +2330,7 @@ fixup_segment (fixP, this_segment_type)
as to whether or not a relocation will be needed to
handle this fixup. */
- if (TC_FORCE_RELOCATION (fixP))
+ if (!TC_FORCE_RELOCATION (fixP))
{
fixP->fx_addsy = NULL;
add_symbolP = NULL;