Blame SOURCES/gcc48-rh1487434.patch

8178f7
2016-05-04  Alan Modra  <amodra@gmail.com>
8178f7
8178f7
	* config/rs6000/rs6000.c (rs6000_elf_output_toc_section_asm_op):
8178f7
	Align .toc.
8178f7
8178f7
--- gcc/config/rs6000/rs6000.c
8178f7
+++ gcc/config/rs6000/rs6000.c
8178f7
@@ -31339,8 +31339,8 @@ rs6000_elf_output_toc_section_asm_op (const void *data ATTRIBUTE_UNUSED)
8178f7
     {
8178f7
       if (!toc_initialized)
8178f7
 	{
8178f7
-	  toc_initialized = 1;
8178f7
 	  fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP);
8178f7
+	  ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
8178f7
 	  (*targetm.asm_out.internal_label) (asm_out_file, "LCTOC", 0);
8178f7
 	  fprintf (asm_out_file, "\t.tc ");
8178f7
 	  ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1[TC],");
8178f7
@@ -31348,20 +31348,30 @@ rs6000_elf_output_toc_section_asm_op (const void *data ATTRIBUTE_UNUSED)
8178f7
 	  fprintf (asm_out_file, "\n");
8178f7
 
8178f7
 	  fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);
8178f7
+	  ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
8178f7
 	  ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1");
8178f7
 	  fprintf (asm_out_file, " = .+32768\n");
8178f7
+	  toc_initialized = 1;
8178f7
 	}
8178f7
       else
8178f7
 	fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);
8178f7
     }
8178f7
   else if ((DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_ELFv2)
8178f7
 	   && !TARGET_RELOCATABLE)
8178f7
-    fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP);
8178f7
+    {
8178f7
+      fprintf (asm_out_file, "%s\n", TOC_SECTION_ASM_OP);
8178f7
+      if (!toc_initialized)
8178f7
+	{
8178f7
+	  ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
8178f7
+	  toc_initialized = 1;
8178f7
+	}
8178f7
+    }
8178f7
   else
8178f7
     {
8178f7
       fprintf (asm_out_file, "%s\n", MINIMAL_TOC_SECTION_ASM_OP);
8178f7
       if (!toc_initialized)
8178f7
 	{
8178f7
+	  ASM_OUTPUT_ALIGN (asm_out_file, TARGET_64BIT ? 3 : 2);
8178f7
 	  ASM_OUTPUT_INTERNAL_LABEL_PREFIX (asm_out_file, "LCTOC1");
8178f7
 	  fprintf (asm_out_file, " = .+32768\n");
8178f7
 	  toc_initialized = 1;