PR23425, unresolved symbol diagnostic

Tom Tromey tom@tromey.com
Tue Sep 11 16:04:00 GMT 2018


>>>>> "Alan" == Alan Modra <amodra@gmail.com> writes:

Alan> I think this should be OK for all the gdb uses of
Alan> bfd_simple_get_relocated_section_contents or similar code in
Alan> compile-object-load.c, but I won't commit this immediately to give gdb
Alan> folk time to comment.

There should be gdb test cases covering the relocation cases.

For the compile feature you'll need to make sure your gcc is
compile-capable and that the needed library and plugin are installed.

However, I believe relocation isn't only used for the compile feature.
There's this in dwarf2read.c:

  /* When debugging .o files, we may need to apply relocations; see
     http://sourceware.org/ml/gdb-patches/2002-04/msg00136.html .
     We never compress sections in .o files, so we only need to
     try this when the section is not compressed.  */
  retbuf = symfile_relocate_debug_section (objfile, sectp, buf);

I don't know if there is a test case for this or not -- I'd hope so.

Tom



More information about the Binutils mailing list