This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: The relax finalize pass has broken relax for h8300-coff
- From: "H. J. Lu" <hjl at lucon dot org>
- To: "Asgari J. Jinia" <AsgariJ at KPITCummins dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 26 Nov 2003 12:50:30 -0800
- Subject: Re: The relax finalize pass has broken relax for h8300-coff
- References: <69595093233BB547BB70CF5E492B63F201D03FB4@sohm.kpit.com>
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;