This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A question about debug symbols in asm (x86)


I hope this is the right list for this:

I am working with kgdb and trying to get the line number stuff from an assembly
file, in this case entry.S. Here is the compile line:
/opt/montavista/pro/devkit/x86/pentium3/bin/pentium3-gcc
-Wp,-MD,arch/i386/kernel/.entry.o.d -nostdinc -isystem
/opt/montavista/pro/devkit/x86/pentium3/bin/../lib/gcc/i686-montavista-linux/3.4.3/include



-D__KERNEL__ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.12-rc/include -D__ASSEMBLY__ -I/usr/src/linux-2.6.12-rc/include/asm-i386/mach-default -Iinclude/asm-i386/mach-default -gdwarf-2 -traditional -c -o arch/i386/kernel/entry.o /usr/src/linux-2.6.12-rc/arch/i386/kernel/entry.S

Note the -gdwarf-2. Running nm -l on the resultant entry.o shows lines like:

00000acc t common_interrupt /usr/src/linux-2.6.12-rc/arch/i386/kernel/entry.S:441

This file is combined with a bunch of others thusly:

   /opt/montavista/pro/devkit/x86/pentium3/bin/pentium3-ld -m elf_i386  -R
arch/i386/kernel/vsyscall-syms.o -r -o arch/i386/kernel/built-in.o
arch/i386/kernel/process.o arch/i386/kernel/semaphore.o
arch/i386/kernel/signal.o arch/i386/kernel/entry.o arch/i386/kernel/traps.o
arch/i386/kernel/irq.o arch/i386/kernel/vm86.o arch/i386/kernel/ptrace.o
arch/i386/kernel/time.o arch/i386/kernel/ioport.o arch/i386/kernel/ldt.o
arch/i386/kernel/setup.o arch/i386/kernel/i8259.o arch/i386/kernel/sys_i386.o
arch/i386/kernel/pci-dma.o arch/i386/kernel/i386_ksyms.o arch/i386/kernel/i387.o
arch/i386/kernel/dmi_scan.o arch/i386/kernel/bootflag.o
arch/i386/kernel/doublefault.o arch/i386/kernel/quirks.o
arch/i386/kernel/cpu/built-in.o arch/i386/kernel/timers/built-in.o
arch/i386/kernel/acpi/built-in.o arch/i386/kernel/reboot.o
arch/i386/kernel/kgdb_stub.o arch/i386/kernel/smp.o arch/i386/kernel/smpboot.o
arch/i386/kernel/trampoline.o arch/i386/kernel/mpparse.o arch/i386/kernel/apic.o
arch/i386/kernel/nmi.o arch/i386/kernel/io_apic.o arch/i386/kernel/module.o
arch/i386/kernel/sysenter.o arch/i386/kernel/vsyscall.o
arch/i386/kernel/early_printk.o

to build built-in.o

Running nm -l built-in.o|grep entry.S gives:

000024cd t ldt_ss	/usr/src/linux-2.6.12-rc/arch/i386/kernel/entry.S:300
00000000 a /usr/src/linux-2.6.12-rc/arch/i386/kernel/entry.S

I.e all most all the symbols have gone.  What is going on here?
--
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]