diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2002-11-20 18:17:04 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2002-11-20 18:17:04 +0000 |
commit | 67bdd4ca02cdd9824069ac86e6184825fdc1e231 (patch) | |
tree | 3d9ad93b38a8f5e3c15d9a654862df3a70dcd4b9 /bfd | |
parent | 1e56e6242c6bb366365a878459691d08bd911aa3 (diff) | |
download | binutils-redhat-67bdd4ca02cdd9824069ac86e6184825fdc1e231.tar.gz |
* 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/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 561ff11413..c4b97ee3d5 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. @@ -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; |