This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: The relax finalize pass has broken relax for h8300-coff


On Wed, Nov 26, 2003 at 04:10:06PM +0530, Asgari J. Jinia wrote:
> Hi,
> 
> There are many errors when using -relax for h8300-coff. 
> The 16 bit PC relative branch to 8 bit PC relative branch ( R_PCRWORD ) relaxation is done for boundary cases and "relocation truncated to fit" error occurs for other cases.
> 
> Adding -relax option for C code with call to sin(), cos(), malloc(), free() etc gives relocation truncated o fit error.
> 

This patch should fix the problem.


H.J.
----
2003-11-26  H.J. Lu  <hongjiu.lu@intel.com>

	* reloc16.c (bfd_coff_reloc16_relax_section): Do nothing for
	the relax finalize pass.

--- bfd/reloc16.c.final	2003-06-26 07:34:49.000000000 -0700
+++ bfd/reloc16.c	2003-11-26 12:46:20.000000000 -0800
@@ -155,6 +155,10 @@ bfd_coff_reloc16_relax_section (abfd, in
      times (see discussion of the "shrinks" array below).  */
   *again = FALSE;
 
+  /* We don't support the relax finalize pass.  */
+  if (link_info->relax_finalizing)
+    return TRUE;
+
   if (reloc_size < 0)
     return FALSE;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]