* aoutx.h (some_aout_object_p): Don't set EXEC_P for files with
authorAlan Modra <amodra@gmail.com>
Thu, 22 Jul 2010 14:07:10 +0000 (14:07 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 22 Jul 2010 14:07:10 +0000 (14:07 +0000)
relocs.

bfd/ChangeLog
bfd/aoutx.h

index aa36284e8e2977c848527a552a74d636e51190b2..5e5efb00c2f103bf704308e8a1e1dc29b4a0e0cc 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-22  Alan Modra  <amodra@gmail.com>
+
+       * aoutx.h (some_aout_object_p): Don't set EXEC_P for files with
+       relocs.
+
 2010-07-20  Alan Modra  <amodra@gmail.com>
 
        * elf.c (assign_file_positions_for_load_sections): Check that
index c3366b68d14d313764f5b009220cf9c01f35bff5..c6327226f929a0d31c127a05d22d558f96ddb7c1 100644 (file)
@@ -629,7 +629,9 @@ NAME (aout, some_aout_object_p) (bfd *abfd,
   if (execp->a_entry != 0
       || (execp->a_entry >= obj_textsec (abfd)->vma
          && execp->a_entry < (obj_textsec (abfd)->vma
-                              + obj_textsec (abfd)->size)))
+                              + obj_textsec (abfd)->size)
+         && execp->a_trsize == 0
+         && execp->a_drsize == 0))
     abfd->flags |= EXEC_P;
 #ifdef STAT_FOR_EXEC
   else