aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-07-15 13:09:55 -0700
committerH.J. Lu <hjl.tools@gmail.com>2014-07-15 13:09:55 -0700
commit998d811a23ca3f2c463dfaf40259486ff9958244 (patch)
treeb3ca3258d07e8ef24751a7c10708e1f7a68d7f85 /bfd
parent41e995687391695e16550eb9c18da8e5d0dcffa9 (diff)
downloadgdb-998d811a23ca3f2c463dfaf40259486ff9958244.zip
gdb-998d811a23ca3f2c463dfaf40259486ff9958244.tar.gz
gdb-998d811a23ca3f2c463dfaf40259486ff9958244.tar.bz2
Update elf_i386_compute_jump_table_size
Commit e1f987424b7b3f5ac63a2a6ae044a202a44b8ff8 changed how next_tls_desc_index was set up. This patch updates elf_i386_compute_jump_table_size to use elf.srelplt->reloc_count instead of next_tls_desc_index. bfd/ PR ld/17057 * elf32-i386.c (elf_i386_compute_jump_table_size): Replace next_tls_desc_index with elf.srelplt->reloc_count. ld/testsuite/ PR ld/17057 * ld-i386/i386.exp: Run pr17057. * ld-i386/pr17057.d: New file. * ld-i386/pr17057.s: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-i386.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 96f85f7..1ecacdd 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2014-07-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/17057
+ * elf32-i386.c (elf_i386_compute_jump_table_size): Replace
+ next_tls_desc_index with elf.srelplt->reloc_count.
+
2014-07-15 Alan Modra <amodra@gmail.com>
* cache.c (cache_bread_1): Don't return -1 when fread returns
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 551d179..2244c6c 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -826,7 +826,7 @@ struct elf_i386_link_hash_table
== I386_ELF_DATA ? ((struct elf_i386_link_hash_table *) ((p)->hash)) : NULL)
#define elf_i386_compute_jump_table_size(htab) \
- ((htab)->next_tls_desc_index * 4)
+ ((htab)->elf.srelplt->reloc_count * 4)
/* Create an entry in an i386 ELF linker hash table. */