Skip to content
Snippets Groups Projects
Commit 33008495 authored by jdh8d's avatar jdh8d
Browse files

No commit message

No commit message
parent 5087e513
No related branches found
No related tags found
No related merge requests found
......@@ -281,7 +281,7 @@ bool ElfWriterImpl<T_Elf_Ehdr,T_Elf_Phdr,T_Elf_Addr,T_Elf_Shdr,T_Elf_Sym, T_Elf_
return false;
// this is an uncommon case -- we are typically adding
// segments and so the segment map won't fit on the first page.
// if this assertion hits, email hiser@virginia.edu and attack input pgm,
// if this assertion hits, email hiser@virginia.edu and attach your input pgm,
// then convert this to a return false to avoid assertion until he fixes it;
assert(0);
}
......@@ -351,6 +351,10 @@ bool ElfWriterImpl<T_Elf_Ehdr,T_Elf_Phdr,T_Elf_Addr,T_Elf_Shdr,T_Elf_Sym, T_Elf_
* the auxv array to ld.so. Where ld.so then uses that as an address.
*/
// gap allocate assumes there's space on the first page for the EHdrs. If there's not,
// try pre-allocating.
if(page_align(min_addr)+sizeof(T_Elf_Ehdr) >= min_addr)
return false;
// first, find the first free space that's big enough.
unsigned int phdr_size=DetermineMaxPhdrSize();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment