From: Alan Modra Date: Wed, 27 Jul 2005 08:32:53 +0000 (+0000) Subject: * elflink.c (fix_syms): Handle symbols defined in input sections. X-Git-Tag: gdb-csl-arm-20051020-branchpoint~602 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f5028a7c8f6a9c9fb2d32a6962774b6fc87eb21;p=platform%2Fupstream%2Fbinutils.git * elflink.c (fix_syms): Handle symbols defined in input sections. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4286fdf..21ab9cc 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2005-07-27 Alan Modra + + * elflink.c (fix_syms): Handle symbols defined in input sections. + 2005-07-27 Jan Beulich * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New. diff --git a/bfd/elflink.c b/bfd/elflink.c index 98fee0c..62f80c9 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -9911,10 +9911,11 @@ fix_syms (struct bfd_link_hash_entry *h, void *data) { 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; } }