* elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
authorRichard Henderson <rth@redhat.com>
Tue, 21 Jul 1998 01:54:28 +0000 (01:54 +0000)
committerRichard Henderson <rth@redhat.com>
Tue, 21 Jul 1998 01:54:28 +0000 (01:54 +0000)
        * elf32-i386.c (elf_backend_got_header_size): Define.
        (elf_backend_plt_header_size): Define.
        * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
        * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
        * elfxx-target.h: Provide a default of zero.
        * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
        * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.

        * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
        entry from an executable, even if the plt refcount goes to 0.

bfd/ChangeLog
bfd/elflink.h

index 03ae12d7204bcb604ad92a7b47ae076e62a403b1..0254c47b0a10b5002cf4afca56749b2443642f5d 100644 (file)
@@ -1,3 +1,17 @@
+Mon Jul 20 18:50:54 1998  Richard Henderson  <rth@cygnus.com>
+
+       * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
+       * elf32-i386.c (elf_backend_got_header_size): Define.
+       (elf_backend_plt_header_size): Define.
+       * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
+       * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
+       * elfxx-target.h: Provide a default of zero.
+       * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
+       * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.
+
+       * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
+       entry from an executable, even if the plt refcount goes to 0.
+
 Mon Jul 20 12:47:26 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
        * aoutx.h (NAME(aout,find_nearest_line)): Also remember the
index 4b56211dcd2248967b6b46c5dc9878f2bc79f8af..65b828cad751fd1af7ebe7a920174c58fdfee650 100644 (file)
@@ -5803,7 +5803,7 @@ elf_gc_common_finalize_got_offsets (abfd, info)
      struct bfd_link_info *info;
 {
   bfd *i;
-  bfd_vma off[2], gotoff = 0;
+  bfd_vma gotoff = get_elf_backend_data (abfd)->got_header_size;
 
   /* Do the local .got entries first.  */
   for (i = info->input_bfds; i; i = i->link_next)
@@ -5834,11 +5834,9 @@ elf_gc_common_finalize_got_offsets (abfd, info)
     }
 
   /* Then the global .got and .plt entries.  */
-  off[0] = gotoff;
-  off[1] = 0;
   elf_link_hash_traverse (elf_hash_table (info),
                          elf_gc_allocate_got_offsets,
-                         (PTR) off);
+                         (PTR) &gotoff);
   return true;
 }