From 62c105bd9b13e87a314a2d2be4747500a9ce4e8d Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Fri, 12 Mar 2004 11:18:23 +0000 Subject: 34. Added a hack to fc-lang and fc-list to prevent installation if define 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). --- hw/xfree86/loader/elfloader.c | 16 +++++++++++----- 1 file 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; -- cgit v1.2.3