[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] XFree86 4.2 and gcc 3.1



On Sat, 9 Feb 2002, Thorsten Kranzkowski wrote:

Just in case I miss it, if they accept the patch, please send me 
a copy of the accepted patch as a MIME file attachment and I'll 
add it to my rawhide rpm's.

TTYL


>Date: Sat, 9 Feb 2002 16:09:18 +0000
>From: Thorsten Kranzkowski <dl8bcu@dl8bcu.de>
>To: axp-list mailing list <axp-list@redhat.com>
>Content-Type: text/plain; charset=us-ascii
>List-Id: Linux and Red Hat on Alpha processors <axp-list.redhat.com>
>Subject: [PATCH] XFree86 4.2 and gcc 3.1
>
>Hi!
>When building XFree86 4.2 with gcc 3.1 (20020207) i get this runtime error:
>
><---snip--->
>XFree86 Version 4.2.0 / X Window System
>(protocol Version 11, revision 0, vendor release 6600)
>Release Date: 18 January 2002
>	If the server is older than 6-12 months, or if your card is
>	newer than the above date, look for a newer version before
>	reporting problems.  (See http://www.XFree86.Org/)
>Build Operating System: Linux 2.4.18-pre7 alpha [ELF] 
>Module Loader present
>Markers: (--) probed, (**) from config file, (==) default setting,
>         (++) from command line, (!!) notice, (II) informational,
>         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
>(==) Log file: "/var/log/XFree86.0.log", Time: Sat Feb  9 00:59:35 2002
>(==) Using config file: "/etc/X11/XF86Config"
>Elf_RelocateEntry() Unsupported relocation type 18
>Elf_RelocateEntry() Unsupported relocation type 17
>Elf_RelocateEntry() Unsupported relocation type 18
>[ .... lots of these .... ]
>Elf_RelocateEntry() Unsupported relocation type 17
>Elf_RelocateEntry() Unsupported relocation type 18
>Elf_RelocateEntry() Unsupported relocation type 17
>
>Fatal server error:
>Caught signal 11.  Server aborting
><---snip--->
>
>After some investigation I made the following patch:
>
>
>diff -ur xc-orig/programs/Xserver/hw/xfree86/loader/elfloader.c xc/programs/Xserver/hw/xfree86/loader/elfloader.c
>--- xc-orig/programs/Xserver/hw/xfree86/loader/elfloader.c	Mon Jan 14 18:16:52 2002
>+++ xc/programs/Xserver/hw/xfree86/loader/elfloader.c	Sat Feb  9 01:26:37 2002
>@@ -1113,6 +1113,7 @@
> #if defined(__alpha__)
>     unsigned int *dest32h;	/* address of the high 32 bit place being modified */
>     unsigned long *dest64;
>+    unsigned short *dest16;
> #endif
> #if defined(__ia64__)
>     unsigned long *dest64;
>@@ -1233,6 +1234,34 @@
> #ifdef ELFDEBUG
> 	    ELFDEBUG( "*dest32=%x\n", *dest32 );
> #endif
>+	    break;
>+	    }
>+	case R_ALPHA_GPRELLOW:
>+	    {
>+	    dest64=(unsigned long *)(secp+rel->r_offset);
>+	    dest16=(unsigned short *)dest64;
>+
>+	    symval += rel->r_addend;
>+	    symval = ((unsigned char *)symval)-((unsigned char *)elffile->got);
>+
>+	    *dest16=symval;
>+	    break;
>+	    }
>+	case R_ALPHA_GPRELHIGH:
>+	    {
>+	    dest64=(unsigned long *)(secp+rel->r_offset);
>+	    dest16=(unsigned short *)dest64;
>+
>+	    symval += rel->r_addend;
>+	    symval = ((unsigned char *)symval)-((unsigned char *)elffile->got);
>+	    symval = ((long)symval >> 16) + ((symval >> 15) & 1);
>+	    if( (long)symval > 0x7fff ||
>+	        (long)symval < -(long)0x8000 ) {
>+		FatalError("R_ALPHA_GPRELHIGH symval-got is too large for %s:%lx\n",
>+			ElfGetSymbolName(elffile,ELF_R_SYM(rel->r_info)),symval);
>+	    }
>+
>+	    *dest16=symval;
> 	    break;
> 	    }
> 	case R_ALPHA_LITERAL:
>
>
>Now I can start X and it passed a first cursory test (GeForce2 MX PCI on
>a Compaq DS20)
>
>I'd like to have a comment whether this is the right fix before I send this
>in to the xfree folks.
>
>Thanks,
>Thorsten
>
>-- 
>| Thorsten Kranzkowski        Internet: dl8bcu@dl8bcu.de                      |
>| Mobile: ++49 170 1876134       Snail: Niemannsweg 30, 49201 Dissen, Germany |
>| Ampr: dl8bcu@db0lj.#rpl.deu.eu, dl8bcu@marvin.dl8bcu.ampr.org [44.130.8.19] |
>
>
>
>_______________________________________________
>Axp-list mailing list
>Axp-list@redhat.com
>https://listman.redhat.com/mailman/listinfo/axp-list
>



-- 
----------------------------------------------------------------------
Mike A. Harris                  Shipping/mailing address:
OS Systems Engineer             190 Pittsburgh Ave., Sault Ste. Marie,
XFree86 maintainer              Ontario, Canada, P6C 5B3
Red Hat Inc.                    Phone: (705)949-2136
http://www.redhat.com           ftp://people.redhat.com/mharris
Red Hat XFree86 mailing list:   xfree86-list@redhat.com
General open IRC discussion:    #xfree86 on irc.openprojects.net
----------------------------------------------------------------------





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []