Make it a bool, use obj_pe accessor everywhere.
+ input_section->output_offset
+ input_section->output_section->vma);
- if (coff_data (output_bfd)->pe)
+ if (obj_pe (output_bfd))
addr -= pe_data (output_bfd)->pe_opthdr.ImageBase;
if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1)
return true;
+ input_section->output_offset
+ input_section->output_section->vma;
- if (coff_data (output_bfd)->pe)
+ if (obj_pe (output_bfd))
addr -= pe_data (output_bfd)->pe_opthdr.ImageBase;
if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1)
/* Ordinary short filename, put into memory anyway. The
Microsoft PE tools sometimes store a filename in
multiple AUX entries. */
- if (internal_ptr->u.syment.n_numaux > 1
- && coff_data (abfd)->pe)
+ if (internal_ptr->u.syment.n_numaux > 1 && obj_pe (abfd))
internal_ptr->u.syment._n._n_n._n_offset =
((uintptr_t)
copy_name (abfd,
}
/* Normalize other strings available in C_FILE aux entries. */
- if (!coff_data (abfd)->pe)
+ if (!obj_pe (abfd))
for (int numaux = 1; numaux < internal_ptr->u.syment.n_numaux; numaux++)
{
aux = internal_ptr + numaux + 1;
static char *
dores_com (char *ptr, bfd *output_bfd, int heap)
{
- if (coff_data(output_bfd)->pe)
+ if (obj_pe (output_bfd))
{
int val = strtoul (ptr, &ptr, 0);
output_index = syment_base;
outsym = flaginfo->outsyms;
- if (coff_data (output_bfd)->pe
+ if (obj_pe (output_bfd)
&& ! process_embedded_commands (output_bfd, flaginfo->info, input_bfd))
return false;
- input_section->vma
+ input_section->output_offset
+ input_section->output_section->vma);
- if (coff_data (output_bfd)->pe)
+ if (obj_pe (output_bfd))
addr -= pe_data(output_bfd)->pe_opthdr.ImageBase;
if (fwrite (&addr, 1, sizeof (bfd_vma), (FILE *) info->base_file)
!= sizeof (bfd_vma))
#if FILNMLEN != E_FILNMLEN
#error we need to cope with truncating or extending FILNMLEN
#else
- if (numaux > 1 && coff_data (abfd)->pe)
+ if (numaux > 1 && obj_pe (abfd))
{
if (indx == 0)
memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
bool go32;
/* Is this a PE format coff file? */
- int pe;
+ bool pe;
/* Copy of some of the f_flags bits in the COFF filehdr structure,
used by ARM code. */
bool go32;
/* Is this a PE format coff file? */
- int pe;
+ bool pe;
/* Copy of some of the f_flags bits in the COFF filehdr structure,
used by ARM code. */
if (bfd_coff_mkobject_hook (abfd, (void *) & internal_f, NULL) == NULL)
goto error_return;
- coff_data (abfd)->pe = 1;
+ obj_pe (abfd) = true;
#ifdef THUMBPEMAGIC
if (vars.magic == THUMBPEMAGIC)
/* Stop some linker warnings about thumb code not supporting interworking. */
/* Pass the wacky PE command line options into the output bfd.
FIXME: This should be done via a function, rather than by
including an internal BFD header. */
- if (!coff_data(link_info.output_bfd)->pe)
+ if (!obj_pe (link_info.output_bfd))
{
einfo (_("%F%P: PE operations on non PE file\n"));
}
if (bfd_get_flavour (link_info.output_bfd) != bfd_target_coff_flavour
|| coff_data (link_info.output_bfd) == NULL
- || coff_data (link_info.output_bfd)->pe == 0)
+ || !obj_pe (link_info.output_bfd))
einfo (_("%F%P: cannot perform PE operations on non PE output file '%pB'\n"),
link_info.output_bfd);
if (bfd_get_flavour (link_info.output_bfd) != bfd_target_coff_flavour
|| coff_data (link_info.output_bfd) == NULL
- || coff_data (link_info.output_bfd)->pe == 0)
+ || !obj_pe (link_info.output_bfd))
einfo (_("%F%P: cannot perform PE operations on non PE output file '%pB'\n"),
link_info.output_bfd);