aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-04-27 15:24:08 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-04-27 15:25:30 -0700
commit5b66fac4bad619766fb1a5f5179c08b67d48a8c5 (patch)
tree6ba38b5b1aab3b360d2917456682a9d2ee3ca895 /bfd
parent72bc1d246686ff38ef01f5a35769ebdbe39f023c (diff)
downloadgdb-5b66fac4bad619766fb1a5f5179c08b67d48a8c5.zip
gdb-5b66fac4bad619766fb1a5f5179c08b67d48a8c5.tar.gz
gdb-5b66fac4bad619766fb1a5f5179c08b67d48a8c5.tar.bz2
x86-64: Use "=" instead of "+=" to update 0
Use if (htab->elf.splt->size == 0) htab->elf.splt->size = GET_PLT_ENTRY_SIZE (output_bfd); instead of if (htab->elf.splt->size == 0) htab->elf.splt->size += GET_PLT_ENTRY_SIZE (output_bfd); * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "=" instead of "+=" to update 0.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-x86-64.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0d328b4..3ae5c9f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
+ * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
+ instead of "+=" to update 0.
+
+2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
+
* elf32-i386.c (elf_i386_create_dynamic_sections): Create the
.plt.got section here.
(elf_i386_check_relocs): Don't create the .plt.got section.
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 5985319..6f9bc36 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -3850,7 +3850,7 @@ elf_x86_64_size_dynamic_sections (bfd *output_bfd,
/* Reserve room for the initial entry.
FIXME: we could probably do away with it in this case. */
if (htab->elf.splt->size == 0)
- htab->elf.splt->size += GET_PLT_ENTRY_SIZE (output_bfd);
+ htab->elf.splt->size = GET_PLT_ENTRY_SIZE (output_bfd);
htab->tlsdesc_plt = htab->elf.splt->size;
htab->elf.splt->size += GET_PLT_ENTRY_SIZE (output_bfd);
}