aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2019-12-12 11:54:31 -0800
committerH.J. Lu <hjl.tools@gmail.com>2019-12-12 12:03:45 -0800
commitb65d68b8d60338a860e169aac3bac54e6bac60db (patch)
tree9bd5fc4ee054a924acffb61f3a6a557d2abd4f63 /gas/write.c
parent7190276c52b9d86a52aae73d3a0f8b56e7a1f4f1 (diff)
downloadgdb-b65d68b8d60338a860e169aac3bac54e6bac60db.zip
gdb-b65d68b8d60338a860e169aac3bac54e6bac60db.tar.gz
gdb-b65d68b8d60338a860e169aac3bac54e6bac60db.tar.bz2
gas: Add md_generic_table_relax_frag
Add md_generic_table_relax_frag for TC_GENERIC_RELAX_TABLE targets so that a backend can extend relax_frag beyond TC_GENERIC_RELAX_TABLE. * 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.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/write.c b/gas/write.c
index d5da418..d2bdb7a 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -2481,6 +2481,10 @@ write_object_file (void)
}
#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
@@ -3031,7 +3035,8 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
#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;