diff options
author | Andreas Jaeger <aj@suse.de> | 2001-04-30 10:30:05 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2001-04-30 10:30:05 +0000 |
commit | 80a9f6681604c6ef92e41592093dc067e695b29b (patch) | |
tree | 0738a49776909859033429092dcb3208b61e4c88 /bfd/elf64-x86-64.c | |
parent | 8bb4d2ff6813d0e3b341fc31cadafd65c1cfb117 (diff) | |
download | gdb-80a9f6681604c6ef92e41592093dc067e695b29b.tar.gz |
* elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r-- | bfd/elf64-x86-64.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index f23e06cdb13..a92ba78c800 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: |