This is the mail archive of the
mailing list for the binutils project.
Re: PR23425, unresolved symbol diagnostic
On 09/11/2018 05:04 PM, Tom Tromey wrote:
>>>>>> "Alan" == Alan Modra <firstname.lastname@example.org> 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.
Yeah, you can debug an unrelocated .o file directly,
like "file foo.o". The canonical testcase for that, I think is
> 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.
gdb.base/relocate.exp likely covers this.