/* BFD backend for Extended Tektronix Hex Format objects.
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2007 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
if (!d)
{
/* No chunk for this address, so make one up. */
- d = bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct));
+ d = (struct data_struct *)
+ bfd_zalloc (abfd, (bfd_size_type) sizeof (struct data_struct));
if (!d)
return NULL;
section = bfd_get_section_by_name (abfd, sym);
if (section == NULL)
{
- char *n = bfd_alloc (abfd, (bfd_size_type) len + 1);
+ char *n = (char *) bfd_alloc (abfd, (bfd_size_type) len + 1);
if (!n)
return FALSE;
pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *))
{
unsigned int chars_on_line;
- bfd_boolean eof = FALSE;
+ bfd_boolean is_eof = FALSE;
/* To the front of the file. */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
return FALSE;
- while (! eof)
+ while (! is_eof)
{
char src[MAXCHUNK];
char type;
/* Find first '%'. */
- eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
- while (*src != '%' && !eof)
- eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
+ is_eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
+ while (*src != '%' && !is_eof)
+ is_eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
- if (eof)
+ if (is_eof)
break;
/* Fetch the type and the length and the checksum. */
{
tdata_type *tdata;
- tdata = bfd_alloc (abfd, (bfd_size_type) sizeof (tdata_type));
+ tdata = (tdata_type *) bfd_alloc (abfd, (bfd_size_type) sizeof (tdata_type));
if (!tdata)
return FALSE;
abfd->tdata.tekhex_data = tdata;
#define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
#define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define tekhex_bfd_link_just_syms _bfd_generic_link_just_syms
+#define tekhex_bfd_copy_link_hash_symbol_type \
+ _bfd_generic_copy_link_hash_symbol_type
#define tekhex_bfd_final_link _bfd_generic_final_link
#define tekhex_bfd_link_split_section _bfd_generic_link_split_section
#define tekhex_get_section_contents_in_window _bfd_generic_get_section_contents_in_window