This is the mail archive of the
mailing list for the GDB project.
Does/can ld edit .stab sections?
- To: binutils at sources dot redhat dot com
- Subject: Does/can ld edit .stab sections?
- From: Daniel Jacobowitz <drow at mvista dot com>
- Date: Thu, 1 Nov 2001 11:59:47 -0500
- Cc: gdb at sources dot redhat dot com
I just debugged a problem with GDB and mips/Linux kernels, that went
something like this:
af_packet.c:packet_exit is in the .text.exit section.
ld.script for the kernel has .text.exit marked as /DISCARD/
the .stab section contains relocations describing the packet_exit
function, which are resolved to be against 0.
the range of the symtab for af_packet.c (slightly bogus already in
the presence of multiple sections; DWARF ranges can express this,
and Jim is adding support for them, but I can't think of how to
infer the necessary data for .stab debugging) is set absurdly
large, because it "contains" a function at 0x00000034. The kernel
is linked at 0xffffffff80000000, MIPS being what it is.
Is there any way to remove stabs which reference discarded sections?
Or perhaps to generate separate stab sections for each original section
and merge them at link time?
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer