From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Lance Taylor To: kevinb@cygnus.com, drepper@cygnus.com, rth@cygnus.com Cc: gdb@sourceware.cygnus.com, binutils@sourceware.cygnus.com, jimb@cygnus.com Subject: Re: Zero valued N_FUN stabs in shared objects: Why? Date: Fri, 10 Sep 1999 16:51:00 -0000 Message-id: <19990910234925.15322.qmail@daffy.airs.com> References: <990910221813.ZM20583@ocotillo.lan> X-SW-Source: 1999-09/msg00087.html Date: Fri, 10 Sep 1999 15:18:13 -0700 From: Kevin Buettner 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 * 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