summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-04-30 10:30:05 +0000
committerAndreas Jaeger <aj@suse.de>2001-04-30 10:30:05 +0000
commit6a2bda3fa0a885cb4d25ada3dbe56d346bd08a24 (patch)
tree001067edd3684e603ba5b6b0d84c3c49d53315f0
parent35714f2a5daa9e8ec6a7da6553f5ed22d74fe564 (diff)
downloadppe42-binutils-6a2bda3fa0a885cb4d25ada3dbe56d346bd08a24.tar.gz
ppe42-binutils-6a2bda3fa0a885cb4d25ada3dbe56d346bd08a24.zip
* elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-x86-64.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f9cc5e38d8..ab373eaf45 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
+ R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
+
2001-04-27 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index f23e06cdb1..a92ba78c80 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1250,11 +1250,10 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
|| h->root.type == bfd_link_hash_defweak)
{
sec = h->root.u.def.section;
- if (r_type == R_X86_64_GOTPCREL
- || (r_type = R_X86_64_PLT32
- && splt != NULL
- && h->plt.offset != (bfd_vma) -1)
- || (r_type = R_X86_64_GOT32
+ if ((r_type == R_X86_64_PLT32
+ && splt != NULL
+ && h->plt.offset != (bfd_vma) -1)
+ || ((r_type == R_X86_64_GOT32 || r_type == R_X86_64_GOTPCREL)
&& elf_hash_table (info)->dynamic_sections_created
&& (!info->shared
|| (! info->symbolic && h->dynindx != -1)
@@ -1408,6 +1407,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
else
relocation = sgot->output_offset + off;
}
+
break;
case R_X86_64_PLT32:
OpenPOWER on IntegriCloud