mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-06 13:58:02 +02:00
Merge with XORG-RELEASE-1 (69)
This commit is contained in:
parent
1d888be479
commit
c6141d65a9
1 changed files with 12 additions and 0 deletions
|
|
@ -1096,6 +1096,18 @@ ELFCreatePLT(ELFModulePtr elffile)
|
|||
ErrorF("ELFCreatePLT() Unable to allocate memory!!!!\n");
|
||||
return;
|
||||
}
|
||||
# if defined(linux) || defined(__OpenBSD__)
|
||||
{
|
||||
unsigned long page_size = getpagesize();
|
||||
unsigned long round;
|
||||
|
||||
round = (unsigned long)elffile->plt & (page_size - 1);
|
||||
mprotect(elffile->plt - round,
|
||||
(elffile->pltsize + round + page_size - 1) & ~(page_size - 1),
|
||||
PROT_READ | PROT_WRITE | PROT_EXEC);
|
||||
}
|
||||
# endif
|
||||
|
||||
elffile->sections[elffile->pltndx].sh_size = elffile->pltsize;
|
||||
# ifdef ELFDEBUG
|
||||
ELFDEBUG("ELFCreatePLT: PLT address %lx\n", elffile->plt);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue