From 34d3d6b92226ffeabe62f20198ff071642d3cb1c Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Wed, 25 Mar 2009 03:03:40 +0000 Subject: [PATCH] * elf32-cris.c (cris_elf_relocate_section) : Handle COMMON symbols. : Ditto. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-cris.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dfb9bb596d..4ad599b2e1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2009-03-25 Hans-Peter Nilsson + + * elf32-cris.c (cris_elf_relocate_section) + : Handle COMMON symbols. + : Ditto. + 2009-03-24 H.J. Lu * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static. diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index ed1f3e8d50..2037b10f59 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1733,7 +1733,8 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, return FALSE; } - if (!info->shared && (h == NULL || h->def_regular)) + if (!info->shared + && (h == NULL || h->def_regular || ELF_COMMON_DEF_P (h))) { /* Known contents of the GOT. */ bfd_vma off; @@ -2000,7 +2001,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, if (h != NULL && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT - && !h->def_regular + && !(h->def_regular || ELF_COMMON_DEF_P (h)) /* If it's undefined, then an error message has already been emitted. */ && h->root.type != bfd_link_hash_undefined) -- 2.34.1