diff --git a/src/stub/l_lx_elf86.asm b/src/stub/l_lx_elf86.asm index 8fcee7eb..e7e48dc8 100644 --- a/src/stub/l_lx_elf86.asm +++ b/src/stub/l_lx_elf86.asm @@ -141,7 +141,7 @@ unfold: lodsd push eax ; sz_uncompressed (junk, actually) push esp ; &sz_uncompressed - mov eax, 0x400000 + mov eax, 0x1000000 push eax ; &destination ; mmap a page to hold the decompressed program @@ -158,7 +158,7 @@ unfold: pop eax int 0x80 xchg eax, ebx - mov bh, PAGE_SIZE>>8 ; ebx= 0x401000 + mov bh, PAGE_SIZE>>8 ; ebx= 0x1001000 add esp, byte 6*4 ; discard args to mmap lodsd diff --git a/src/stub/l_lx_elf86.lds b/src/stub/l_lx_elf86.lds index e431969f..76ed12fc 100644 --- a/src/stub/l_lx_elf86.lds +++ b/src/stub/l_lx_elf86.lds @@ -38,8 +38,8 @@ PHDRS } SECTIONS { - /* 0x00401000: l_lx_elf86.asm assumes 1 page up from 64KB boundary */ - . = 0x00401000 + SIZEOF_HEADERS + 12; /* 12==sizeof(l_info) */ + /* 0x01001000: l_lx_elf86.asm assumes 1 page up from 64KB boundary */ + . = 0x01001000 + SIZEOF_HEADERS + 12; /* 12==sizeof(l_info) */ .text : { *(.text) *(.data) diff --git a/src/stub/l_lx_sh86.asm b/src/stub/l_lx_sh86.asm index 177960c8..12be5178 100644 --- a/src/stub/l_lx_sh86.asm +++ b/src/stub/l_lx_sh86.asm @@ -136,7 +136,7 @@ unfold: lodsd push eax ; sz_uncompressed of folded stub (junk, actually) push esp ; &sz_uncompressed - mov edx, 0x00800000 ; origin of this program + mov edx, 0x01400000 ; origin of this program mov eax, [p_memsz + szElf32_Ehdr + edx] ; length of loaded pages add eax, edx add edx, szElf32_Ehdr + 2*szElf32_Phdr ; convenient ptr diff --git a/src/stub/l_lx_sh86.lds b/src/stub/l_lx_sh86.lds index b3d551b8..ecf37a36 100644 --- a/src/stub/l_lx_sh86.lds +++ b/src/stub/l_lx_sh86.lds @@ -38,8 +38,8 @@ PHDRS /* force exactly 1 ELF32_Phdr: in particular, no PT_GNU_STACK */ SECTIONS { - /* 0x00800000: avoid 0x00400000 for shell itself being compressed */ - . = 0x00800000 + SIZEOF_HEADERS; + /* 0x01400000: avoid 0x01000000 for shell itself being compressed */ + . = 0x01400000 + SIZEOF_HEADERS; . = ALIGN(0x80); .data : { /* put everything together in one Phdr */ *(.text)