aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2002-11-20 18:17:04 +0000
committerAlexandre Oliva <aoliva@redhat.com>2002-11-20 18:17:04 +0000
commit963f13ecfe413460bc1d8b18847eb42cd2e8b0f5 (patch)
tree9f9ea981e0a10ab9259719aad26aca0b5cf74af2 /bfd
parenta1358604f19f33d3b588e685f85cbee16ba8bb50 (diff)
downloadgdb-963f13ecfe413460bc1d8b18847eb42cd2e8b0f5.zip
gdb-963f13ecfe413460bc1d8b18847eb42cd2e8b0f5.tar.gz
gdb-963f13ecfe413460bc1d8b18847eb42cd2e8b0f5.tar.bz2
* elf.c (_bfd_elf_link_hash_table_init): Make sure
can_refcount is properly extended to the type of init_refcount.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 561ff11..c4b97ee 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2002-11-20 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf.c (_bfd_elf_link_hash_table_init): Make sure
+ can_refcount is properly extended to the type of
+ init_refcount.
+
2002-11-19 Alexandre Oliva <aoliva@redhat.com>
* elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
diff --git a/bfd/elf.c b/bfd/elf.c
index c5987fe..4ddc99d 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1503,7 +1503,10 @@ _bfd_elf_link_hash_table_init (table, abfd, newfunc)
table->dynamic_sections_created = false;
table->dynobj = NULL;
- table->init_refcount = get_elf_backend_data (abfd)->can_refcount - 1;
+ /* Make sure can_refcount is extended to the width and signedness of
+ init_refcount before we subtract one from it. */
+ table->init_refcount = get_elf_backend_data (abfd)->can_refcount;
+ --table->init_refcount;
/* The first dynamic symbol is a dummy. */
table->dynsymcount = 1;
table->dynstr = NULL;