Mukesh Rathor
2011-May-27 01:59 UTC
[Xen-devel] PVOPS: missing some xen symbols in vmlinux
Hi Jeremy, I noticed in PVOPS kernels that lot of the xen functions in arch/x86/xen are not properly symbolized in vmlinux. These symbols show up just fine in arch/x86/built-in.o, but seem to be getting dropped along the way, it appears in the following step: ld -m elf_x86_64 --build-id -o .tmp_vmlinux1 -T arch/x86/kernel/vmlinux.lds arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/head.o arch/x86/kernel/init_task.o init/built-in.o --start-group usr/built-in.o arch/x86/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a arch/x86/lib/lib.a lib/built-in.o arch/x86/lib/built-in.o drivers/built-in.o sound/built-in.o firmware/built-in.o arch/x86/pci/built-in.o arch/x86/power/built-in.o arch/x86/video/built-in.o net/built-in.o --end-group [mantra]../linux-2.6.39-mine/obj> nm .tmp_vmlinux1|grep xen_start_k ffffffff818c5b42 T xen_start_kernel bash> gdb .tmp_vmlinux1 (gdb) disass xen_start_kernel No function contains specified address. (gdb) disass 0xffffffff818c5b42 No function contains specified address. (gdb) disass native_read_cr4_safe Dump of assembler code for function native_read_cr4_safe: 0xffffffff8100300e <native_read_cr4_safe+0>: push %rbp 0xffffffff8100300f <native_read_cr4_safe+1>: mov %rsp,%rbp ... (gdb) disass xen_write_cr3 Dump of assembler code for function __brk_reservation_fn_level1_ident_pgt__: End of assembler dump. (gdb) disass arch_pick_mmap_layout Dump of assembler code for function arch_pick_mmap_layout: 0xffffffff81039bcb <arch_pick_mmap_layout+0>: push %rbp 0xffffffff81039bcc <arch_pick_mmap_layout+1>: mov %rsp,%rbp (gdb) disass raw_pci_read Dump of assembler code for function raw_pci_read: 0xffffffff813f82ac <raw_pci_read+0>: push %rbp 0xffffffff813f82ad <raw_pci_read+1>: mov %rsp,%rbp ... (gdb) disass make_lowmem_page_readonly Dump of assembler code for function __brk_reservation_fn_level1_ident_pgt__: End of assembler dump. bash> gdb vmlinux (gdb) disass make_lowmem_page_readonly Dump of assembler code for function __brk_reservation_fn_level1_ident_pgt__: End of assembler dump. I am trying to figure out what is it about those xen functions, any thoughts? thanks, Mukesh _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Fitzhardinge
2011-May-28 01:04 UTC
[Xen-devel] Re: PVOPS: missing some xen symbols in vmlinux
On 05/26/2011 06:59 PM, Mukesh Rathor wrote:> I am trying to figure out what is it about those xen functions, any > thoughts?I''d noticed that myself - I''m not really sure what causes it. For the asm ones it can be caused by missing the proper type/length directives for the symbol, but AFAICS those are all C functions. xen_start_kernel is asmlinkage, but I don''t think that should matter. Is it just that gdb doesn''t find the symbols? Or are there other functional problems as well? What version of the toolchain are you using? Do you have CONFIG_DEBUG_INFO enabled? Thanks, J _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Mukesh Rathor
2011-May-28 01:44 UTC
[Xen-devel] Re: PVOPS: missing some xen symbols in vmlinux
On Fri, 27 May 2011 18:04:36 -0700 Jeremy Fitzhardinge <jeremy@goop.org> wrote:> > I''d noticed that myself - I''m not really sure what causes it. For the > asm ones it can be caused by missing the proper type/length directives > for the symbol, but AFAICS those are all C functions. > xen_start_kernel is asmlinkage, but I don''t think that should matter. > > Is it just that gdb doesn''t find the symbols? Or are there other > functional problems as well? > > What version of the toolchain are you using? Do you have > CONFIG_DEBUG_INFO enabled?Hi Jeremy, I am using gdb version (7.0.1-50.fc12), but I will try different version, There are no functional problems, just debugging is harder in case of panics for my hybrid guest I am working on. I have CONFIG_DEBUG_INFO enabled. Thanks. I''ll let you know if different verions of gdb work. Mukesh _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel