* elf.c (assign_file_positions_for_segments): Don't overwrite p_flags.
authorRichard Henderson <rth@redhat.com>
Tue, 13 Jul 1999 17:30:21 +0000 (17:30 +0000)
committerRichard Henderson <rth@redhat.com>
Tue, 13 Jul 1999 17:30:21 +0000 (17:30 +0000)
bfd/elf.c

index 025fb8e05e0c4f52b8870fc76b179efe29d6e15b..b27a4b4f3d597c1002f601e16a731d1a22e82fe1 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2560,9 +2560,7 @@ assign_file_positions_for_segments (abfd)
       p->p_type = m->p_type;
 
       if (m->p_flags_valid)
-       p->p_flags = m->p_flags;
-      else
-       p->p_flags = 0;
+       p->p_flags |= m->p_flags;
 
       if (p->p_type == PT_LOAD
          && m->count > 0