From: Richard Henderson Date: Tue, 21 Jul 1998 01:54:28 +0000 (+0000) Subject: * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=965d5a46beb1566f4d4cdfaf2b4d62eb5a301f5f;p=binutils-gdb.git * 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 03ae12d7204..0254c47b0a1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,17 @@ +Mon Jul 20 18:50:54 1998 Richard Henderson + + * 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 * aoutx.h (NAME(aout,find_nearest_line)): Also remember the diff --git a/bfd/elflink.h b/bfd/elflink.h index 4b56211dcd2..65b828cad75 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -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; }