This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: gcc-3.1 builds for targets sh-hms
- From: "Rekha Deshmukh" <RekhaD at kpit dot com>
- To: "Nick Clifton" <nickc at cambridge dot redhat dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: Wed, 15 May 2002 11:15:42 +0530
- Subject: RE: gcc-3.1 builds for targets sh-hms
Hi Nick,
Thanks for the patch.
Sh-hms is now getting build with this patch. Thanks once again.
But, before this patch, I was doing some r&d and was successful in building the binutils for sh-hms using --enable-bfd-assembler. Is it so, that the bfd-assembler is not to be used for sh-hms or by default it is not used?
Uptill now I was considering coff and hms formats to be the same. What is the actual difference between the both?
Thanks & regards
Rekha
-----Original Message-----
From: Nick Clifton [mailto:nickc@cambridge.redhat.com]
Sent: Saturday, May 11, 2002 4:59 PM
To: Rekha Deshmukh
Cc: binutils@sources.redhat.com
Subject: Re: gcc-3.1 builds for targets sh-hms
Hi Rekha,
> I tried the sh-coff and sh-hms target builds with gcc-3.1,
> binutils-2.12 and newlib-1.10.
> Out of which sh-coff got successfully built. Even though sh-hms and
> sh-coff formats are said to be quite similar, sh-hms was failing in
> binutils-> make all with the following error
>
> obj-coff.o(.text+0x2eca): undefined reference to `md_pcrel_from'
> obj-coff.o(.text+0x2f3f): undefined reference to `md_pcrel_from'
Thanks for reporting this problem. I have fixed it by applying the
patch below.
Cheers
Nick
2002-05-11 Nick Clifton <nickc@cambridge.redhat.com>
* config/tc-sh.c (md_pcrel_from): Define for use with sh-hms
target.
(md_pcrel_from_section): Use md_pcrel_from().
Index: gas/config/tc-sh.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-sh.c,v
retrieving revision 1.60
diff -c -3 -p -w -r1.60 tc-sh.c
*** gas/config/tc-sh.c 1 May 2002 09:54:31 -0000 1.60
--- gas/config/tc-sh.c 11 May 2002 11:27:00 -0000
*************** md_number_to_chars (ptr, use, nbytes)
*** 3680,3685 ****
--- 3680,3695 ----
number_to_chars_bigendian (ptr, use, nbytes);
}
+ /* This version is used in obj-coff.c when not using BFD_ASSEMBLER.
+ eg for the sh-hms target. */
+
+ long
+ md_pcrel_from (fixP)
+ fixS *fixP;
+ {
+ return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address + 2;
+ }
+
long
md_pcrel_from_section (fixP, sec)
fixS *fixP;
*************** md_pcrel_from_section (fixP, sec)
*** 3698,3704 ****
return fixP->fx_subsy ? fixP->fx_where + fixP->fx_frag->fr_address : 0;
}
! return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address + 2;
}
#ifdef OBJ_COFF
--- 3708,3714 ----
return fixP->fx_subsy ? fixP->fx_where + fixP->fx_frag->fr_address : 0;
}
! return md_pcrel_from (fixP);
}
#ifdef OBJ_COFF