mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Cache does not serve any purpose when rtld is relocating itself, do
not bother allocating one. Submitted by: kan Approved by: re (bmah)
This commit is contained in:
parent
99d4bb3999
commit
6e5e629f07
1 changed files with 6 additions and 2 deletions
|
|
@ -260,8 +260,12 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld)
|
|||
* The dynamic loader may be called from a thread, we have
|
||||
* limited amounts of stack available so we cannot use alloca().
|
||||
*/
|
||||
cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0);
|
||||
if (cache == MAP_FAILED)
|
||||
if (obj != obj_rtld) {
|
||||
cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON,
|
||||
-1, 0);
|
||||
if (cache == MAP_FAILED)
|
||||
cache = NULL;
|
||||
} else
|
||||
cache = NULL;
|
||||
|
||||
relalim = (const Elf_Rela *)((caddr_t)obj->rela + obj->relasize);
|
||||
|
|
|
|||
Loading…
Reference in a new issue