[U-Boot-Users] Compiler optimizations and debugging
llandre
r&d at wawnet.biz
Thu Mar 20 11:05:07 CET 2003
To make the step-by-step debugging easier with GDB/DDD, I removed the
optimization flag "-Os" from the config.mk file. In fact, with the
optimization turned on, the code seems not to be executed sequentially
inside code window. However, without the -Os flag, the linker is unable to
complete the build:
ppc-linux-ld -Bstatic -T
/proj/ppc405ep/sw/u-boot/board/bubinga405ep/u-boot.lds -Ttext 0xFFF80000 -n
cpu/ppc4xx/start.o cpu/ppc4xx/resetvec.o \
--start-group board/bubinga405ep/libbubinga405ep.a
cpu/ppc4xx/libppc4xx.a lib_ppc/libppc.a fs/jffs2/libjffs2.a
fs/fdos/libfdos.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a
drivers/libdrivers.a post/libpost.a post/cpu/libcpu.a common/libcommon.a
lib_generic/libgeneric.a --end-group \
-Map u-boot.map -o u-boot
cpu/ppc4xx/libppc4xx.a(405gp_pci.o): In function `pci_405gp_init':
/proj/ppc405ep/sw/u-boot/cpu/ppc4xx/405gp_pci.c:125: undefined reference to
`pci_set_region'
/proj/ppc405ep/sw/u-boot/cpu/ppc4xx/405gp_pci.c:132: undefined reference to
`pci_set_region'
/proj/ppc405ep/sw/u-boot/cpu/ppc4xx/405gp_pci.c:146: undefined reference to
`pci_set_region'
/proj/ppc405ep/sw/u-boot/cpu/ppc4xx/405gp_pci.c:157: undefined reference to
`pci_set_region'
drivers/libdrivers.a(pci_indirect.o): In function `indirect_read_config_byte':
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:48: undefined reference to
`out_le32'
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:48: undefined reference to
`in_8'
drivers/libdrivers.a(pci_indirect.o): In function `indirect_read_config_word':
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:49: undefined reference to
`out_le32'
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:49: undefined reference to
`in_le16'
drivers/libdrivers.a(pci_indirect.o): In function `indirect_read_config_dword':
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:50: undefined reference to
`out_le32'
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:50: undefined reference to
`in_le32'
drivers/libdrivers.a(pci_indirect.o): In function `indirect_write_config_byte':
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:56: undefined reference to
`out_le32'
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:56: undefined reference to
`out_8'
drivers/libdrivers.a(pci_indirect.o): In function `indirect_write_config_word':
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:57: undefined reference to
`out_le32'
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:57: undefined reference to
`out_le16'
drivers/libdrivers.a(pci_indirect.o): In function
`indirect_write_config_dword':
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:58: undefined reference to
`out_le32'
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:58: undefined reference to
`out_le32'
drivers/libdrivers.a(pci_indirect.o): In function `pci_setup_indirect':
/proj/ppc405ep/sw/u-boot/drivers/pci_indirect.c:63: undefined reference to
`pci_set_ops'
make: *** [u-boot] Error 1
Why is the -Os flag absolutely necessary?
llandre
More information about the U-Boot
mailing list