Use M_EXEC when calling malloc() to allocate the memory to store the module,

as it'll contain executable code.
This commit is contained in:
Olivier Houchard 2018-06-14 23:10:10 +00:00
parent 44a230cd92
commit 78bcf87e3e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335182

View File

@ -945,7 +945,7 @@ link_elf_load_file(linker_class_t cls, const char* filename,
goto out;
}
#else
ef->address = malloc(mapsize, M_LINKER, M_WAITOK);
ef->address = malloc(mapsize, M_LINKER, M_EXEC | M_WAITOK);
#endif
mapbase = ef->address;