* 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.
This commit is contained in:
Richard Henderson 1998-07-21 01:54:28 +00:00
parent 8339eb6566
commit 965d5a46be
2 changed files with 16 additions and 4 deletions

View 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

View 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;
}