summaryrefslogtreecommitdiff
path: root/bfd/peXXigen.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/peXXigen.c')
-rw-r--r--bfd/peXXigen.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index b643f3c2366..70236785661 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -91,10 +91,10 @@
static void add_data_entry
PARAMS ((bfd *, struct internal_extra_pe_aouthdr *, int, char *, bfd_vma));
-static boolean pe_print_pdata PARAMS ((bfd *, PTR));
-static boolean pe_print_reloc PARAMS ((bfd *, PTR));
-static boolean pe_print_idata PARAMS ((bfd *, PTR));
-static boolean pe_print_edata PARAMS ((bfd *, PTR));
+static bfd_boolean pe_print_pdata PARAMS ((bfd *, PTR));
+static bfd_boolean pe_print_reloc PARAMS ((bfd *, PTR));
+static bfd_boolean pe_print_idata PARAMS ((bfd *, PTR));
+static bfd_boolean pe_print_edata PARAMS ((bfd *, PTR));
void
@@ -1016,7 +1016,7 @@ static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] =
PPC- specific code. */
#endif
-static boolean
+static bfd_boolean
pe_print_idata (abfd, vfile)
bfd *abfd;
PTR vfile;
@@ -1048,12 +1048,12 @@ pe_print_idata (abfd, vfile)
/* Maybe the extra header isn't there. Look for the section. */
section = bfd_get_section_by_name (abfd, ".idata");
if (section == NULL)
- return true;
+ return TRUE;
addr = section->vma;
datasize = bfd_section_size (abfd, section);
if (datasize == 0)
- return true;
+ return TRUE;
}
else
{
@@ -1069,7 +1069,7 @@ pe_print_idata (abfd, vfile)
{
fprintf (file,
_("\nThere is an import table, but the section containing it could not be found\n"));
- return true;
+ return TRUE;
}
}
@@ -1098,7 +1098,7 @@ pe_print_idata (abfd, vfile)
amt = bfd_section_size (abfd, rel_section);
data = (bfd_byte *) bfd_malloc (amt);
if (data == NULL && amt != 0)
- return false;
+ return FALSE;
bfd_get_section_contents (abfd, rel_section, (PTR) data, (bfd_vma) 0,
amt);
@@ -1134,11 +1134,11 @@ pe_print_idata (abfd, vfile)
amt = dataoff + datasize;
data = (bfd_byte *) bfd_malloc (amt);
if (data == NULL)
- return false;
+ return FALSE;
/* Read the whole section. Some of the fields might be before dataoff. */
if (! bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0, amt))
- return false;
+ return FALSE;
adj = section->vma - extra->ImageBase;
@@ -1290,10 +1290,10 @@ pe_print_idata (abfd, vfile)
free (data);
- return true;
+ return TRUE;
}
-static boolean
+static bfd_boolean
pe_print_edata (abfd, vfile)
bfd *abfd;
PTR vfile;
@@ -1332,12 +1332,12 @@ pe_print_edata (abfd, vfile)
/* Maybe the extra header isn't there. Look for the section. */
section = bfd_get_section_by_name (abfd, ".edata");
if (section == NULL)
- return true;
+ return TRUE;
addr = section->vma;
datasize = bfd_section_size (abfd, section);
if (datasize == 0)
- return true;
+ return TRUE;
}
else
{
@@ -1355,7 +1355,7 @@ pe_print_edata (abfd, vfile)
{
fprintf (file,
_("\nThere is an export table, but the section containing it could not be found\n"));
- return true;
+ return TRUE;
}
}
@@ -1367,11 +1367,11 @@ pe_print_edata (abfd, vfile)
data = (bfd_byte *) bfd_malloc (datasize);
if (data == NULL)
- return false;
+ return FALSE;
if (! bfd_get_section_contents (abfd, section, (PTR) data,
(file_ptr) dataoff, datasize))
- return false;
+ return FALSE;
/* Go get Export Directory Table. */
edt.export_flags = bfd_get_32 (abfd, data + 0);
@@ -1508,7 +1508,7 @@ pe_print_edata (abfd, vfile)
free (data);
- return true;
+ return TRUE;
}
/* This really is architecture dependent. On IA-64, a .pdata entry
@@ -1516,7 +1516,7 @@ pe_print_edata (abfd, vfile)
specify the start and end address of the code range the entry
covers and the address of the corresponding unwind info data. */
-static boolean
+static bfd_boolean
pe_print_pdata (abfd, vfile)
bfd *abfd;
PTR vfile;
@@ -1537,7 +1537,7 @@ pe_print_pdata (abfd, vfile)
if (section == NULL
|| coff_section_data (abfd, section) == NULL
|| pei_section_data (abfd, section) == NULL)
- return true;
+ return TRUE;
stop = pei_section_data (abfd, section)->virt_size;
if ((stop % onaline) != 0)
@@ -1558,11 +1558,11 @@ pe_print_pdata (abfd, vfile)
datasize = bfd_section_size (abfd, section);
if (datasize == 0)
- return true;
+ return TRUE;
data = (bfd_byte *) bfd_malloc (datasize);
if (data == NULL && datasize != 0)
- return false;
+ return FALSE;
bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0,
datasize);
@@ -1639,7 +1639,7 @@ pe_print_pdata (abfd, vfile)
free (data);
- return true;
+ return TRUE;
}
#define IMAGE_REL_BASED_HIGHADJ 4
@@ -1660,7 +1660,7 @@ static const char * const tbl[] =
"UNKNOWN", /* MUST be last */
};
-static boolean
+static bfd_boolean
pe_print_reloc (abfd, vfile)
bfd *abfd;
PTR vfile;
@@ -1673,10 +1673,10 @@ pe_print_reloc (abfd, vfile)
bfd_size_type start, stop;
if (section == NULL)
- return true;
+ return TRUE;
if (bfd_section_size (abfd, section) == 0)
- return true;
+ return TRUE;
fprintf (file,
_("\n\nPE File Base Relocations (interpreted .reloc section contents)\n"));
@@ -1684,7 +1684,7 @@ pe_print_reloc (abfd, vfile)
datasize = bfd_section_size (abfd, section);
data = (bfd_byte *) bfd_malloc (datasize);
if (data == NULL && datasize != 0)
- return false;
+ return FALSE;
bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0,
datasize);
@@ -1743,12 +1743,12 @@ pe_print_reloc (abfd, vfile)
free (data);
- return true;
+ return TRUE;
}
/* Print out the program headers. */
-boolean
+bfd_boolean
_bfd_XX_print_private_bfd_data_common (abfd, vfile)
bfd *abfd;
PTR vfile;
@@ -1859,20 +1859,20 @@ _bfd_XX_print_private_bfd_data_common (abfd, vfile)
pe_print_pdata (abfd, vfile);
pe_print_reloc (abfd, vfile);
- return true;
+ return TRUE;
}
/* Copy any private info we understand from the input bfd
to the output bfd. */
-boolean
+bfd_boolean
_bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd)
bfd *ibfd, *obfd;
{
/* One day we may try to grok other private data. */
if (ibfd->xvec->flavour != bfd_target_coff_flavour
|| obfd->xvec->flavour != bfd_target_coff_flavour)
- return true;
+ return TRUE;
pe_data (obfd)->pe_opthdr = pe_data (ibfd)->pe_opthdr;
pe_data (obfd)->dll = pe_data (ibfd)->dll;
@@ -1884,12 +1884,12 @@ _bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd)
pe_data (obfd)->pe_opthdr.DataDirectory[5].VirtualAddress = 0;
pe_data (obfd)->pe_opthdr.DataDirectory[5].Size = 0;
}
- return true;
+ return TRUE;
}
/* Copy private section data. */
-boolean
+bfd_boolean
_bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
bfd *ibfd;
asection *isec;
@@ -1898,7 +1898,7 @@ _bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
{
if (bfd_get_flavour (ibfd) != bfd_target_coff_flavour
|| bfd_get_flavour (obfd) != bfd_target_coff_flavour)
- return true;
+ return TRUE;
if (coff_section_data (ibfd, isec) != NULL
&& pei_section_data (ibfd, isec) != NULL)
@@ -1908,7 +1908,7 @@ _bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
bfd_size_type amt = sizeof (struct coff_section_tdata);
osec->used_by_bfd = (PTR) bfd_zalloc (obfd, amt);
if (osec->used_by_bfd == NULL)
- return false;
+ return FALSE;
}
if (pei_section_data (obfd, osec) == NULL)
@@ -1916,7 +1916,7 @@ _bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
bfd_size_type amt = sizeof (struct pei_section_tdata);
coff_section_data (obfd, osec)->tdata = (PTR) bfd_zalloc (obfd, amt);
if (coff_section_data (obfd, osec)->tdata == NULL)
- return false;
+ return FALSE;
}
pei_section_data (obfd, osec)->virt_size =
@@ -1925,7 +1925,7 @@ _bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
pei_section_data (ibfd, isec)->pe_flags;
}
- return true;
+ return TRUE;
}
void
@@ -1948,7 +1948,7 @@ _bfd_XX_get_symbol_info (abfd, symbol, ret)
/* Handle the .idata section and other things that need symbol table
access. */
-boolean
+bfd_boolean
_bfd_XXi_final_link_postscript (abfd, pfinfo)
bfd *abfd;
struct coff_final_link_info *pfinfo;
@@ -1965,7 +1965,7 @@ _bfd_XXi_final_link_postscript (abfd, pfinfo)
/* The import directory. This is the address of .idata$2, with size
of .idata$2 + .idata$3. */
h1 = coff_link_hash_lookup (coff_hash_table (info),
- ".idata$2", false, false, true);
+ ".idata$2", FALSE, FALSE, TRUE);
if (h1 != NULL)
{
pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress =
@@ -1973,7 +1973,7 @@ _bfd_XXi_final_link_postscript (abfd, pfinfo)
+ h1->root.u.def.section->output_section->vma
+ h1->root.u.def.section->output_offset);
h1 = coff_link_hash_lookup (coff_hash_table (info),
- ".idata$4", false, false, true);
+ ".idata$4", FALSE, FALSE, TRUE);
pe_data (abfd)->pe_opthdr.DataDirectory[1].Size =
((h1->root.u.def.value
+ h1->root.u.def.section->output_section->vma
@@ -1983,13 +1983,13 @@ _bfd_XXi_final_link_postscript (abfd, pfinfo)
/* The import address table. This is the size/address of
.idata$5. */
h1 = coff_link_hash_lookup (coff_hash_table (info),
- ".idata$5", false, false, true);
+ ".idata$5", FALSE, FALSE, TRUE);
pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress =
(h1->root.u.def.value
+ h1->root.u.def.section->output_section->vma
+ h1->root.u.def.section->output_offset);
h1 = coff_link_hash_lookup (coff_hash_table (info),
- ".idata$6", false, false, true);
+ ".idata$6", FALSE, FALSE, TRUE);
pe_data (abfd)->pe_opthdr.DataDirectory[12].Size =
((h1->root.u.def.value
+ h1->root.u.def.section->output_section->vma
@@ -2000,5 +2000,5 @@ _bfd_XXi_final_link_postscript (abfd, pfinfo)
/* If we couldn't find idata$2, we either have an excessively
trivial program or are in DEEP trouble; we have to assume trivial
program.... */
- return true;
+ return TRUE;
}