* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
authorHans-Peter Nilsson <hp@axis.com>
Thu, 7 Nov 2002 13:28:04 +0000 (13:28 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Thu, 7 Nov 2002 13:28:04 +0000 (13:28 +0000)
case R_CRIS_32_GOT>: Correct test for filling in constant .got
contents, enabling for a non-DSO, for symbols defined in the
program with --export-dynamic.

bfd/ChangeLog
bfd/elf32-cris.c

index d97edd235684783fda994fb20226d8a608d1e9cc..941da8a28d134aa470a968054e91c15388576165 100644 (file)
@@ -1,3 +1,10 @@
+2002-11-07  Hans-Peter Nilsson  <hp@axis.com>
+
+       * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
+       case R_CRIS_32_GOT>: Correct test for filling in constant .got
+       contents, enabling for a non-DSO, for symbols defined in the
+       program with --export-dynamic.
+
 2002-11-07  Alan Modra  <amodra@bigpond.net.au>
 
        * elf64-ppc.c: Comment typo fixes.
index 8eff52dd5ade384bb1f16f6f700854f5fa4c53e4..dfbdbe75f683c0569ad38f2a718c6f98fa979f21 100644 (file)
@@ -1022,7 +1022,8 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                BFD_ASSERT (off != (bfd_vma) -1);
 
                if (!elf_hash_table (info)->dynamic_sections_created
-                   || (! info->shared && h->dynindx == -1)
+                   || (! info->shared
+                       && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
                    || (info->shared
                        && (info->symbolic || h->dynindx == -1)
                        && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))