summaryrefslogtreecommitdiff
path: root/bfd/elfcode.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elfcode.h')
-rw-r--r--bfd/elfcode.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index c1ef912d727..2a6f6bf20a4 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -170,11 +170,11 @@ static void elf_swap_shdr_out
#define section_from_elf_index bfd_section_from_elf_index
-static boolean elf_slurp_reloc_table_from_section
+static bfd_boolean elf_slurp_reloc_table_from_section
PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, bfd_size_type,
- arelent *, asymbol **, boolean));
+ arelent *, asymbol **, bfd_boolean));
-static boolean elf_file_p PARAMS ((Elf_External_Ehdr *));
+static bfd_boolean elf_file_p PARAMS ((Elf_External_Ehdr *));
#ifdef DEBUG
static void elf_debug_section PARAMS ((int, Elf_Internal_Shdr *));
@@ -500,7 +500,7 @@ elf_swap_dyn_out (abfd, src, p)
First we validate the file by reading in the ELF header and checking
the magic number. */
-static INLINE boolean
+static INLINE bfd_boolean
elf_file_p (x_ehdrp)
Elf_External_Ehdr *x_ehdrp;
{
@@ -861,7 +861,7 @@ elf_write_relocs (abfd, sec, data)
asection *sec;
PTR data;
{
- boolean *failedp = (boolean *) data;
+ bfd_boolean *failedp = (bfd_boolean *) data;
Elf_Internal_Shdr *rela_hdr;
bfd_vma addr_offset;
void (*swap_out) PARAMS ((bfd *, const Elf_Internal_Rela *, bfd_byte *));
@@ -891,7 +891,7 @@ elf_write_relocs (abfd, sec, data)
rela_hdr->contents = (PTR) bfd_alloc (abfd, rela_hdr->sh_size);
if (rela_hdr->contents == NULL)
{
- *failedp = true;
+ *failedp = TRUE;
return;
}
@@ -942,7 +942,7 @@ elf_write_relocs (abfd, sec, data)
n = _bfd_elf_symbol_from_bfd_symbol (abfd, &sym);
if (n < 0)
{
- *failedp = true;
+ *failedp = TRUE;
return;
}
last_sym_idx = n;
@@ -952,7 +952,7 @@ elf_write_relocs (abfd, sec, data)
&& (*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec
&& ! _bfd_elf_validate_reloc (abfd, ptr))
{
- *failedp = true;
+ *failedp = TRUE;
return;
}
@@ -985,7 +985,7 @@ elf_write_out_phdrs (abfd, phdr, count)
/* Write out the section headers and the ELF file header. */
-boolean
+bfd_boolean
elf_write_shdrs_and_ehdr (abfd)
bfd *abfd;
{
@@ -1008,7 +1008,7 @@ elf_write_shdrs_and_ehdr (abfd)
amt = sizeof (x_ehdr);
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
|| bfd_bwrite ((PTR) & x_ehdr, amt, abfd) != amt)
- return false;
+ return FALSE;
/* Some fields in the first section header handle overflow of ehdr
fields. */
@@ -1022,7 +1022,7 @@ elf_write_shdrs_and_ehdr (abfd)
amt *= sizeof (*x_shdrp);
x_shdrp = (Elf_External_Shdr *) bfd_alloc (abfd, amt);
if (!x_shdrp)
- return false;
+ return FALSE;
for (count = 0; count < i_ehdrp->e_shnum; i_shdrp++, count++)
{
@@ -1030,24 +1030,24 @@ elf_write_shdrs_and_ehdr (abfd)
elf_debug_section (count, *i_shdrp);
#endif
elf_swap_shdr_out (abfd, *i_shdrp, x_shdrp + count);
-
+
if (count == SHN_LORESERVE - 1)
i_shdrp += SHN_HIRESERVE + 1 - SHN_LORESERVE;
}
if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0
|| bfd_bwrite ((PTR) x_shdrp, amt, abfd) != amt)
- return false;
+ return FALSE;
/* need to dump the string table too... */
- return true;
+ return TRUE;
}
long
elf_slurp_symbol_table (abfd, symptrs, dynamic)
bfd *abfd;
asymbol **symptrs; /* Buffer for generated bfd symbols */
- boolean dynamic;
+ bfd_boolean dynamic;
{
Elf_Internal_Shdr *hdr;
Elf_Internal_Shdr *verhdr;
@@ -1281,7 +1281,7 @@ error_return:
/* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of
them. */
-static boolean
+static bfd_boolean
elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
relents, symbols, dynamic)
bfd *abfd;
@@ -1290,7 +1290,7 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
bfd_size_type reloc_count;
arelent *relents;
asymbol **symbols;
- boolean dynamic;
+ bfd_boolean dynamic;
{
struct elf_backend_data * const ebd = get_elf_backend_data (abfd);
PTR allocated = NULL;
@@ -1374,22 +1374,22 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
if (allocated != NULL)
free (allocated);
- return true;
+ return TRUE;
error_return:
if (allocated != NULL)
free (allocated);
- return false;
+ return FALSE;
}
/* Read in and swap the external relocs. */
-boolean
+bfd_boolean
elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
bfd *abfd;
asection *asect;
asymbol **symbols;
- boolean dynamic;
+ bfd_boolean dynamic;
{
struct bfd_elf_section_data * const d = elf_section_data (asect);
Elf_Internal_Shdr *rel_hdr;
@@ -1400,13 +1400,13 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
bfd_size_type amt;
if (asect->relocation != NULL)
- return true;
+ return TRUE;
if (! dynamic)
{
if ((asect->flags & SEC_RELOC) == 0
|| asect->reloc_count == 0)
- return true;
+ return TRUE;
rel_hdr = &d->rel_hdr;
reloc_count = NUM_SHDR_ENTRIES (rel_hdr);
@@ -1425,7 +1425,7 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
dynamic symbol table, and in that case bfd_section_from_shdr
in elf.c does not update the RELOC_COUNT. */
if (asect->_raw_size == 0)
- return true;
+ return TRUE;
rel_hdr = &d->this_hdr;
reloc_count = NUM_SHDR_ENTRIES (rel_hdr);
@@ -1436,23 +1436,23 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
amt = (reloc_count + reloc_count2) * sizeof (arelent);
relents = (arelent *) bfd_alloc (abfd, amt);
if (relents == NULL)
- return false;
+ return FALSE;
if (!elf_slurp_reloc_table_from_section (abfd, asect,
rel_hdr, reloc_count,
relents,
symbols, dynamic))
- return false;
+ return FALSE;
if (rel_hdr2
&& !elf_slurp_reloc_table_from_section (abfd, asect,
rel_hdr2, reloc_count2,
relents + reloc_count,
symbols, dynamic))
- return false;
+ return FALSE;
asect->relocation = relents;
- return true;
+ return TRUE;
}
#ifdef DEBUG