ignore PT_NOTE elf section
This commit is contained in:
parent
1a6e1522bd
commit
b668c30335
@ -385,15 +385,15 @@ static sos_uaddr_t load_elf_prog(const struct userprog_entry *prog)
|
|||||||
sos_uaddr_t uaddr;
|
sos_uaddr_t uaddr;
|
||||||
|
|
||||||
/* Ignore the empty program headers that are not marked "LOAD" */
|
/* Ignore the empty program headers that are not marked "LOAD" */
|
||||||
if (elf_phdrs[i].p_type != PT_LOAD)
|
if (elf_phdrs[i].p_type != PT_LOAD && elf_phdrs[i].p_type != PT_NOTE)
|
||||||
{
|
{
|
||||||
if (elf_phdrs[i].p_memsz != 0)
|
if (elf_phdrs[i].p_memsz != 0)
|
||||||
{
|
{
|
||||||
SOS_FATAL_ERROR("ELF: non-empty non-LOAD segments not supported yet");
|
SOS_FATAL_ERROR("ELF: non-empty (%ld) non-LOAD/non-NOTE (%ld) segments not supported yet", elf_phdrs[i].p_memsz, elf_phdrs[i].p_type);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (elf_phdrs[i].p_vaddr < SOS_PAGING_BASE_USER_ADDRESS)
|
if (elf_phdrs[i].p_vaddr < SOS_PAGING_BASE_USER_ADDRESS)
|
||||||
{
|
{
|
||||||
SOS_FATAL_ERROR("User program has an incorrect address");
|
SOS_FATAL_ERROR("User program has an incorrect address");
|
||||||
|
Loading…
Reference in New Issue
Block a user