From: Richard Henderson Date: Sat, 1 Jun 2002 21:56:41 +0000 (+0000) Subject: * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b646261c739ef7ba9f7710ce7bd99cccef154ffd;p=binutils-gdb.git * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e3090a230ba..bc28d60b148 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,7 @@ 2002-06-01 Richard Henderson + * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp. + * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic check; don't suppress dynamic relocs for non-allocated sections. diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 5986aef8f13..c37a81298ab 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -1656,19 +1656,15 @@ elf64_alpha_relax_section (abfd, sec, link_info, again) info.relocs = internal_relocs; info.relend = irelend = internal_relocs + sec->reloc_count; - /* Find the GP for this object. */ + /* Find the GP for this object. Do not store the result back via + _bfd_set_gp_value, since this could change again before final. */ info.gotobj = alpha_elf_tdata (abfd)->gotobj; if (info.gotobj) { asection *sgot = alpha_elf_tdata (info.gotobj)->got; - info.gp = _bfd_get_gp_value (info.gotobj); - if (info.gp == 0) - { - info.gp = (sgot->output_section->vma - + sgot->output_offset - + 0x8000); - _bfd_set_gp_value (info.gotobj, info.gp); - } + info.gp = (sgot->output_section->vma + + sgot->output_offset + + 0x8000); } for (irel = internal_relocs; irel < irelend; irel++)