diff options
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/doc/internals.texi | 5 | ||||
-rw-r--r-- | gas/write.c | 7 |
3 files changed, 18 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index a65b7d3..ef7369c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +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. diff --git a/gas/doc/internals.texi b/gas/doc/internals.texi index a50880d..cb86b5b 100644 --- a/gas/doc/internals.texi +++ b/gas/doc/internals.texi @@ -1210,6 +1210,11 @@ If you do not define @code{md_relax_frag}, you may define 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 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; |