summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-03-12 11:18:23 +0000
committerEgbert Eich <eich@suse.de>2004-03-12 11:18:23 +0000
commit62c105bd9b13e87a314a2d2be4747500a9ce4e8d (patch)
tree9d610658a6429a3f63c99be72afa574a325a5b5e
parent4565ca2a8c681f16f6e863b29381ebdded15365d (diff)
34. Added a hack to fc-lang and fc-list to prevent installation if defineIPv6-REVIEW-BASE
InstallFontconfigLibrary NO (Egbert Eich). 33. Updated Xft to 2.1.5 (Egbert Eich). 32. Make ELF loader work on systems with non-exec stack/heaps (bugzilla #296, John Dennis, Mike Harris). 31. Fix for xdm to work on a non-IPv6 system when built with IPv6 support (bugzilla #287, Peter Breitenlohner) (confirmed by: Alan Coopersmith). 30. Fix Xi XselectExtensionEvent for 64 bit machines (bugzilla #285, Andreas Luik) (confirmed by: Paul Anderson, Alan Coopersmith).
-rw-r--r--hw/xfree86/loader/elfloader.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/hw/xfree86/loader/elfloader.c b/hw/xfree86/loader/elfloader.c
index a9fcfdf7b..d25ef44c6 100644
--- a/hw/xfree86/loader/elfloader.c
+++ b/hw/xfree86/loader/elfloader.c
@@ -921,7 +921,7 @@ ELFCreateGOT(ELFModulePtr elffile, int maxalign)
ErrorF("ELFCreateGOT() Unable to reallocate memory!!!!\n");
return FALSE;
}
-# if defined(linux) && defined(__ia64__) || defined(__OpenBSD__)
+# if defined(linux) || defined(__OpenBSD__)
{
unsigned long page_size = getpagesize();
unsigned long round;
@@ -2760,10 +2760,16 @@ ELFCollectSections(ELFModulePtr elffile, int pass, int *totalsize,
elffile->lsection[j].size = SecSize(i);
elffile->lsection[j].flags = flags;
switch (SecType(i)) {
-#ifdef __OpenBSD__
+#if defined(linux) || defined(__OpenBSD__)
case SHT_PROGBITS:
- mprotect(elffile->lsection[j].saddr, SecSize(i),
- PROT_READ | PROT_WRITE | PROT_EXEC);
+ {
+ unsigned long page_size = getpagesize();
+ unsigned long round;
+
+ round = (unsigned long)elffile->lsection[j].saddr & (page_size -1);
+ mprotect( (char *)elffile->lsection[j].saddr - round,
+ SecSize(i) + round, PROT_READ | PROT_WRITE | PROT_EXEC);
+ }
break;
#endif
case SHT_SYMTAB:
@@ -2958,7 +2964,7 @@ ELFLoadModule(loaderPtr modrec, int elffd, LOOKUP **ppLookup)
ErrorF("Unable to allocate ELF sections\n");
return NULL;
}
-# if defined(linux) && defined(__ia64__) || defined(__OpenBSD__)
+# if defined(linux) || defined(__OpenBSD__)
{
unsigned long page_size = getpagesize();
unsigned long round;