* elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
[deliverable/binutils-gdb.git] / bfd / elf32-hppa.c
index 45cc479dcfe0a6e216b642fdc0238cefab855bed..934c8e82b8a052ca35a517a8f05b84cc68c51723 100644 (file)
@@ -2209,19 +2209,19 @@ clobber_millicode_symbols (h, info)
      struct elf_link_hash_entry *h;
      struct bfd_link_info *info;
 {
-  /* We only want to remove these from the dynamic symbol table.
-     Therefore we do not leave ELF_LINK_FORCED_LOCAL set.  */
-  if (h->type == STT_PARISC_MILLI)
+  if (h->type == STT_PARISC_MILLI
+      && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
     {
       struct elf32_hppa_link_hash_table *htab;
-      unsigned short oldflags = h->elf_link_hash_flags;
 
       h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
       elf32_hppa_hide_symbol (info, h);
       htab = hppa_link_hash_table (info);
       _bfd_elf_strtab_delref (htab->elf.dynstr, h->dynstr_index);
+
+      /* ?!? We only want to remove these from the dynamic symbol table.
+        Therefore we do not leave ELF_LINK_FORCED_LOCAL set.  */
       h->elf_link_hash_flags &= ~ELF_LINK_FORCED_LOCAL;
-      h->elf_link_hash_flags |= oldflags & ELF_LINK_FORCED_LOCAL;
     }
   return true;
 }
@@ -3949,23 +3949,11 @@ elf32_hppa_relocate_section (output_bfd, info, input_bfd, input_section,
                 are copied into the output file to be resolved at run
                 time.  */
 
-             outrel.r_offset = rel->r_offset;
              outrel.r_addend = rel->r_addend;
-             skip = false;
-             if (elf_section_data (input_section)->stab_info != NULL)
-               {
-                 bfd_vma off;
-
-                 off = (_bfd_stab_section_offset
-                        (output_bfd, &htab->elf.stab_info,
-                         input_section,
-                         &elf_section_data (input_section)->stab_info,
-                         rel->r_offset));
-                 if (off == (bfd_vma) -1)
-                   skip = true;
-                 outrel.r_offset = off;
-               }
-
+             outrel.r_offset =
+               _bfd_elf_section_offset (output_bfd, info, input_section,
+                                        rel->r_offset);
+             skip = (outrel.r_offset == (bfd_vma) -1);
              outrel.r_offset += (input_section->output_offset
                                  + input_section->output_section->vma);
 
This page took 0.023742 seconds and 4 git commands to generate.