Place loader immediately after compressed PT_LOADs, in "middle" of file.
This moves compressed gaps and debuginfo out of compressed PT_LOADs, and fixes a bug where large debuginfo would cause first mmap at runtime to erase the loader (SourceForge bug 3239079).
This commit is contained in:
@@ -75,6 +75,8 @@ protected:
|
||||
unsigned sz_phdrs; // sizeof Phdr[]
|
||||
unsigned sz_elf_hdrs; // all Elf headers
|
||||
unsigned sz_pack2; // after pack2(), before loader
|
||||
unsigned sz_pack2a; // after pack2() of all PT_LOAD
|
||||
unsigned sz_pack2b; // after pack2() of all PT_LOAD and gaps
|
||||
unsigned lg2_page; // log2(PAGE_SIZE)
|
||||
unsigned page_size; // 1u<<lg2_page
|
||||
unsigned xct_off; // shared library: file offset of SHT_EXECINSTR
|
||||
|
||||
Reference in New Issue
Block a user