Date: Thu, 18 Feb 1999 18:15:20 +0100 From: Marcel Moolenaar <marcel@scc.nl> To: emulation@FreeBSD.ORG Subject: Re: ELF/VM problem [was: Re: linux ELF emulation is kinda broken (fwd)] Message-ID: <36CC4AA8.F7488014@scc.nl> References: <Pine.BSF.3.95.990216120935.13983G-100000@current1.whistle.com>, <36CB33C1.F5A4D530@scc.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
Marcel Moolenaar wrote: > > Marcel Moolenaar wrote: > > I did some kernel debugging and found out that there is something funny going > > on when ld-linux.so.1 is about to get loaded. Function elf_load_section() in > > file /sys/kern/imgact_elf.c fails to load the first program header. More > > specifically, The very first vm_map_insert() in that function fails with > > error 22 (EINVAL). > > Correction: > vm_map_insert() fails with error code 3 (KERN_NO_SPACE). > elf_load_section() fails with error code 22 (EINVAL). It seems that the interpreter is loaded at address 0x08000000. The VM map already has an entry with start address 0x08000000 (see objdump). As a result vm_map_insert() returns KERN_NO_SPACE. Recent changes in the ELF image code hardwired the loading of the interpreter to that address (for i386 that is). objdump: lmgrd: file format elf32-i386 lmgrd architecture: i386, flags 0x00000112: EXEC_P, HAS_SYMS, D_PAGED start address 0x08001ac0 Program Header: PHDR off 0x00000034 vaddr 0x08000034 paddr 0x00000000 align 2**2 filesz 0x000000a0 memsz 0x000000a0 flags r-x INTERP off 0x000000d4 vaddr 0x080000d4 paddr 0x00000000 align 2**0 filesz 0x00000013 memsz 0x00000013 flags r-- LOAD off 0x00000000 vaddr 0x08000000 paddr 0x00000000 align 2**12 filesz 0x000343c2 memsz 0x000343c2 flags r-x LOAD off 0x000343c8 vaddr 0x080353c8 paddr 0x00000000 align 2**12 filesz 0x00000f8c memsz 0x000080b8 flags rw- DYNAMIC off 0x000352c4 vaddr 0x080362c4 paddr 0x00000000 align 2**2 filesz 0x00000090 memsz 0x00000090 flags rw- marcel cc: jdp@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36CC4AA8.F7488014>