From 10df41b188b2692b6bc8c36d4003e0f8790d1f1b Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 6 Jan 2023 19:34:15 +1030 Subject: Tidy pe flag in coff_data Make it a bool, use obj_pe accessor everywhere. --- ld/emultempl/beos.em | 2 +- ld/emultempl/pe.em | 2 +- ld/emultempl/pep.em | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ld') diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em index 1f3b67b..521d927 100644 --- a/ld/emultempl/beos.em +++ b/ld/emultempl/beos.em @@ -379,7 +379,7 @@ gld${EMULATION_NAME}_after_open (void) /* 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")); } diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index d201a97..bce1d1b 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1515,7 +1515,7 @@ gld${EMULATION_NAME}_after_open (void) 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); diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index d61cab8..69b1c3e 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -1519,7 +1519,7 @@ gld${EMULATION_NAME}_after_open (void) 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); -- cgit v1.1