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


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

Does/can ld edit .stab sections?


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


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