Compiling and linking with -gdwarf enable

From: Ralph Blach (rcblach@raleigh.ibm.com)
Date: Thu Oct 05 2000 - 07:36:41 EST


I am working with the monta-vista port of linux to the 405gp. I want to
do source level debugging
using the IBM RiscWatch which attaches to the 405gp through the jtag
port. Compiling goes OK, but when I try to link the kernel, I get the
following messages.

The routine was compiled like
powerpc-linux-gcc -D__KERNEL__ -I/u/rcblach/405/2.4.0-test2/include
-Wall -Wstrict-prototypes -g -fomit-frame-pointer -fno-strict-aliasing
-D__powerpc__ -fsigned-char -msoft-float -pipe -ffixed-r2
-Wno-uninitialized -mmultiple -mstring -mcpu=403 -c -o 4xx_tlb.o
4xx_tlb.c

powerpc-linux-ld -g -T arch/ppc/vmlinux.lds -Ttext 0xc0000000 -Bstatic
arch/ppc/kernel/head_4xx.o init/main.o init/version.o \
        --start-group \
        arch/ppc/kernel/kernel.o arch/ppc/mm/mm.o arch/ppc/lib/lib.o
kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
        drivers/block/block.o drivers/char/char.o drivers/misc/misc.o
drivers/net/net.o drivers/parport/parport.a
drivers/sound/sounddrivers.o drivers/pci/pci.a
drivers/macintosh/macintosh.o drivers/usb/usbdrv.o drivers/i2c/i2c.o \
        net/network.o \
        /u/rcblach/405/2.4.0-test2/lib/lib.a \
        arch/ppc/mm/4xx_tlb.o \
        --end-group \
        -o vmlinux
arch/ppc/mm/4xx_tlb.o: In function `findPTE':
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:507: undefined
reference to `pgd_none'
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:507: relocation
truncated to fit: R_PPC_REL24 pgd_none
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:509: undefined
reference to `pmd_offset'
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:509: relocation
truncated to fit: R_PPC_REL24 pmd_offset
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:512: undefined
reference to `pte_offset'
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:512: relocation
truncated to fit: R_PPC_REL24 pte_offset
arch/ppc/mm/44x_tlb.o: In function `tlbMiss':
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:447: undefined
reference to `pgd_none'
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:447: relocation
truncated to fit: R_PPC_REL24 pgd_none
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:450: undefined
reference to `pmd_offset'
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:450: relocation
truncated to fit: R_PPC_REL24 pmd_offset
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:454: undefined
reference to `pte_offset'
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:454: relocation
truncated to fit: R_PPC_REL24 pte_offset
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:461: undefined
reference to `pte_write'
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:461: relocation
truncated to fit: R_PPC_REL24 pte_write
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/44x_tlb.c:464: undefined
reference to `pte_mkdirty'
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:464: relocation
truncated to fit: R_PPC_REL24 pte_mkdirty
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:466: undefined
reference to `pte_mkyoung'
/u/rcblach/405/2.4.0-test2/arch/ppc/mm/4xx_tlb.c:466: relocation
truncated to fit: R_PPC_REL24 pte_mkyoung

Can the linux kernel be compiled with debug information in any of its
modules? Is there a way to do this?
Or is the kernel just fundementally designed not to be compiled with
debug info in it.

Thanks

Chip


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Oct 07 2000 - 21:00:16 EST