]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
authorAlan Modra <amodra@gmail.com>
Wed, 30 Jul 2003 02:15:07 +0000 (02:15 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 30 Jul 2003 02:15:07 +0000 (02:15 +0000)
* elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.

bfd/ChangeLog
bfd/elf-hppa.h
bfd/elf64-hppa.c

index 69e9a10cdf02f0d1968cbeb39112655778ab11b9..bf48d6235959c07ff63cdf49914a5eefa7a4b6c3 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-30  Randolph Chung  <tausq@debian.org>
+
+       * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
+       * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
+
 2003-07-30  Alan Modra  <amodra@bigpond.net.au>
 
        * elf.c: Convert to C90, remove unnecessary prototypes and casts.
index f3727466015a2893cf0ac3acfef06931c9e18eca..90f648289f67c45c8e409d606d23c50308f04611 100644 (file)
@@ -1491,12 +1491,25 @@ elf_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
                    (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
                     bfd_archive_filename (input_bfd), h->root.root.string,
                     bfd_get_section_name (input_bfd, input_section));
-                 relocation = 0;
                }
              relocation = 0;
            }
          else if (h->root.type == bfd_link_hash_undefweak)
-           relocation = 0;
+            {
+             dyn_name = get_dyn_name (input_section, h, rel,
+                                      &dynh_buf, &dynh_buflen);
+             dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table,
+                                                 dyn_name, FALSE, FALSE);
+
+             if (dyn_h == NULL)
+               {
+                 (*_bfd_error_handler)
+                   (_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
+                    bfd_archive_filename (input_bfd), h->root.root.string,
+                    bfd_get_section_name (input_bfd, input_section));
+               }
+             relocation = 0;
+           }
          else
            {
              /* Ignore dynamic loader defined symbols.  */
index 5d329e98de165e9941478208adb81570c8807499..f3398c15030a513121a785df8f584a35e9ec6461 100644 (file)
@@ -2258,7 +2258,9 @@ elf64_hppa_finalize_dlt (dyn_h, data)
                   + hppa_info->opd_sec->output_offset
                   + hppa_info->opd_sec->output_section->vma);
        }
-      else if (h->root.u.def.section)
+      else if ((h->root.type == bfd_link_hash_defined
+               || h->root.type == bfd_link_hash_defweak)
+              && h->root.u.def.section)
        {
          value = h->root.u.def.value + h->root.u.def.section->output_offset;
          if (h->root.u.def.section->output_section)