Zero valued N_FUN stabs in shared objects: Why?
Ian Lance Taylor
ian@zembu.com
Fri Sep 10 16:51:00 GMT 1999
Date: Fri, 10 Sep 1999 15:18:13 -0700
From: Kevin Buettner <kevinb@cygnus.com>
Why do shared objects on Solaris and Linux have zero-valued
N_FUN stabs?
Good question. It doesn't happen with binutils 2.9.1, but it does
happen in the current development sources.
It's because of this bit of code in elf_i386_relocate_section in
bfd/elf32-i386.c:
/* DWARF will emit R_386_32 relocations in its
sections against symbols defined externally
in shared libraries. We can't do anything
with them here. */
|| (input_section->flags & SEC_DEBUGGING) != 0)))
If I remove that, N_FUN stabs are no longer zero.
Ulrich Drepper checked the patch into the Cygnus sources, before the
sourceware repository was created, with this ChangeLog entry:
1998-12-10 Richard Henderson <rth@cygnus.com>
* elf32-i386.c (elf_i386_relocate_section): Don't fail relocations
in debug sections for symbol defined externally.
Ulrich, Richard, you may recall that I complained about this at the
time. As far as I can recall, and based on my mail logs, we never
resolved that issue. We were left with the above patch, which breaks
things.
At the time I asked for a test case showing the problem, but I never
got one.
My inclination is to simply revert the patch until I find out why it
is needed. Any other suggestions?
Ian
More information about the Gdb
mailing list