diff options
author | Ken Raeburn <raeburn@cygnus> | 1994-10-10 20:38:06 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@cygnus> | 1994-10-10 20:38:06 +0000 |
commit | 4c0322704fe60b6269ab19fe234d9b43cc35dc37 (patch) | |
tree | 03703389a1de47e5a7c6bf4f63852c14ead6fb95 /bfd | |
parent | 4fbc96adc87a64d08dc08210681ff236d2484bd7 (diff) | |
download | gdb-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')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/elfcode.h | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fc6da56..e062a10 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,12 @@ Mon Oct 10 16:24:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com> + * 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. + * elf32-sparc.c (elf_sparc_howto_table): The PC10, PC22, and WPLT30 relocations are PC-relative. 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); |