From: Goswin von Brederlow Subject: Re: Confused about start of day setup Date: Tue, 25 Sep 2007 10:55:59 +0200 Message-ID: <87ve9zazts.fsf@informatik.uni-tuebingen.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: (Keir Fraser's message of "Tue, 25 Sep 2007 08:16:42 +0100") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com, Goswin von Brederlow List-Id: xen-devel@lists.xenproject.org Keir Fraser writes: > On 25/9/07 01:52, "Goswin von Brederlow" > wrote: > >> And once more I answere myself. I thought it was the stack being wrong >> because the return value of a function was stored in the >> phys_to_machine_mapping. But actualy it the variable this value gets >> saved in that is there. >> >> What decides where the phys_to_machine_mapping frames ends up? >> >> As it is I get it at [0x121000 - 0x127000], which happens to be >> overlapping with my bss section: > > The domain builder accounts for BSS space, so it sounds like you have a > broken domU kernel image that does not specify enough BSS space in its > program header. If you 'objdump -l' your kernel's image file, does the > 'MemSiz' plus the load address entirely cover your BSS? > > -- Keir I think you ment readelf -l and no. MemSize says 1200f0 and then 121000 is the next page. But it is not something I did wrong. The Mini-OS example kernel is already broken in this way: mrvn@book:~/src/xen/xen-3-3.1.0/extras/mini-os% readelf -l mini-os Elf file type is EXEC (Executable file) Entry point 0x0 There are 2 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x00000000000000c0 0x0000000000000000 0x0000000000000000 0x00000000000105d0 0x0000000000023f88 RWE 20 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RWE 8 Section to Segment mapping: Segment Sections... 00 .text .rodata .data .data.rel.ro.local .data.rel .data.rel.local .got .got.plt 01 mrvn@book:~/src/xen/xen-3-3.1.0/extras/mini-os% objdump -t mini-os | sort ... 0000000000012000 l d .bss 0000000000000000 .bss ... 0000000000024960 g O .bss 0000000000000020 xen_features 0000000000024980 g O .bss 0000000000000008 HYPERVISOR_shared_info 00000000000249a0 g O .bss 0000000000001000 tx_buffers 00000000000259a0 g O .bss 0000000000000008 phys_to_machine_mapping 00000000000259a8 g *ABS* 0000000000000000 _end 0000000080000000 l *ABS* 0000000000000000 NMI_MASK SYMBOL TABLE: mini-os: file format elf64-x86-64 So the MemSize only covers part of the bss segment. Why would ld do that? MfG Goswin