This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Results for 2.16.91 20050727 testsuite on sparc-unknown-linux-gnu


On Wed, Jul 27, 2005 at 07:07:51AM +0200, Christian Joensson wrote:
> could not find output section .plt for input section .plt

I think I should extend _bfd_elf_fix_excluded_sec_syms to handle symbols
defined in input sections.  I didn't do that originally because I broke
the ld-discard tests on my first try, which didn't have the SEC_EXCLUDE
test.

	* elflink.c (fix_syms): Handle symbols defined in input sections.

Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.182
diff -u -p -r1.182 elflink.c
--- bfd/elflink.c	26 Jul 2005 15:19:37 -0000	1.182
+++ bfd/elflink.c	27 Jul 2005 07:21:34 -0000
@@ -9911,10 +9911,11 @@ fix_syms (struct bfd_link_hash_entry *h,
     {
       asection *s = h->u.def.section;
       if (s != NULL
-	  && s == s->output_section
-	  && bfd_section_removed_from_list (obfd, s))
+	  && s->output_section != NULL
+	  && (s->output_section->flags & SEC_EXCLUDE) != 0
+	  && bfd_section_removed_from_list (obfd, s->output_section))
 	{
-	  h->u.def.value += s->vma;
+	  h->u.def.value += s->output_offset + s->output_section->vma;
 	  h->u.def.section = bfd_abs_section_ptr;
 	}
     }

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]