* dwarf2dbg.c (dwarf2_directive_file): Avoid signed/unsigned warning.
* write.c (set_symtab): Update bfd_alloc declaration. Use a temp var to ensure bfd_alloc arg is the right type. (write_object_file): Cast args of bfd_seek. Replace bfd_write with bfd_bwrite. * config/obj-coff.c: Replace calls to bfd_write with calls to bfd_bwrite. Cast args of bfd_seek. * config/obj-elf.c (obj_elf_change_section): Avoid signed/unsigned warning. * config/tc-mn10300.c (set_arch_mach): Make param unsigned. * config/tc-tic54x.c (tic54x_mlib): Replace bfd_read call with call to bfd_bread.
This commit is contained in:
parent
e59b4dfbd2
commit
0e1a166b28
7 changed files with 41 additions and 20 deletions
|
@ -1,3 +1,23 @@
|
||||||
|
2001-09-18 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* dwarf2dbg.c (dwarf2_directive_file): Avoid signed/unsigned warning.
|
||||||
|
|
||||||
|
* write.c (set_symtab): Update bfd_alloc declaration. Use a temp
|
||||||
|
var to ensure bfd_alloc arg is the right type.
|
||||||
|
(write_object_file): Cast args of bfd_seek. Replace bfd_write with
|
||||||
|
bfd_bwrite.
|
||||||
|
|
||||||
|
* config/obj-coff.c: Replace calls to bfd_write with calls to
|
||||||
|
bfd_bwrite. Cast args of bfd_seek.
|
||||||
|
|
||||||
|
* config/obj-elf.c (obj_elf_change_section): Avoid signed/unsigned
|
||||||
|
warning.
|
||||||
|
|
||||||
|
* config/tc-mn10300.c (set_arch_mach): Make param unsigned.
|
||||||
|
|
||||||
|
* config/tc-tic54x.c (tic54x_mlib): Replace bfd_read call with
|
||||||
|
call to bfd_bread.
|
||||||
|
|
||||||
2001-09-15 Hans-Peter Nilsson <hp@bitrange.com>
|
2001-09-15 Hans-Peter Nilsson <hp@bitrange.com>
|
||||||
|
|
||||||
* config/tc-sh.h (sh_force_relocation): Prototype.
|
* config/tc-sh.h (sh_force_relocation): Prototype.
|
||||||
|
|
|
@ -2059,8 +2059,8 @@ do_relocs_for (abfd, h, file_cursor)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Write out the reloc table */
|
/* Write out the reloc table */
|
||||||
bfd_write ((PTR) external_reloc_vec, 1, external_reloc_size,
|
bfd_bwrite ((PTR) external_reloc_vec,
|
||||||
abfd);
|
(bfd_size_type) external_reloc_size, abfd);
|
||||||
free (external_reloc_vec);
|
free (external_reloc_vec);
|
||||||
|
|
||||||
/* Fill in section header info. */
|
/* Fill in section header info. */
|
||||||
|
@ -2202,7 +2202,7 @@ fill_section (abfd, h, file_cursor)
|
||||||
{
|
{
|
||||||
if (s->s_scnptr != 0)
|
if (s->s_scnptr != 0)
|
||||||
{
|
{
|
||||||
bfd_write (buffer, s->s_size, 1, abfd);
|
bfd_bwrite (buffer, s->s_size, abfd);
|
||||||
*file_cursor += s->s_size;
|
*file_cursor += s->s_size;
|
||||||
}
|
}
|
||||||
free (buffer);
|
free (buffer);
|
||||||
|
@ -2226,7 +2226,7 @@ coff_header_append (abfd, h)
|
||||||
unsigned long string_size = 4;
|
unsigned long string_size = 4;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bfd_seek (abfd, 0, 0);
|
bfd_seek (abfd, (file_ptr) 0, 0);
|
||||||
|
|
||||||
#ifndef OBJ_COFF_OMIT_OPTIONAL_HEADER
|
#ifndef OBJ_COFF_OMIT_OPTIONAL_HEADER
|
||||||
H_SET_MAGIC_NUMBER (h, COFF_MAGIC);
|
H_SET_MAGIC_NUMBER (h, COFF_MAGIC);
|
||||||
|
@ -2242,8 +2242,8 @@ coff_header_append (abfd, h)
|
||||||
|
|
||||||
i = bfd_coff_swap_filehdr_out (abfd, &h->filehdr, buffer);
|
i = bfd_coff_swap_filehdr_out (abfd, &h->filehdr, buffer);
|
||||||
|
|
||||||
bfd_write (buffer, i, 1, abfd);
|
bfd_bwrite (buffer, (bfd_size_type) i, abfd);
|
||||||
bfd_write (buffero, H_GET_SIZEOF_OPTIONAL_HEADER (h), 1, abfd);
|
bfd_bwrite (buffero, (bfd_size_type) H_GET_SIZEOF_OPTIONAL_HEADER (h), abfd);
|
||||||
|
|
||||||
for (i = SEG_E0; i < SEG_LAST; i++)
|
for (i = SEG_E0; i < SEG_LAST; i++)
|
||||||
{
|
{
|
||||||
|
@ -2268,7 +2268,7 @@ coff_header_append (abfd, h)
|
||||||
buffer);
|
buffer);
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
as_bad (_("bfd_coff_swap_scnhdr_out failed"));
|
as_bad (_("bfd_coff_swap_scnhdr_out failed"));
|
||||||
bfd_write (buffer, size, 1, abfd);
|
bfd_bwrite (buffer, (bfd_size_type) size, abfd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3395,7 +3395,7 @@ do_linenos_for (abfd, h, file_cursor)
|
||||||
|
|
||||||
s->scnhdr.s_lnnoptr = *file_cursor;
|
s->scnhdr.s_lnnoptr = *file_cursor;
|
||||||
|
|
||||||
bfd_write (buffer, 1, s->scnhdr.s_nlnno * LINESZ, abfd);
|
bfd_bwrite (buffer, (bfd_size_type) s->scnhdr.s_nlnno * LINESZ, abfd);
|
||||||
free (buffer);
|
free (buffer);
|
||||||
|
|
||||||
*file_cursor += s->scnhdr.s_nlnno * LINESZ;
|
*file_cursor += s->scnhdr.s_nlnno * LINESZ;
|
||||||
|
@ -3618,7 +3618,8 @@ write_object_file ()
|
||||||
w_symbols (abfd, buffer1, symbol_rootP);
|
w_symbols (abfd, buffer1, symbol_rootP);
|
||||||
if (string_byte_count > 0)
|
if (string_byte_count > 0)
|
||||||
w_strings (buffer1 + symtable_size);
|
w_strings (buffer1 + symtable_size);
|
||||||
bfd_write (buffer1, 1, symtable_size + string_byte_count, abfd);
|
bfd_bwrite (buffer1, (bfd_size_type) symtable_size + string_byte_count,
|
||||||
|
abfd);
|
||||||
free (buffer1);
|
free (buffer1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -721,7 +721,7 @@ obj_elf_change_section (name, type, attr, entsize, push)
|
||||||
& (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
|
& (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
|
||||||
| SEC_EXCLUDE | SEC_SORT_ENTRIES | SEC_MERGE | SEC_STRINGS))
|
| SEC_EXCLUDE | SEC_SORT_ENTRIES | SEC_MERGE | SEC_STRINGS))
|
||||||
as_warn (_("Ignoring changed section attributes for %s"), name);
|
as_warn (_("Ignoring changed section attributes for %s"), name);
|
||||||
else if ((flags & SEC_MERGE) && old_sec->entsize != entsize)
|
else if ((flags & SEC_MERGE) && old_sec->entsize != (unsigned) entsize)
|
||||||
as_warn (_("Ignoring changed section entity size for %s"), name);
|
as_warn (_("Ignoring changed section entity size for %s"), name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ static int reg_name_search PARAMS ((const struct reg_name *, int, const char *))
|
||||||
static boolean data_register_name PARAMS ((expressionS *expressionP));
|
static boolean data_register_name PARAMS ((expressionS *expressionP));
|
||||||
static boolean address_register_name PARAMS ((expressionS *expressionP));
|
static boolean address_register_name PARAMS ((expressionS *expressionP));
|
||||||
static boolean other_register_name PARAMS ((expressionS *expressionP));
|
static boolean other_register_name PARAMS ((expressionS *expressionP));
|
||||||
static void set_arch_mach PARAMS ((int));
|
static void set_arch_mach PARAMS ((unsigned int));
|
||||||
|
|
||||||
/* Set linkrelax here to avoid fixups in most sections. */
|
/* Set linkrelax here to avoid fixups in most sections. */
|
||||||
int linkrelax = 1;
|
int linkrelax = 1;
|
||||||
|
@ -2130,7 +2130,7 @@ check_operand (insn, operand, val)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_arch_mach (mach)
|
set_arch_mach (mach)
|
||||||
int mach;
|
unsigned int mach;
|
||||||
{
|
{
|
||||||
if (!bfd_set_arch_mach (stdoutput, bfd_arch_mn10300, mach))
|
if (!bfd_set_arch_mach (stdoutput, bfd_arch_mn10300, mach))
|
||||||
as_warn (_("could not set architecture and machine"));
|
as_warn (_("could not set architecture and machine"));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* tc-tic54x.c -- Assembly code for the Texas Instruments TMS320C54X
|
/* tc-tic54x.c -- Assembly code for the Texas Instruments TMS320C54X
|
||||||
Copyright 1999, 2000 Free Software Foundation, Inc.
|
Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Contributed by Timothy Wall (twall@cygnus.com)
|
Contributed by Timothy Wall (twall@cygnus.com)
|
||||||
|
|
||||||
This file is part of GAS, the GNU Assembler.
|
This file is part of GAS, the GNU Assembler.
|
||||||
|
@ -2388,7 +2388,7 @@ tic54x_mlib (ignore)
|
||||||
FILE *ftmp;
|
FILE *ftmp;
|
||||||
|
|
||||||
/* We're not sure how big it is, but it will be smaller than "size". */
|
/* We're not sure how big it is, but it will be smaller than "size". */
|
||||||
bfd_read (buf, size, 1, mbfd);
|
bfd_bread (buf, size, mbfd);
|
||||||
|
|
||||||
/* Write to a temporary file, then use s_include to include it
|
/* Write to a temporary file, then use s_include to include it
|
||||||
a bit of a hack. */
|
a bit of a hack. */
|
||||||
|
|
|
@ -345,7 +345,7 @@ dwarf2_directive_file (dummy)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num < files_in_use && files[num].filename != 0)
|
if (num < (int) files_in_use && files[num].filename != 0)
|
||||||
{
|
{
|
||||||
as_bad (_("file number %ld already allocated"), (long) num);
|
as_bad (_("file number %ld already allocated"), (long) num);
|
||||||
return;
|
return;
|
||||||
|
|
10
gas/write.c
10
gas/write.c
|
@ -1365,7 +1365,7 @@ set_symtab ()
|
||||||
asymbol **asympp;
|
asymbol **asympp;
|
||||||
symbolS *symp;
|
symbolS *symp;
|
||||||
boolean result;
|
boolean result;
|
||||||
extern PTR bfd_alloc PARAMS ((bfd *, size_t));
|
extern PTR bfd_alloc PARAMS ((bfd *, bfd_size_type));
|
||||||
|
|
||||||
/* Count symbols. We can't rely on a count made by the loop in
|
/* Count symbols. We can't rely on a count made by the loop in
|
||||||
write_object_file, because *_frob_file may add a new symbol or
|
write_object_file, because *_frob_file may add a new symbol or
|
||||||
|
@ -1377,9 +1377,9 @@ set_symtab ()
|
||||||
if (nsyms)
|
if (nsyms)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
bfd_size_type amt = (bfd_size_type) nsyms * sizeof (asymbol *);
|
||||||
|
|
||||||
asympp = (asymbol **) bfd_alloc (stdoutput,
|
asympp = (asymbol **) bfd_alloc (stdoutput, amt);
|
||||||
nsyms * sizeof (asymbol *));
|
|
||||||
symp = symbol_rootP;
|
symp = symbol_rootP;
|
||||||
for (i = 0; i < nsyms; i++, symp = symbol_next (symp))
|
for (i = 0; i < nsyms; i++, symp = symbol_next (symp))
|
||||||
{
|
{
|
||||||
|
@ -1880,8 +1880,8 @@ write_object_file ()
|
||||||
obj_emit_strings (&next_object_file_charP);
|
obj_emit_strings (&next_object_file_charP);
|
||||||
|
|
||||||
#ifdef BFD_HEADERS
|
#ifdef BFD_HEADERS
|
||||||
bfd_seek (stdoutput, 0, 0);
|
bfd_seek (stdoutput, (file_ptr) 0, 0);
|
||||||
bfd_write (the_object_file, 1, object_file_size, stdoutput);
|
bfd_bwrite (the_object_file, (bfd_size_type) object_file_size, stdoutput);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* Write the data to the file. */
|
/* Write the data to the file. */
|
||||||
|
|
Loading…
Reference in a new issue