Bug 1765 - relocation type 10 (R_ALPHA_SREL32) not handled by elfloader.c
Summary: relocation type 10 (R_ALPHA_SREL32) not handled by elfloader.c
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 6.7.0
Hardware: Alpha FreeBSD
: high normal
Assignee: Xorg Project Team
QA Contact:
URL: http://www.freebsd.org/cgi/query-pr.c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-02 13:59 UTC by Ken Stailey
Modified: 2005-03-20 16:05 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
alpha_srel32_fix.patch (1.11 KB, patch)
2005-03-21 11:04 UTC, Adam Jackson
ajax: 6.8-branch?
Details | Splinter Review

Description Ken Stailey 2004-11-02 13:59:51 UTC
Platform:  DEC AlphaServer 1000A with Matrox Mystique card. 

OS: FreeBSD 5.3-BETA7

When I start the Xorg server I see numerous error messages about relocation type
10 not being handled.  This patch adds the missing support to 6.7.0.  I checked
6.8.1 and HEAD and did not see this code applied.

--- programs/Xserver/hw/xfree86/loader/elfloader.c.orig	Fri Apr  2 12:25:21 2004
+++ programs/Xserver/hw/xfree86/loader/elfloader.c	Wed Oct 27 22:48:02 2004
@@ -1608,6 +1608,20 @@
 	    break;
 	}
 
+ 	case R_ALPHA_SREL32:
+ 	    {
+ 		dest32 = (unsigned int *)(secp + rel->r_offset);
+ 		symval += rel->r_addend;
+ 		symval -= (unsigned long) dest32;
+ 		if ((long)symval >= 0x80000000
+ 		    || (long)symval < -(long)0x80000000)
+ 		    FatalError("R_ALPHA_SREL32 overflow for %s: %lx\n",
+ 			       ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)),
+ 			       symval);
+ 		*dest32 = symval;
+ 		break;
+ 	    }
+ 
 #endif /* alpha */
 #if defined(__mc68000__)
     case R_68K_32:
Comment 1 Adam Jackson 2004-11-03 11:09:50 UTC
what is the origin of this patch?

if you set MakeDllModules YES in host.def, does the server work properly?
Comment 2 Adam Jackson 2004-11-09 07:58:53 UTC
fixed in CVS, thanks.

the original bug report was:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=234073
Comment 3 Adam Jackson 2005-03-21 11:04:32 UTC
Created attachment 2174 [details] [review]
alpha_srel32_fix.patch

Add support for R_ALPHA_SREL32 relocations in elfloader.
Originally Debian patch 202_alpha_elfloader_support_R_ALPHA_SREL32.diff.
Credit to Falk Hueffner.
Comment 4 Adam Jackson 2005-03-21 11:05:11 UTC
Comment on attachment 2174 [details] [review]
alpha_srel32_fix.patch

add support for another relocation type to alpha elfloader.  fixed in HEAD.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.