All sections in a section group should be marked with SHF_GROUP.  But
some tools generate broken objects without SHF_GROUP.  This patch fixes
them up for objcopy and strip.
	PR binutils/23199
	* elf.c (setup_group): Mark section in a section group with
	SHF_GROUP.
+2018-05-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/23199
+       * elf.c (setup_group): Mark section in a section group with
+       SHF_GROUP.
+
 2018-05-18  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/23194
 
                          break;
                        }
                      if (idx < shnum)
-                       dest->shdr = elf_elfsections (abfd)[idx];
+                       {
+                         dest->shdr = elf_elfsections (abfd)[idx];
+                         /* PR binutils/23199: All sections in a
+                            section group should be marked with
+                            SHF_GROUP.  But some tools generate
+                            broken objects without SHF_GROUP.  Fix
+                            them up here.  */
+                         dest->shdr->sh_flags |= SHF_GROUP;
+                       }
                      if (idx >= shnum
                          || dest->shdr->sh_type == SHT_GROUP)
                        {