public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* RE: gcc-3.1 builds for targets sh-hms
@ 2002-05-14 22:44 Rekha Deshmukh
  2002-05-15  1:41 ` Nick Clifton
  0 siblings, 1 reply; 8+ messages in thread
From: Rekha Deshmukh @ 2002-05-14 22:44 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-3.1 builds for targets sh-hms
  2002-05-14 22:44 gcc-3.1 builds for targets sh-hms Rekha Deshmukh
@ 2002-05-15  1:41 ` Nick Clifton
  2002-05-15  9:02   ` Ian Lance Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Clifton @ 2002-05-15  1:41 UTC (permalink / raw)
  To: Rekha Deshmukh; +Cc: Nick, Clifton, 

Hi Rekha,

> 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?

By default it is not used.  However this default ought to be
changed :-)   Non-BFD assembler support is old and is slowly suffering
from bit rot.  There is no really good reason why the sh-hms port
should not be using a BFD based assembler.  I guess up until now no-one
actually tried building the sh-hms port.

> Uptill now I was considering coff and hms formats to be the
> same. What is the actual difference between the both?  

To be honmest I do not know.  I suspect that the hms format is
somebody's extensions to COFF.  It is unlikely that they are very well
supported these days.

Cheers
        Nick

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-3.1 builds for targets sh-hms
  2002-05-15  1:41 ` Nick Clifton
@ 2002-05-15  9:02   ` Ian Lance Taylor
  2002-05-15 13:09     ` Nick Clifton
  2002-05-15 13:56     ` Jim Wilson
  0 siblings, 2 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2002-05-15  9:02 UTC (permalink / raw)
  Cc: Rekha Deshmukh, binutils

Nick Clifton <nickc@cambridge.redhat.com> writes:

> > Uptill now I was considering coff and hms formats to be the
> > same. What is the actual difference between the both?  
> 
> To be honmest I do not know.  I suspect that the hms format is
> somebody's extensions to COFF.  It is unlikely that they are very well
> supported these days.

HMS and COFF are the same.  I believe that HMS is the name of some
Hitachi system.

Ian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-3.1 builds for targets sh-hms
  2002-05-15  9:02   ` Ian Lance Taylor
@ 2002-05-15 13:09     ` Nick Clifton
  2002-05-15 13:56     ` Jim Wilson
  1 sibling, 0 replies; 8+ messages in thread
From: Nick Clifton @ 2002-05-15 13:09 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Rekha Deshmukh, binutils

Hi Ian,

> HMS and COFF are the same.  I believe that HMS is the name of some 
> Hitachi system.

Thanks for letting me know.

Cheers
        Nick

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-3.1 builds for targets sh-hms
  2002-05-15  9:02   ` Ian Lance Taylor
  2002-05-15 13:09     ` Nick Clifton
@ 2002-05-15 13:56     ` Jim Wilson
  1 sibling, 0 replies; 8+ messages in thread
From: Jim Wilson @ 2002-05-15 13:56 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Rekha Deshmukh, binutils

>HMS and COFF are the same.  I believe that HMS is the name of some
>Hitachi system.

HMS(I) is Hitachi Micro Systems (Incorporated).  It used to be the part of
Hitachi that was selling microprocessors, but has apparently since been
renamed/reorged to something else, since I couldn't find any reference to it
on www.hitachi.com.  There are two mentions of the full name in gas/doc,
see for instance the c-sh.texi file.

I believe the use of hms here predates the convention of using aout/coff/elf,
and was never fixed.  hms was first used for the h8/300 port, which was one of
the very first embedded only ports, and the defunct h8/500 port, then later
reused for the sh port.

Hitachi did have their own object file format at the beginning, called sysroff.
We only supported that via an objcopy like program called srconv.  I see that
it is still there, but I'd be surprised if anyone was still using that program.

Otherwise, I don't recall anything special about the hms coff format.  It
should be pretty standard coff, and sh-hms should be indistinguishable from
sh-coff.

Jim

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-3.1 builds for targets sh-hms
  2002-05-11  4:29 ` Nick Clifton
@ 2002-05-11  9:50   ` Daniel Jacobowitz
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-05-11  9:50 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

On Sat, May 11, 2002 at 12:29:26PM +0100, Nick Clifton wrote:
> 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().

Thanks; I've merged this patch to the 2.12 branch.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-3.1 builds for targets sh-hms
  2002-05-06  3:27 Rekha Deshmukh
@ 2002-05-11  4:29 ` Nick Clifton
  2002-05-11  9:50   ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Clifton @ 2002-05-11  4:29 UTC (permalink / raw)
  To: Rekha Deshmukh; +Cc: binutils

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* gcc-3.1 builds for targets sh-hms
@ 2002-05-06  3:27 Rekha Deshmukh
  2002-05-11  4:29 ` Nick Clifton
  0 siblings, 1 reply; 8+ messages in thread
From: Rekha Deshmukh @ 2002-05-06  3:27 UTC (permalink / raw)
  To: binutils

Hi all!

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-

gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -O2 -o as-new app.o as.o atof-generic.o bignum-copy.o cond.o depend.o dwarf2dbg.o ecoff.o ehopt.o expr.o flonum-copy.o flonum-konst.o flonum-mult.o frags.o hash.o input-file.o input-scrub.o listing.o literal.o macro.o messages.o output-file.o read.o sb.o stabs.o subsegs.o symbols.o write.o tc-sh.o obj-coff.o atof-ieee.o  ../opcodes/.libs/libopcodes.a ../bfd/.libs/libbfd.a ../libiberty/libiberty.a
obj-coff.o: In function `fixup_segment':
obj-coff.o(.text+0x2eca): undefined reference to `md_pcrel_from'
obj-coff.o(.text+0x2f3f): undefined reference to `md_pcrel_from'
collect2: ld returned 1 exit status
make[3]: *** [as-new] Error 1
make[3]: Leaving directory `/home/kpit/tempbuilds/build-binutils-2.12/gas'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/kpit/tempbuilds/build-binutils-2.12/gas'
make[1]: *** [all-recursive-am] Error 2
make[1]: Leaving directory `/home/kpit/tempbuilds/build-binutils-2.12/gas'
make: *** [all-gas] Error 2

obj-coff.o when created, were having many warnings like 'function declaration isn't a prototype'. After some r&d I just added --enable-bfd-assembler option and the build came through. But I still don't know whether it is OK to use this option? In which cases it has to be used? Why it is failing without this and is successful for sh-coff? 

Please help me in this matter.
Thanks & Regards
Rekha Bhintade]
KPIT Infosystems LTD
INDIA 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-05-15 20:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-14 22:44 gcc-3.1 builds for targets sh-hms Rekha Deshmukh
2002-05-15  1:41 ` Nick Clifton
2002-05-15  9:02   ` Ian Lance Taylor
2002-05-15 13:09     ` Nick Clifton
2002-05-15 13:56     ` Jim Wilson
  -- strict thread matches above, loose matches on Subject: below --
2002-05-06  3:27 Rekha Deshmukh
2002-05-11  4:29 ` Nick Clifton
2002-05-11  9:50   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).