+2005-07-27  Alan Modra  <amodra@bigpond.net.au>
+
+       * elflink.c (fix_syms): Handle symbols defined in input sections.
+
 2005-07-27  Jan Beulich  <jbeulich@novell.com>
 
        * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
 
     {
       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;
        }
     }