aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-10-10 20:38:06 +0000
committerKen Raeburn <raeburn@cygnus>1994-10-10 20:38:06 +0000
commit4c0322704fe60b6269ab19fe234d9b43cc35dc37 (patch)
tree03703389a1de47e5a7c6bf4f63852c14ead6fb95 /bfd/elfcode.h
parent4fbc96adc87a64d08dc08210681ff236d2484bd7 (diff)
downloadgdb-4c0322704fe60b6269ab19fe234d9b43cc35dc37.zip
gdb-4c0322704fe60b6269ab19fe234d9b43cc35dc37.tar.gz
gdb-4c0322704fe60b6269ab19fe234d9b43cc35dc37.tar.bz2
* cofflink.c (_bfd_coff_final_link): Cast argument to bfd_h_put_32 to correct
type. (coff_read_string_table): Cast argument to bfd_h_get_32 to correct type. * elfcode.h (elf_link_output_extsym): Cast argument to bfd_elf_hash to correct type.
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index f7b456f..8662c7f 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -2306,7 +2306,11 @@ swap_out_syms (abfd)
and the size into the `size' field. This is backwards from
how BFD handles it, so reverse it here. */
sym.st_size = value;
- sym.st_value = type_ptr ? type_ptr->internal_elf_sym.st_value : 16;
+ if (type_ptr == NULL
+ || type_ptr->internal_elf_sym.st_value == 0)
+ sym.st_value = value >= 16 ? 16 : (1 << bfd_log2 (value));
+ else
+ sym.st_value = type_ptr->internal_elf_sym.st_value;
sym.st_shndx = elf_section_from_bfd_section (abfd,
syms[idx]->section);
}
@@ -5916,7 +5920,7 @@ elf_link_output_extsym (h, data)
+ h->dynindx));
bucketcount = elf_hash_table (finfo->info)->bucketcount;
- bucket = bfd_elf_hash (h->root.root.string) % bucketcount;
+ bucket = bfd_elf_hash ((const unsigned char *) h->root.root.string) % bucketcount;
bucketpos = ((bfd_byte *) finfo->hash_sec->contents
+ (bucket + 2) * (ARCH_SIZE / 8));
chain = get_word (finfo->output_bfd, bucketpos);