From: Maciej W. Rozycki Date: Sat, 19 May 2012 19:30:45 +0000 (+0000) Subject: * elf64-mips.c (elf_backend_got_header_size): Correct definition. X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=a44acb1ed2e00707e619ef389d38572de2530d76;p=deliverable%2Fbinutils-gdb.git * elf64-mips.c (elf_backend_got_header_size): Correct definition. * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF backend's GOT header size instead of hardcoding it. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index a3daca5f00..efa6cb7b4c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2012-05-19 Maciej W. Rozycki + + * elf64-mips.c (elf_backend_got_header_size): Correct definition. + * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF + backend's GOT header size instead of hardcoding it. + 2012-05-19 Maciej W. Rozycki * elf32-vax.c (elf_vax_relocate_section) diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c index 054b262dc4..e02f969ed8 100644 --- a/bfd/elf64-mips.c +++ b/bfd/elf64-mips.c @@ -4126,7 +4126,7 @@ const struct elf_size_info mips_elf64_size_info = #define elf_backend_grok_prstatus elf64_mips_grok_prstatus #define elf_backend_grok_psinfo elf64_mips_grok_psinfo -#define elf_backend_got_header_size (4 * MIPS_RESERVED_GOTNO) +#define elf_backend_got_header_size (8 * MIPS_RESERVED_GOTNO) /* MIPS ELF64 can use a mixture of REL and RELA, but some Relocations work better/work only in RELA, so we default to this. */ diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 6dd0592917..9b4ccbf95d 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -8665,7 +8665,8 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* On non-VxWorks targets, the first two entries in .got.plt are reserved. */ if (!htab->is_vxworks) - htab->sgotplt->size += 2 * MIPS_ELF_GOT_SIZE (dynobj); + htab->sgotplt->size + += get_elf_backend_data (dynobj)->got_header_size; /* On VxWorks, also allocate room for the header's .rela.plt.unloaded entries. */