🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #54220

Re: Need help with gcc-1.38 on a m68k box

#54220
From: Michael Bloom
Date: Wed, 16 Jan 1991 01:03
65 lines
3035 bytes
In article <3258@idea.sublink.org> piggy@idea.sublink.org (PG Programs Generator) writes:
>I'm getting crazy trying to get gcc 1.38 running on my Honeywell Bull 
>X20-Superteam, a 68020 machine with sysv 2.2.

If the Bull X20-Superteam is like the Bull DPX/2, you need the attached
patch.  The DPX/2 has been the only machine so far that needs this.

You can tell by compiling the following with the native compiler
disassembling the output, and examining the "movel" instruction (shown
here at location 6, but your mileage may vary). For normal coff
systems, this should have the value 4 (the value of the "common"
symbol plus a zero offset).  The Bull DPX handles relocations that are
relative to common symbols bsd-style rather than coff-style, however, 
so on the DPX, this needs to be 0 instead).

	# 1) echo 'int i; main() {i=3;}' >testme.c
	# 2) cc -c testme.c
	# 3) dis testme.o
                ****   DISASSEMBLER  ****

	disassembly for delme.o

	section .text
	        $   0:  4e56 0000                        link    %fp,&0
	        $   4:  7003                             moveq.l &3,%d0
	        $   6:  23c0 0000 0004                   mov.l   %d0,0x4.l
				     ^
				     Is this a 4 or a 0 with your native cc?
	        $   c:  4e5e                             unlk    %fp
	        $   e:  4e75                             rts
	

diff -c ./coff-conv.c ../../gas-1.36/coff-conv.c
*** ./coff-conv.c	Mon Sep 24 00:04:35 1990
--- ../../gas-1.36/coff-conv.c	Sat Dec 15 12:30:41 1990
***************
*** 1361,1370 ****
  			/*   object data being relocated */
    unsigned char * scn_data = data + rptr->r_address;
  				/* value of symbol referred to */
!   long value = SYM_INDEX(coff_symbols,map_reloc_symbol (rptr)).n_value;
    char tmp_char;
    short tmp_short;
    long tmp_long;
  
    if (rptr->r_pcrel) /* adjust section data */
      {
--- 1366,1382 ----
  			/*   object data being relocated */
    unsigned char * scn_data = data + rptr->r_address;
  				/* value of symbol referred to */
!   struct syment * coffsym = &SYM_INDEX(coff_symbols,map_reloc_symbol (rptr));
!   long value = coffsym->n_value; /* value of symbol referred to */
    char tmp_char;
    short tmp_short;
    long tmp_long;
+ 
+ #ifdef BSD_STYLE_COFF_COMMON /* you need to define this for the Bull DPX/2 */
+   if (coffsym->n_scnum == 0 )
+      value = 0;
+ #endif
+ 
  
    if (rptr->r_pcrel) /* adjust section data */
      {
Technical Details
Message-ID: <22695@ttidca.TTI.COM>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!julius.cs.uiuc.edu!usc!srhqla!quad1!psivax!ttidca!mb
References: <3258@idea.sublink.org>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,1ada15dc00446d81
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1991-01-15 17:03:45 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!julius.cs.uiuc.edu!usc!srhqla!quad1!psivax!ttidca!mb
From: mb@ttidca.TTI.COM (Michael Bloom)
Newsgroups: gnu.gcc.help
Subject: Re: Need help with gcc-1.38 on a m68k box
Message-ID: <22695@ttidca.TTI.COM>
Date: 16 Jan 91 01:03:45 GMT
References: <3258@idea.sublink.org>
Organization: Citicorp/TTI, Santa Monica
Lines: 65