+2019-12-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * write.c (md_generic_table_relax_frag): New. Defined to
+ relax_frag if not defined.
+ (relax_segment): Call md_generic_table_relax_frag instead of
+ relax_frag.
+
2019-12-12 Alan Modra <amodra@gmail.com>
* config/tc-aarch64.c (get_aarch64_insn): Avoid signed overflow.
machine independent code knows how to use such a table to relax PC relative
references. See @file{tc-m68k.c} for an example. @xref{Relaxation}.
+@item md_generic_table_relax_frag
+@cindex md_generic_table_relax_frag
+If defined, it is a C statement that is invoked, instead of
+the default implementation, to scan @code{TC_GENERIC_RELAX_TABLE}.
+
@item md_prepare_relax_scan
@cindex md_prepare_relax_scan
If defined, it is a C statement that is invoked prior to scanning
}
#ifdef TC_GENERIC_RELAX_TABLE
+#ifndef md_generic_table_relax_frag
+#define md_generic_table_relax_frag relax_frag
+#endif
+
/* Relax a fragment by scanning TC_GENERIC_RELAX_TABLE. */
long
#ifdef TC_GENERIC_RELAX_TABLE
/* The default way to relax a frag is to look through
TC_GENERIC_RELAX_TABLE. */
- growth = relax_frag (segment, fragP, stretch);
+ growth = md_generic_table_relax_frag (segment, fragP,
+ stretch);
#endif /* TC_GENERIC_RELAX_TABLE */
#endif
break;