diff --git a/bfd/coff-aarch64.c b/bfd/coff-aarch64.c
index d889359a6fc..50ba610ad46 100644
--- a/bfd/coff-aarch64.c
+++ b/bfd/coff-aarch64.c
@@ -1028,9 +1028,9 @@ const bfd_target
   BFD_ENDIAN_LITTLE,		/* Data byte order is little.  */
   BFD_ENDIAN_LITTLE,		/* Header byte order is little.  */
 
-  (HAS_RELOC | EXEC_P		/* Object flags.  */
-   | HAS_LINENO | HAS_DEBUG
-   | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS),
+  (HAS_RELOC | HAS_LINENO		/* Object flags.  */
+   | HAS_DEBUG | HAS_SYMS
+   | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS),
 
   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags.  */
 #ifdef COFF_WITH_PE
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 0e296a3400b..3c4e24a5ca1 100644
--- a/bfd/coff-i386.c
+++ b/bfd/coff-i386.c
@@ -801,9 +801,9 @@ const bfd_target
   BFD_ENDIAN_LITTLE,		/* data byte order is little */
   BFD_ENDIAN_LITTLE,		/* header byte order is little */
 
-  (HAS_RELOC | EXEC_P |		/* object flags */
-   HAS_LINENO | HAS_DEBUG |
-   HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS ),
+  (HAS_RELOC | HAS_LINENO |	/* object flags */
+   HAS_DEBUG | HAS_SYMS |
+   HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS ),
 
   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
 #ifdef COFF_WITH_PE
diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c
index 2c434624052..d60ba6af04f 100644
--- a/bfd/coff-x86_64.c
+++ b/bfd/coff-x86_64.c
@@ -984,9 +984,9 @@ const bfd_target
   BFD_ENDIAN_LITTLE,		/* Data byte order is little.  */
   BFD_ENDIAN_LITTLE,		/* Header byte order is little.  */
 
-  (HAS_RELOC | EXEC_P		/* Object flags.  */
-   | HAS_LINENO | HAS_DEBUG
-   | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS),
+  (HAS_RELOC | HAS_LINENO	/* Object flags.  */
+   | HAS_DEBUG | HAS_SYMS
+   | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS),
 
   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags.  */
 #if defined(COFF_WITH_PE)
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 784ed19f494..eb84f971833 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -3055,10 +3055,23 @@ coff_compute_section_file_positions (bfd * abfd)
     }
 #endif
 
-  if (bfd_get_start_address (abfd))
-    /*  A start address may have been added to the original file. In this
-	case it will need an optional header to record it.  */
-    abfd->flags |= EXEC_P;
+  if (bfd_applicable_file_flags (abfd) & EXEC_P)
+    {
+      /* A start address may have been added to the original file.  In this
+	 case it will need an optional header to record it.  */
+      if (bfd_get_start_address (abfd))
+	abfd->flags |= EXEC_P;
+    }
+  else if (abfd->flags & EXEC_P)
+    {
+      /* ld or auto-promotion may have requested the executable flag even if
+	 not supported by the target format.  */
+      _bfd_error_handler
+	/* xgettext:c-format */
+	(_("%pB: warning: %s cannot be executable or have a start address"),
+	 abfd, bfd_get_target (abfd));
+      abfd->flags &= ~EXEC_P;
+    }
 
   if (abfd->flags & EXEC_P)
     sofar += bfd_coff_aoutsz (abfd);
@@ -5940,7 +5953,7 @@ static const bfd_coff_backend_data bigobj_swap_table =
   coff_SWAP_lineno_out, coff_SWAP_reloc_out,
   coff_bigobj_swap_filehdr_out, coff_SWAP_aouthdr_out,
   coff_SWAP_scnhdr_out,
-  FILHSZ_BIGOBJ, AOUTSZ, SCNHSZ, SYMESZ_BIGOBJ, AUXESZ_BIGOBJ,
+  FILHSZ_BIGOBJ, 0, SCNHSZ, SYMESZ_BIGOBJ, AUXESZ_BIGOBJ,
    RELSZ, LINESZ, FILNMLEN_BIGOBJ,
   true,
   COFF_DEFAULT_LONG_SECTION_NAMES,
