* config/obj-elf.c (obj_elf_section): Cater for TC_KEEP_OPERAND_SPACES
authorAlan Modra <amodra@gmail.com>
Sat, 19 May 2012 10:36:32 +0000 (10:36 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 19 May 2012 10:36:32 +0000 (10:36 +0000)
targets when checking for "comdat".

gas/ChangeLog
gas/config/obj-elf.c

index 0c2bc2681366de3e6400a24d1a56af3c6a36dbdc..116ba375fb77a51078d91233c5f2e742c7b918f6 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-19  Alan Modra  <amodra@gmail.com>
+
+       * config/obj-elf.c (obj_elf_section): Cater for TC_KEEP_OPERAND_SPACES
+       targets when checking for "comdat".
+
 2012-05-19  Alan Modra  <amodra@gmail.com>
 
        * config/tc-dlx.c (s_proc): Don't use asprintf.
index a101e8a996d67d7a02dc76eba4278931385923c4..ffee6f6590e3dcf9d600d78d315c3a3f4b918272 100644 (file)
@@ -1049,10 +1049,15 @@ obj_elf_section (int push)
              group_name = obj_elf_section_name ();
              if (group_name == NULL)
                attr &= ~SHF_GROUP;
-             else if (strncmp (input_line_pointer, ",comdat", 7) == 0)
+             else if (*input_line_pointer == ',')
                {
-                 input_line_pointer += 7;
-                 linkonce = 1;
+                 ++input_line_pointer;
+                 SKIP_WHITESPACE ();
+                 if (strncmp (input_line_pointer, "comdat", 6) == 0)
+                   {
+                     input_line_pointer += 6;
+                     linkonce = 1;
+                   }
                }
              else if (strncmp (name, ".gnu.linkonce", 13) == 0)
                linkonce = 1;