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 | 9e51bd118f71a5bf8fff6d2ae0b45bd4a8f4bc4e (patch) | |
tree | d591620e550a1a536ac4ad08c4de2c892affa060 /bfd/elf.c | |
parent | 50279a38a49f646dd6bd3f9c2b844c6bd0918b50 (diff) | |
download | gdb-9e51bd118f71a5bf8fff6d2ae0b45bd4a8f4bc4e.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/elf.c')
-rw-r--r-- | bfd/elf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c index c5987fe6df3..4ddc99dee03 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; |