* elf32-hppa.c (clobber_millicode_symbols): Temporarily set
authorAlan Modra <amodra@gmail.com>
Fri, 18 May 2001 03:11:13 +0000 (03:11 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 18 May 2001 03:11:13 +0000 (03:11 +0000)
ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
(hppa_build_one_stub): Add an assert to check plt.offset.

bfd/ChangeLog
bfd/elf32-hppa.c

index 3cccafc3294e5fc4833751286c27491a069aefac..1de70468a69bba8b522611c396ca13eb5d3ae3f3 100644 (file)
@@ -1,3 +1,9 @@
+2001-05-17  Alan Modra  <amodra@one.net.au>
+
+       * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
+       ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
+       (hppa_build_one_stub): Add an assert to check plt.offset.
+
 2001-05-17  H.J. Lu  <hjl@gnu.org>
 
        * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
index 02242154529ed0fd09cfb03d23727258fe5dc47a..3020df99c5659243a089bf1c7c97f2d28f224d9c 100644 (file)
@@ -938,6 +938,7 @@ hppa_build_one_stub (gen_entry, in_arg)
 
     case hppa_stub_import:
     case hppa_stub_import_shared:
+      BFD_ASSERT (stub_entry->h->elf.plt.offset < (bfd_vma) -2);
       sym_value = (stub_entry->h->elf.plt.offset
                   + hplink->splt->output_offset
                   + hplink->splt->output_section->vma
@@ -2147,7 +2148,13 @@ clobber_millicode_symbols (h, info)
   /* Note!  We only want to remove these from the dynamic symbol
      table.  Therefore we do not set ELF_LINK_FORCED_LOCAL.  */
   if (h->type == STT_PARISC_MILLI)
-    elf32_hppa_hide_symbol (info, h);
+    {
+      unsigned short oldflags = h->elf_link_hash_flags;
+      h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
+      elf32_hppa_hide_symbol (info, h);
+      h->elf_link_hash_flags &= ~ELF_LINK_FORCED_LOCAL;
+      h->elf_link_hash_flags |= oldflags & ELF_LINK_FORCED_LOCAL;
+    }
   return true;
 }