Index: binutils/bfd/opncls.c |
diff --git a/binutils/bfd/opncls.c b/binutils/bfd/opncls.c |
index 3337efe0e89099bf5ab8669b0a7e6af2fbe6c444..4afde881888c054fe6fdd4895417b5df3a522854 100644 |
--- a/binutils/bfd/opncls.c |
+++ b/binutils/bfd/opncls.c |
@@ -635,7 +635,7 @@ _maybe_make_executable (bfd * abfd) |
/* If the file was open for writing and is now executable, |
make it so. */ |
if (abfd->direction == write_direction |
- && abfd->flags & EXEC_P) |
+ && (abfd->flags & (EXEC_P | DYNAMIC)) != 0) |
{ |
struct stat buf; |