diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-02-26 18:25:23 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-02-26 18:25:23 +0000 |
commit | 68241b2b3f91c517b33a1d234ade7ed834f31f54 (patch) | |
tree | 41b3201d99fe49def28b99f908a7519b74f1deaf /bfd/ecofflink.c | |
parent | 3d51f02f4c683aa29fb45e9083ddddd1a1b9ce97 (diff) | |
download | gdb-68241b2b3f91c517b33a1d234ade7ed834f31f54.zip gdb-68241b2b3f91c517b33a1d234ade7ed834f31f54.tar.gz gdb-68241b2b3f91c517b33a1d234ade7ed834f31f54.tar.bz2 |
* aoutx.h, archive.c: Add casts to avoid warnings from SVR4 cc.
* ecoff.c, ecofflink.c, ecoffswap.h, srec.c: Likewise.
* elf32-i386.c: Likewise.
* elfcode.h (bfd_section_from_shdr): Make i unsigned; remove old
#if 0 code.
(elf_write_phdrs): Make i unsigned.
(map_program_segments): Make i and n_left unsigned.
(assign_file_positions_except_relocs): Make i unsigned.
(write_shdrs_and_ehdr): Make count unsigned.
(assign_file_positions_for_relocs): Make i unsigned.
(NAME(bfd,elf_write_object_contents)): Make count unsigned.
(section_from_elf_index): Make index argument unsigned.
Diffstat (limited to 'bfd/ecofflink.c')
-rw-r--r-- | bfd/ecofflink.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c index 596f169..a4507ea 100644 --- a/bfd/ecofflink.c +++ b/bfd/ecofflink.c @@ -932,7 +932,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug, asymbol **sym_end; PTR external_fdr; - memset (&fdr, 0, sizeof fdr); + memset ((PTR) &fdr, 0, sizeof fdr); sec = bfd_get_section_by_name (input_bfd, ".text"); if (sec != NULL) @@ -971,7 +971,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug, if (((*sym_ptr)->flags & BSF_EXPORT) != 0) continue; - memset (&internal_sym, 0, sizeof internal_sym); + memset ((PTR) &internal_sym, 0, sizeof internal_sym); internal_sym.iss = ecoff_add_string (ainfo, info, output_debug, &fdr, (*sym_ptr)->name); @@ -1168,7 +1168,7 @@ ecoff_align_debug (abfd, debug, swap) if (add != debug_align) { if (debug->line != (unsigned char *) NULL) - memset (debug->line + symhdr->cbLine, 0, add); + memset ((PTR) (debug->line + symhdr->cbLine), 0, add); symhdr->cbLine += add; } @@ -1176,7 +1176,7 @@ ecoff_align_debug (abfd, debug, swap) if (add != debug_align) { if (debug->ss != (char *) NULL) - memset (debug->ss + symhdr->issMax, 0, add); + memset ((PTR) (debug->ss + symhdr->issMax), 0, add); symhdr->issMax += add; } @@ -1184,7 +1184,7 @@ ecoff_align_debug (abfd, debug, swap) if (add != debug_align) { if (debug->ssext != (char *) NULL) - memset (debug->ssext + symhdr->issExtMax, 0, add); + memset ((PTR) (debug->ssext + symhdr->issExtMax), 0, add); symhdr->issExtMax += add; } @@ -1192,7 +1192,7 @@ ecoff_align_debug (abfd, debug, swap) if (add != aux_align) { if (debug->external_aux != (union aux_ext *) NULL) - memset (debug->external_aux + symhdr->iauxMax, 0, + memset ((PTR) (debug->external_aux + symhdr->iauxMax), 0, add * sizeof (union aux_ext)); symhdr->iauxMax += add; } @@ -1201,8 +1201,8 @@ ecoff_align_debug (abfd, debug, swap) if (add != rfd_align) { if (debug->external_rfd != (PTR) NULL) - memset (((char *) debug->external_rfd - + symhdr->crfd * swap->external_rfd_size), + memset ((PTR) ((char *) debug->external_rfd + + symhdr->crfd * swap->external_rfd_size), 0, add * swap->external_rfd_size); symhdr->crfd += add; } @@ -1263,6 +1263,8 @@ ecoff_write_symhdr (abfd, debug, swap, where) where += swap->external_hdr_size; + symhdr->magic = swap->sym_magic; + /* Fill in the file offsets. */ #define SET(offset, count, size) \ if (symhdr->count == 0) \ @@ -1376,7 +1378,7 @@ ecoff_write_shuffle (abfd, swap, shuffle, space) i = swap->debug_align - (total & (swap->debug_align - 1)); s = (bfd_byte *) alloca (i); - memset (s, 0, i); + memset ((PTR) s, 0, i); if (bfd_write ((PTR) s, 1, i, abfd) != i) return false; } @@ -1450,7 +1452,7 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where) i = swap->debug_align - (total & (swap->debug_align - 1)); s = (bfd_byte *) alloca (i); - memset (s, 0, i); + memset ((PTR) s, 0, i); if (bfd_write ((PTR) s, 1, i, abfd) != i) return false; } @@ -1469,7 +1471,7 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where) i = (swap->debug_align - (debug->symbolic_header.issExtMax & (swap->debug_align - 1))); s = (bfd_byte *) alloca (i); - memset (s, 0, i); + memset ((PTR) s, 0, i); if (bfd_write ((PTR) s, 1, i, abfd) != i) return false; } |