Silently ignore an 'a' flag in a COFF .section directive.
authorNick Clifton <nickc@redhat.com>
Thu, 23 May 2002 10:45:14 +0000 (10:45 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 23 May 2002 10:45:14 +0000 (10:45 +0000)
gas/ChangeLog
gas/config/obj-coff.c
gas/doc/as.texinfo

index 16ef4365b3f38ed104faf79b47c4abfdbe73c63c..39705193d1d3aa8b225b18a232410fbcfcf1fda9 100644 (file)
@@ -1,3 +1,10 @@
+2002-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
+
+       * config/obj-coff.c (obj_coff_section): Silently ignore an 'a'
+       flag.
+        * doc/as.texinfo: Document that the COFF version of .section
+       ignores the 'a' flag.
+
 2002-05-23  Alan Modra  <amodra@bigpond.net.au>
 
        * config/tc-alpha.c (assemble_tokens): Protect use of
index c48ba63f1b42dd1cfde3979c4954ddda93df7e6f..546f7632008280e50fdee7b76d0f93e780ccc45a 100644 (file)
@@ -1397,23 +1397,24 @@ coff_frob_file_after_relocs ()
   bfd_map_over_sections (stdoutput, coff_adjust_section_syms, (char*) 0);
 }
 
-/*
- * implement the .section pseudo op:
- *     .section name {, "flags"}
- *                ^         ^
- *                |         +--- optional flags: 'b' for bss
- *                |                              'i' for info
- *                +-- section name               'l' for lib
- *                                               'n' for noload
- *                                               'o' for over
- *                                               'w' for data
- *                                              'd' (apparently m88k for data)
- *                                               'x' for text
- *                                              'r' for read-only data
- *                                              's' for shared data (PE)
- * But if the argument is not a quoted string, treat it as a
- * subsegment number.
- */
+/* Implement the .section pseudo op:
+       .section name {, "flags"}
+                  ^         ^
+                  |         +--- optional flags: 'b' for bss
+                  |                              'i' for info
+                  +-- section name               'l' for lib
+                                                 'n' for noload
+                                                 'o' for over
+                                                 'w' for data
+                                                'd' (apparently m88k for data)
+                                                 'x' for text
+                                                'r' for read-only data
+                                                's' for shared data (PE)
+   But if the argument is not a quoted string, treat it as a
+   subsegment number.
+
+   Note the 'a' flag is silently ignored.  This allows the same
+   .section directive to be parsed in both ELF and COFF formats.  */
 
 void
 obj_coff_section (ignore)
@@ -1466,6 +1467,7 @@ obj_coff_section (ignore)
                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 'a': break; /* For compatability with ELF.  */
                case 'x': flags |= SEC_CODE | SEC_LOAD; break;
                case 'r': flags |= SEC_READONLY; break;
                case 's': flags |= SEC_SHARED; break;
index 2a1d05ed7592c6537f3a4361cf382da254aaa8f6..7bd85d71730d7c83bf687ff3a24092a7e8aaf74c 100644 (file)
@@ -4978,6 +4978,8 @@ read-only section
 executable section
 @item s
 shared section (meaningful for PE targets)
+@item a
+ignored.  (For compatibility with the ELF version)
 @end table
 
 If no flags are specified, the default flags depend upon the section name.  If
This page took 0.033508 seconds and 4 git commands to generate.