aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c118
1 files changed, 59 insertions, 59 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 757fa5f..abe5093 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -372,7 +372,7 @@ CODE_FRAGMENT
. return abfd->filename;
.}
.
-.static inline bfd_boolean
+.static inline bool
.bfd_get_cacheable (const bfd *abfd)
.{
. return abfd->cacheable;
@@ -420,13 +420,13 @@ CODE_FRAGMENT
. return abfd->section_count;
.}
.
-.static inline bfd_boolean
+.static inline bool
.bfd_has_map (const bfd *abfd)
.{
. return abfd->has_armap;
.}
.
-.static inline bfd_boolean
+.static inline bool
.bfd_is_thin_archive (const bfd *abfd)
.{
. return abfd->is_thin_archive;
@@ -439,15 +439,15 @@ CODE_FRAGMENT
.}
.
.{* See note beside bfd_set_section_userdata. *}
-.static inline bfd_boolean
-.bfd_set_cacheable (bfd * abfd, bfd_boolean val)
+.static inline bool
+.bfd_set_cacheable (bfd * abfd, bool val)
.{
. abfd->cacheable = val;
-. return TRUE;
+. return true;
.}
.
.static inline void
-.bfd_set_thin_archive (bfd *abfd, bfd_boolean val)
+.bfd_set_thin_archive (bfd *abfd, bool val)
.{
. abfd->is_thin_archive = val;
.}
@@ -582,7 +582,7 @@ CODE_FRAGMENT
. abfd->sections = s;
.}
.
-.static inline bfd_boolean
+.static inline bool
.bfd_section_removed_from_list (const bfd *abfd, const asection *s)
.{
. return s->next ? s->next->prev != s : abfd->section_last != s;
@@ -1615,7 +1615,7 @@ FUNCTION
bfd_set_file_flags
SYNOPSIS
- bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
+ bool bfd_set_file_flags (bfd *abfd, flagword flags);
DESCRIPTION
Set the flag word in the BFD @var{abfd} to the value @var{flags}.
@@ -1630,29 +1630,29 @@ DESCRIPTION
*/
-bfd_boolean
+bool
bfd_set_file_flags (bfd *abfd, flagword flags)
{
if (abfd->format != bfd_object)
{
bfd_set_error (bfd_error_wrong_format);
- return FALSE;
+ return false;
}
if (bfd_read_p (abfd))
{
bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
+ return false;
}
abfd->flags = flags;
if ((flags & bfd_applicable_file_flags (abfd)) != flags)
{
bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void
@@ -1769,7 +1769,7 @@ FUNCTION
bfd_set_start_address
SYNOPSIS
- bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
+ bool bfd_set_start_address (bfd *abfd, bfd_vma vma);
DESCRIPTION
Make @var{vma} the entry point of output BFD @var{abfd}.
@@ -1778,11 +1778,11 @@ RETURNS
Returns <<TRUE>> on success, <<FALSE>> otherwise.
*/
-bfd_boolean
+bool
bfd_set_start_address (bfd *abfd, bfd_vma vma)
{
abfd->start_address = vma;
- return TRUE;
+ return true;
}
/*
@@ -1970,7 +1970,7 @@ FUNCTION
bfd_copy_private_header_data
SYNOPSIS
- bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
+ bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
DESCRIPTION
Copy private BFD header information from the BFD @var{ibfd} to the
@@ -1993,7 +1993,7 @@ FUNCTION
bfd_copy_private_bfd_data
SYNOPSIS
- bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
+ bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
DESCRIPTION
Copy private BFD information from the BFD @var{ibfd} to the
@@ -2014,7 +2014,7 @@ FUNCTION
bfd_set_private_flags
SYNOPSIS
- bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
+ bool bfd_set_private_flags (bfd *abfd, flagword flags);
DESCRIPTION
Set private BFD flag information in the BFD @var{abfd}.
@@ -2132,7 +2132,7 @@ DESCRIPTION
.
.extern bfd_byte *bfd_get_relocated_section_contents
. (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
-. bfd_boolean, asymbol **);
+. bool, asymbol **);
.
*/
@@ -2142,12 +2142,12 @@ bfd_get_relocated_section_contents (bfd *abfd,
struct bfd_link_info *link_info,
struct bfd_link_order *link_order,
bfd_byte *data,
- bfd_boolean relocatable,
+ bool relocatable,
asymbol **symbols)
{
bfd *abfd2;
bfd_byte *(*fn) (bfd *, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *, bfd_boolean, asymbol **);
+ bfd_byte *, bool, asymbol **);
if (link_order->type == bfd_indirect_link_order)
{
@@ -2165,15 +2165,15 @@ bfd_get_relocated_section_contents (bfd *abfd,
/* Record information about an ELF program header. */
-bfd_boolean
+bool
bfd_record_phdr (bfd *abfd,
unsigned long type,
- bfd_boolean flags_valid,
+ bool flags_valid,
flagword flags,
- bfd_boolean at_valid,
+ bool at_valid,
bfd_vma at, /* Bytes. */
- bfd_boolean includes_filehdr,
- bfd_boolean includes_phdrs,
+ bool includes_filehdr,
+ bool includes_phdrs,
unsigned int count,
asection **secs)
{
@@ -2182,13 +2182,13 @@ bfd_record_phdr (bfd *abfd,
unsigned int opb = bfd_octets_per_byte (abfd, NULL);
if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
- return TRUE;
+ return true;
amt = sizeof (struct elf_segment_map);
amt += ((bfd_size_type) count - 1) * sizeof (asection *);
m = (struct elf_segment_map *) bfd_zalloc (abfd, amt);
if (m == NULL)
- return FALSE;
+ return false;
m->p_type = type;
m->p_flags = flags;
@@ -2205,13 +2205,13 @@ bfd_record_phdr (bfd *abfd,
;
*pm = m;
- return TRUE;
+ return true;
}
#ifdef BFD64
/* Return true iff this target is 32-bit. */
-static bfd_boolean
+static bool
is32bit (bfd *abfd)
{
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
@@ -2259,7 +2259,7 @@ FUNCTION
bfd_alt_mach_code
SYNOPSIS
- bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
+ bool bfd_alt_mach_code (bfd *abfd, int alternative);
DESCRIPTION
@@ -2270,7 +2270,7 @@ DESCRIPTION
machine codes.
*/
-bfd_boolean
+bool
bfd_alt_mach_code (bfd *abfd, int alternative)
{
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
@@ -2286,25 +2286,25 @@ bfd_alt_mach_code (bfd *abfd, int alternative)
case 1:
code = get_elf_backend_data (abfd)->elf_machine_alt1;
if (code == 0)
- return FALSE;
+ return false;
break;
case 2:
code = get_elf_backend_data (abfd)->elf_machine_alt2;
if (code == 0)
- return FALSE;
+ return false;
break;
default:
- return FALSE;
+ return false;
}
elf_elfheader (abfd)->e_machine = code;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*
@@ -2340,7 +2340,7 @@ FUNCTION
bfd_emul_get_commonpagesize
SYNOPSIS
- bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean);
+ bfd_vma bfd_emul_get_commonpagesize (const char *, bool);
DESCRIPTION
Returns the common page size, in bytes, as determined by
@@ -2351,7 +2351,7 @@ RETURNS
*/
bfd_vma
-bfd_emul_get_commonpagesize (const char *emul, bfd_boolean relro)
+bfd_emul_get_commonpagesize (const char *emul, bool relro)
{
const bfd_target *target;
@@ -2391,7 +2391,7 @@ bfd_demangle (bfd *abfd, const char *name, int options)
char *res, *alloc;
const char *pre, *suf;
size_t pre_len;
- bfd_boolean skip_lead;
+ bool skip_lead;
skip_lead = (abfd != NULL
&& *name != '\0'
@@ -2542,7 +2542,7 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
bfd_check_compression_header
SYNOPSIS
- bfd_boolean bfd_check_compression_header
+ bool bfd_check_compression_header
(bfd *abfd, bfd_byte *contents, asection *sec,
bfd_size_type *uncompressed_size,
unsigned int *uncompressed_alignment_power);
@@ -2557,7 +2557,7 @@ RETURNS
Return TRUE if the compression header is valid.
*/
-bfd_boolean
+bool
bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
asection *sec,
bfd_size_type *uncompressed_size,
@@ -2587,11 +2587,11 @@ bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
{
*uncompressed_size = chdr.ch_size;
*uncompressed_alignment_power = bfd_log2 (chdr.ch_addralign);
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*
@@ -2686,7 +2686,7 @@ FUNCTION
bfd_convert_section_contents
SYNOPSIS
- bfd_boolean bfd_convert_section_contents
+ bool bfd_convert_section_contents
(bfd *ibfd, asection *isec, bfd *obfd,
bfd_byte **ptr, bfd_size_type *ptr_size);
@@ -2698,24 +2698,24 @@ DESCRIPTION
function, and the new size written to @var{ptr_size}.
*/
-bfd_boolean
+bool
bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
bfd_byte **ptr, bfd_size_type *ptr_size)
{
bfd_byte *contents;
bfd_size_type ihdr_size, ohdr_size, size;
Elf_Internal_Chdr chdr;
- bfd_boolean use_memmove;
+ bool use_memmove;
/* Do nothing if either input or output aren't ELF. */
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return TRUE;
+ return true;
/* Do nothing if ELF classes of input and output are the same. */
if (get_elf_backend_data (ibfd)->s->elfclass
== get_elf_backend_data (obfd)->s->elfclass)
- return TRUE;
+ return true;
/* Convert GNU properties. */
if (startswith (isec->name, NOTE_GNU_PROPERTY_SECTION_NAME))
@@ -2724,18 +2724,18 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
/* Do nothing if input file will be decompressed. */
if ((ibfd->flags & BFD_DECOMPRESS))
- return TRUE;
+ return true;
/* Do nothing if the input section isn't a SHF_COMPRESSED section. */
ihdr_size = bfd_get_compression_header_size (ibfd, isec);
if (ihdr_size == 0)
- return TRUE;
+ return true;
/* PR 25221. Check for corrupt input sections. */
if (ihdr_size > bfd_get_section_limit (ibfd, isec))
/* FIXME: Issue a warning about a corrupt
compression header size field ? */
- return FALSE;
+ return false;
contents = *ptr;
@@ -2751,13 +2751,13 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
ohdr_size = sizeof (Elf64_External_Chdr);
- use_memmove = FALSE;
+ use_memmove = false;
}
else if (ihdr_size != sizeof (Elf64_External_Chdr))
{
/* FIXME: Issue a warning about a corrupt
compression header size field ? */
- return FALSE;
+ return false;
}
else
{
@@ -2767,7 +2767,7 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
chdr.ch_addralign = bfd_get_64 (ibfd, &echdr->ch_addralign);
ohdr_size = sizeof (Elf32_External_Chdr);
- use_memmove = TRUE;
+ use_memmove = true;
}
size = bfd_section_size (isec) - ihdr_size + ohdr_size;
@@ -2775,7 +2775,7 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
{
contents = (bfd_byte *) bfd_malloc (size);
if (contents == NULL)
- return FALSE;
+ return false;
}
/* Write out the output compression header. */
@@ -2806,7 +2806,7 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd,
}
*ptr_size = size;
- return TRUE;
+ return true;
}
/* Get the linker information. */