This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Fix PR 425
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Tue, 5 Oct 2004 20:41:46 +0930
- Subject: Fix PR 425
It's not clear to me why _bfd_link_section_stabs ignores nested B_BINCL
stabs in the code that optimizes header file stabs and thus decides that
the stabs for t1.o and t2.o are the same. However, we run into the same
problem with R_*_NONE relocs if linking t1.o twice, ie. with
ld -r -o r1.o t1.o t1.o
bfd/
PR 425
* syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
Index: bfd/syms.c
===================================================================
RCS file: /cvs/src/src/bfd/syms.c,v
retrieving revision 1.36
diff -u -p -r1.36 syms.c
--- bfd/syms.c 24 Jun 2004 04:46:26 -0000 1.36
+++ bfd/syms.c 5 Oct 2004 10:57:37 -0000
@@ -1016,6 +1016,10 @@ _bfd_stab_section_find_nearest_line (bfd
asymbol *sym;
r = *pr;
+ /* Ignore R_*_NONE relocs. */
+ if (r->howto->dst_mask == 0)
+ continue;
+
if (r->howto->rightshift != 0
|| r->howto->size != 2
|| r->howto->bitsize != 32
--
Alan Modra
IBM OzLabs - Linux Technology Centre