diff options
author | Alan Modra <amodra@gmail.com> | 2005-07-27 08:32:53 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-07-27 08:32:53 +0000 |
commit | 2f5028a7c8f6a9c9fb2d32a6962774b6fc87eb21 (patch) | |
tree | 8a28b0895797c4ea5a100080a3a3f7e0fee65638 /bfd/elflink.c | |
parent | 8b5328ac50681bbb28f0f2b414a33e0fad079288 (diff) | |
download | gdb-2f5028a7c8f6a9c9fb2d32a6962774b6fc87eb21.zip gdb-2f5028a7c8f6a9c9fb2d32a6962774b6fc87eb21.tar.gz gdb-2f5028a7c8f6a9c9fb2d32a6962774b6fc87eb21.tar.bz2 |
* elflink.c (fix_syms): Handle symbols defined in input sections.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; } } |