[PATCH] AIX SECTION_EXCLUDE

David Edelsohn dje.gcc@gmail.com
Mon Sep 28 15:07:00 GMT 2015


The appended patch allows GCC to emit LTO information to a reasonable
location in XCOFF objects.

Thanks, David

* config/rs6000/rs6000.c (rs6000_xcoff_asm_named_section): Place
SECTION_EXCLUDE in XO mapping class.

Index: rs6000.c
===================================================================
--- rs6000.c    (revision 228202)
+++ rs6000.c    (working copy)
@@ -30845,14 +30845,16 @@
                                tree decl ATTRIBUTE_UNUSED)
 {
   int smclass;
-  static const char * const suffix[4] = { "PR", "RO", "RW", "TL" };
+  static const char * const suffix[5] = { "PR", "RO", "RW", "TL", "XO" };

-  if (flags & SECTION_DEBUG)
+  if (flags & SECTION_EXCLUDE)
+    smclass = 4;
+  else if (flags & SECTION_DEBUG)
     {
       fprintf (asm_out_file, "\t.dwsect %s\n", name);
       return;
     }
-  if (flags & SECTION_CODE)
+  else if (flags & SECTION_CODE)
     smclass = 0;
   else if (flags & SECTION_TLS)
     smclass = 3;



More information about the Gcc-patches mailing list