This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Re: Why doesn't objdump display assembly code mixed with source code?
- From: "PRC" <panruochen at gmail dot com>
- To: "binutils" <binutils at sourceware dot org>, "brian" <brian at dessent dot net>
- Date: Tue, 11 Mar 2008 15:16:30 +0800
- Subject: Re: Re: Why doesn't objdump display assembly code mixed with source code?
- References: <200803111216420813731@gmail.com>, <47D625AC.71076B14@dessent.net>
I change the linker script to:
---------------------------------
OUTPUT_ARCH(mips)
ENTRY(main)
SECTIONS
{
.text 0x80051000 :
{
*(.text)
*(.rodata*)
}
.data :
{
*(.data)
*(.sdata)
}
.sbss :
{
*(.sbss)
*(.scommon)
}
.bss :
{
*(.bss)
*(COMMON)
}
.pdr :
{
*(.pdr)
}
.mdebug.abi32 :
{
*(.mdebug.abi32)
}
.debug_info :
{
*(.debug_info)
}
.debug_line :
{
*(.debug_line)
}
.debug_frame :
{
*(.debug_frame)
}
.debug_pubnames :
{
*(.debug_pubnames)
}
.debug_aranges :
{
*(.debug_aranges)
}
}
There is still not source code in the dumpped list file.
BTW, mips-elf-gdb can see debug information in the same "a.out".
>How could it? Your link script discards the debug sections, which are
>necessary to get source line information.
>
>Brian