WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Confused about start of day setup

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] Confused about start of day setup
From: Goswin von Brederlow <brederlo@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Sep 2007 10:55:59 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Goswin von Brederlow <brederlo@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 25 Sep 2007 01:56:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C31E746A.DFC4%Keir.Fraser@xxxxxxxxxxxx> (Keir Fraser's message of "Tue, 25 Sep 2007 08:16:42 +0100")
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C31E746A.DFC4%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.19 (linux)
Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> writes:

> On 25/9/07 01:52, "Goswin von Brederlow"
> <brederlo@xxxxxxxxxxxxxxxxxxxxxxxxxxx> 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel