From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.44.254]) by listman.redhat.com (Postfix) with ESMTP id 8273F3EAD7 for ; Sat, 9 Feb 2002 11:09:22 -0500 (EST) Received: from mail.redhat.com (mail.redhat.com [12.107.208.239]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id g19G9Ne16974 for ; Sat, 9 Feb 2002 11:09:23 -0500 Received: (from mail@localhost) by mail.redhat.com (8.11.6/8.8.7) id g19G9MZ23606 for axp-list@listman.redhat.com; Sat, 9 Feb 2002 11:09:22 -0500 Received: from Marvin.DL8BCU.ampr.org (root@p50828F87.dip.t-dialin.net [80.130.143.135]) by mail.redhat.com (8.11.6/8.8.7) with ESMTP id g19G9KC23600 for ; Sat, 9 Feb 2002 11:09:20 -0500 Received: from dl8bcu.de (th@localhost [127.0.0.1]) by Marvin.DL8BCU.ampr.org (8.12.1/8.12.1) with ESMTP id g19G9JlJ003781 for ; Sat, 9 Feb 2002 16:09:19 GMT Received: (from th@localhost) by dl8bcu.de (8.12.1/8.12.1/Submit) id g19G9Ifk003780 for axp-list@redhat.com; Sat, 9 Feb 2002 16:09:18 GMT Date: Sat, 9 Feb 2002 16:09:18 +0000 From: Thorsten Kranzkowski To: axp-list mailing list Subject: [PATCH] XFree86 4.2 and gcc 3.1 Message-ID: <20020209160918.A3771@Marvin.DL8BCU.ampr.org> Mail-Followup-To: axp-list mailing list Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com X-Reply-To: dl8bcu@dl8bcu.de List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: 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] |