Set SEC_NEVER_LOAD when the 'n' flag is used.
authorNick Clifton <nickc@redhat.com>
Tue, 27 Feb 2001 01:56:26 +0000 (01:56 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 27 Feb 2001 01:56:26 +0000 (01:56 +0000)
gas/ChangeLog
gas/config/obj-coff.c

index 1da09c495afe9b3378ced4a1c5950a3cd0d73288..9d25e8843c2b372ec7d288f3585cf82e42035bb5 100644 (file)
@@ -1,3 +1,9 @@
+2001-02-26  Mark Elbrecht  <snowball3@bigfoot.com>
+
+       * config/obj-coff.c [BFD_ASSEMBLER] (obj_coff_section): Set
+       SEC_NEVER_LOAD when the 'n' flag is used.
+       Add SEC_NEVER_LOAD to matchflags.
+
 2001-02-24  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
 
        * symbols.c (decode_local_label_name): Initialize message_format
index d3215cc7ef81d0ef9e11f86c017210f1401a898a..46a4ca861fe8b04aa421fe7470668946d158d349 100644 (file)
@@ -1434,7 +1434,7 @@ obj_coff_section (ignore)
              switch (*input_line_pointer)
                {
                case 'b': flags |= SEC_ALLOC; flags &=~ SEC_LOAD; break;
-               case 'n': flags &=~ SEC_LOAD; break;
+               case 'n': flags &=~ SEC_LOAD; flags |= SEC_NEVER_LOAD; break;
                case 'd': flags |= SEC_DATA | SEC_LOAD; /* fall through */
                case 'w': flags &=~ SEC_READONLY; break;
                case 'x': flags |= SEC_CODE | SEC_LOAD; break;
@@ -1488,7 +1488,7 @@ obj_coff_section (ignore)
       /* This section's attributes have already been set. Warn if the
          attributes don't match.  */
       flagword matchflags = SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
-                           | SEC_DATA | SEC_SHARED;
+                         | SEC_DATA | SEC_SHARED | SEC_NEVER_LOAD;
       if ((flags ^ oldflags) & matchflags)
        as_warn (_("Ignoring changed section attributes for %s"), name);
     }