
hi, we have purchased wind power ICE emulator and windriver workbench ocd 2.4. Now we have problem with debugging uboot's assembly files. The issue is same problem given below.
TITLE:When debugging some versions of the Linux u-boot application, the debugger cannot do source level debugging of assembly files.
SPR#:112280 DEFECT#:19830 FIX RECORD:19831 FIX RELEASE:Wind River Workbench 2.5 (2006-06-28 00:00:00) STATUS:In Progress PRODUCTS AFFECTED:Wind River Workbench 2.4 DESCRIPTION:When debugging some versions of the Linux u-boot application, the debugger does not perform source level debugging of assembly files. Workbench fails to find the correct assembly source file at the u-boot program entry point. Note that in this scenario, the debugger does not have any problems debugging C source files.
The problem is actually due to incorrect u-boot makefile configuration where assembly files are built with the directive -Wa,-gstabs, whereas the C files are built with -gdwarf-2. This results in mixed STABS debug information for assembly files and DWARF-2 debug information for C files in the object-file. The Workbench debugger has very limited support for STABS on Linux, which is mainly restricted to global information in system libraries (on 2.4.x Linux distributions). The debugger fully supports DWARF-2. STEPS TO REPRODUCE:No Details Available. WORKAROUND:Date Created: 11/17/2005 09:33:45 Visibility: External Created By: rarunkum Type: Workaround
The workaround is to change the config.mk in the root level of the u-boot source. Find the line:
AFLAGS_DEBUG := -Wa,-gstabs
Change it to: AFLAGS_DEBUG := -Wa,-gdwarf2
Then rebuild u-boot and now you will have DWARF-2 debug information for all source files. Workbench will now allow you to do source-level debugging of the assembly file also.
###############################################################################
As you see from windriver's report. They suggest to modify AFLAGS_DEBUG value to -gdwarf2. But when I compile uboot after modifying, compiler gives me these error messages.
opt/WindRiver_Evaluation2.4/workspace/uboot/lib_ppc/ppcstring.S: Assembler messages: /opt/WindRiver_Evaluation2.4/workspace/uboot/lib_ppc/ppcstring.S:216: Error: Relocation cannot be done when using -mrelocatable /opt/WindRiver_Evaluation2.4/workspace/uboot/lib_ppc/ppcstring.S:216: Error: Relocation cannot be done when using -mrelocatable /opt/WindRiver_Evaluation2.4/workspace/uboot/lib_ppc/ppcstring.S:216: Error: Relocation cannot be done when using -mrelocatable /opt/WindRiver_Evaluation2.4/workspace/uboot/lib_ppc/ppcstring.S:216: Error: Relocation cannot be done when using -mrelocatable /opt/WindRiver_Evaluation2.4/workspace/uboot/lib_ppc/ppcstring.S:216: Error: Relocation cannot be done when using -mrelocatable /opt/WindRiver_Evaluation2.4/workspace/uboot/lib_ppc/ppcstring.S:216: Error: Relocation cannot be done when using -mrelocatable /opt/WindRiver_Evaluation2.4/workspace/uboot/lib_ppc/ppcstring.S:216: Error: Relocation cannot be done when using -mrelocatable
I'm using uboot 1.0.0 and gcc 2.95 for powerpc. I'm using this combination,because only this combination works properly for our marvell mv64460 development board.
In your opinion, how can I fix this problem?