diff options
author | Richard Henderson <rth@redhat.com> | 2002-06-01 21:56:41 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2002-06-01 21:56:41 +0000 |
commit | b646261c739ef7ba9f7710ce7bd99cccef154ffd (patch) | |
tree | e240bb31b21120f2c9481e93cdfb51b6739b8c01 /bfd/elf64-alpha.c | |
parent | d7e41a96e6d1c66ace3414ee322c7ba29bf4b27b (diff) | |
download | gdb-b646261c739ef7ba9f7710ce7bd99cccef154ffd.zip gdb-b646261c739ef7ba9f7710ce7bd99cccef154ffd.tar.gz gdb-b646261c739ef7ba9f7710ce7bd99cccef154ffd.tar.bz2 |
* elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
Diffstat (limited to 'bfd/elf64-alpha.c')
-rw-r--r-- | bfd/elf64-alpha.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 5986aef..c37a812 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++) |