#define COFF_IMAGE_WITH_PE
#define COFF_WITH_PE
#define COFF_WITH_pex64
-#define PCRELOFFSET TRUE
+#define PCRELOFFSET true
#if defined (USE_MINGW64_LEADING_UNDERSCORES)
#define TARGET_UNDERSCORE '_'
#else
/* Swap in unwind info header. */
-static bfd_boolean
+static bool
pex64_get_unwind_info (bfd *abfd, struct pex64_unwind_info *ui,
void *data, void *data_end)
{
memset (ui, 0, sizeof (struct pex64_unwind_info));
if (ex_dta >= ex_dta_end || ex_dta + 4 >= ex_dta_end)
- return FALSE;
+ return false;
ui->Version = PEX64_UWI_VERSION (ex_ui->Version_Flags);
ui->Flags = PEX64_UWI_FLAGS (ex_ui->Version_Flags);
ex_dta += ui->SizeOfBlock;
if (ex_dta >= ex_dta_end)
- return FALSE;
+ return false;
switch (ui->Flags)
{
case UNW_FLAG_CHAININFO:
if (ex_dta + 12 >= ex_dta_end)
- return FALSE;
+ return false;
ui->rva_BeginAddress = bfd_get_32 (abfd, ex_dta + 0);
ui->rva_EndAddress = bfd_get_32 (abfd, ex_dta + 4);
ui->rva_UnwindData = bfd_get_32 (abfd, ex_dta + 8);
ui->SizeOfBlock += 12;
- return TRUE;
+ return true;
case UNW_FLAG_EHANDLER:
case UNW_FLAG_UHANDLER:
case UNW_FLAG_FHANDLER:
if (ex_dta + 4 >= ex_dta_end)
- return FALSE;
+ return false;
ui->rva_ExceptionHandler = bfd_get_32 (abfd, ex_dta);
ui->SizeOfBlock += 4;
- return TRUE;
+ return true;
default:
- return TRUE;
+ return true;
}
}
If an FP reg is used, the any unwind code taking an offset must only be
used after the FP reg is established in the prolog.
But there are counter examples of that in system dlls... */
- save_allowed = TRUE;
+ save_allowed = true;
i = 0;
{
const bfd_byte *dta = ui->rawUnwindCodes + 2 * i;
unsigned int info = PEX64_UNWCODE_INFO (dta[1]);
- int unexpected = FALSE;
+ int unexpected = false;
fprintf (file, "\t pc+0x%02x: ", (unsigned int) dta[0]);
pex_regs[ui->FrameRegister],
(unsigned int) ui->FrameOffset * 16, info);
unexpected = ui->FrameRegister == 0;
- save_allowed = FALSE;
+ save_allowed = false;
break;
case UWOP_SAVE_NONVOL:
else if (ui->Version == 2)
{
fprintf (file, "epilog %02x %01x", dta[0], info);
- unexpected = TRUE;
+ unexpected = true;
}
break;
/* Display unwind tables for x86-64. */
-static bfd_boolean
+static bool
pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
{
FILE *file = (FILE *) vfile;
int seen_error = 0;
bfd_vma *xdata_arr = NULL;
int xdata_arr_cnt;
- bfd_boolean virt_size_is_zero = FALSE;
+ bool virt_size_is_zero = false;
/* Sanity checks. */
if (pdata_section == NULL
|| coff_section_data (abfd, pdata_section) == NULL
|| pei_section_data (abfd, pdata_section) == NULL)
- return TRUE;
+ return true;
stop = pei_section_data (abfd, pdata_section)->virt_size;
if ((stop % onaline) != 0)
if (stop)
fprintf (file, _("Warning: %s section size is zero\n"),
pdata_section->name);
- return TRUE;
+ return true;
}
/* virt_size might be zero for objects. */
if (stop == 0 && strcmp (abfd->xvec->name, "pe-x86-64") == 0)
{
stop = datasize;
- virt_size_is_zero = TRUE;
+ virt_size_is_zero = true;
}
else if (datasize < stop)
{
free (xdata_arr);
free (xdata);
- return TRUE;
+ return true;
}
struct pex64_paps
};
/* Functionn prototype. */
-bfd_boolean pex64_bfd_print_pdata (bfd *, void *);
+bool pex64_bfd_print_pdata (bfd *, void *);
/* Helper function for bfd_map_over_section. */
static void
pex64_print_all_pdata_sections (bfd *abfd, asection *pdata, void *arg)
{
struct pex64_paps *paps = arg;
- if (CONST_STRNEQ (pdata->name, ".pdata"))
+ if (startswith (pdata->name, ".pdata"))
{
if (pex64_bfd_print_pdata_section (abfd, paps->obj, pdata))
paps->pdata_count++;
}
}
-bfd_boolean
+bool
pex64_bfd_print_pdata (bfd *abfd, void *vfile)
{
asection *pdata_section = bfd_get_section_by_name (abfd, ".pdata");