summaryrefslogtreecommitdiff
path: root/bfd/binary.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-11-30 08:39:46 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-11-30 08:39:46 +0000
commit21bd0c8d7a860a284f4f85a72fc26721ec87aedd (patch)
tree9a0470dbae9d01002a20b39e95a68f81bb4eaaa8 /bfd/binary.c
parentfdb71d9a52a1eaa32d8b51672f63abe50896d4a0 (diff)
downloadbinutils-redhat-21bd0c8d7a860a284f4f85a72fc26721ec87aedd.tar.gz
s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
Diffstat (limited to 'bfd/binary.c')
-rw-r--r--bfd/binary.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/bfd/binary.c b/bfd/binary.c
index 7bddabf5fa..a27eb95f59 100644
--- a/bfd/binary.c
+++ b/bfd/binary.c
@@ -41,17 +41,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
a start symbol, an end symbol, and an absolute length symbol. */
#define BIN_SYMS 3
-static boolean binary_mkobject PARAMS ((bfd *));
+static bfd_boolean binary_mkobject PARAMS ((bfd *));
static const bfd_target *binary_object_p PARAMS ((bfd *));
-static boolean binary_get_section_contents
+static bfd_boolean binary_get_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static long binary_get_symtab_upper_bound PARAMS ((bfd *));
static char *mangle_name PARAMS ((bfd *, char *));
static long binary_get_symtab PARAMS ((bfd *, asymbol **));
static void binary_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
-static boolean binary_set_section_contents
+static bfd_boolean binary_set_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
-static int binary_sizeof_headers PARAMS ((bfd *, boolean));
+static int binary_sizeof_headers PARAMS ((bfd *, bfd_boolean));
/* Set by external programs - specifies the BFD architecture
to use when creating binary BFDs. */
@@ -59,11 +59,11 @@ enum bfd_architecture bfd_external_binary_architecture = bfd_arch_unknown;
/* Create a binary object. Invoked via bfd_set_format. */
-static boolean
+static bfd_boolean
binary_mkobject (abfd)
bfd *abfd ATTRIBUTE_UNUSED;
{
- return true;
+ return TRUE;
}
/* Any file may be considered to be a binary file, provided the target
@@ -119,7 +119,7 @@ binary_object_p (abfd)
/* Get contents of the only section. */
-static boolean
+static bfd_boolean
binary_get_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section ATTRIBUTE_UNUSED;
@@ -129,8 +129,8 @@ binary_get_section_contents (abfd, section, location, offset, count)
{
if (bfd_seek (abfd, offset, SEEK_SET) != 0
|| bfd_bread (location, count, abfd) != count)
- return false;
- return true;
+ return FALSE;
+ return TRUE;
}
/* Return the amount of memory needed to read the symbol table. */
@@ -185,7 +185,7 @@ binary_get_symtab (abfd, alocation)
syms = (asymbol *) bfd_alloc (abfd, amt);
if (syms == NULL)
- return (long) false;
+ return 0;
/* Start symbol. */
syms[0].the_bfd = abfd;
@@ -250,7 +250,7 @@ binary_get_symbol_info (ignore_abfd, symbol, ret)
/* Write section contents of a binary file. */
-static boolean
+static bfd_boolean
binary_set_section_contents (abfd, sec, data, offset, size)
bfd *abfd;
asection *sec;
@@ -259,18 +259,18 @@ binary_set_section_contents (abfd, sec, data, offset, size)
bfd_size_type size;
{
if (size == 0)
- return true;
+ return TRUE;
if (! abfd->output_has_begun)
{
- boolean found_low;
+ bfd_boolean found_low;
bfd_vma low;
asection *s;
/* The lowest section LMA sets the virtual address of the start
of the file. We use this to set the file position of all the
sections. */
- found_low = false;
+ found_low = FALSE;
low = 0;
for (s = abfd->sections; s != NULL; s = s->next)
if (((s->flags
@@ -280,7 +280,7 @@ binary_set_section_contents (abfd, sec, data, offset, size)
&& (! found_low || s->lma < low))
{
low = s->lma;
- found_low = true;
+ found_low = TRUE;
}
for (s = abfd->sections; s != NULL; s = s->next)
@@ -308,16 +308,16 @@ binary_set_section_contents (abfd, sec, data, offset, size)
(unsigned long) s->filepos);
}
- abfd->output_has_begun = true;
+ abfd->output_has_begun = TRUE;
}
/* We don't want to output anything for a section that is neither
loaded nor allocated. The contents of such a section are not
meaningful in the binary format. */
if ((sec->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
- return true;
+ return TRUE;
if ((sec->flags & SEC_NEVER_LOAD) != 0)
- return true;
+ return TRUE;
return _bfd_generic_set_section_contents (abfd, sec, data, offset, size);
}
@@ -327,7 +327,7 @@ binary_set_section_contents (abfd, sec, data, offset, size)
static int
binary_sizeof_headers (abfd, exec)
bfd *abfd ATTRIBUTE_UNUSED;
- boolean exec ATTRIBUTE_UNUSED;
+ bfd_boolean exec ATTRIBUTE_UNUSED;
{
return 0;
}