http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52999

--- Comment #6 from dave.anglin at bell dot net 2012-04-23 17:04:13 UTC ---
On 4/23/2012 12:16 PM, jakub at gcc dot gnu.org wrote:
> The PA specific thing there is that PA puts rtx constant pool into 
> .data.rel.ro
> section, something that doesn't happen on i?86/x86_64/ppc/ppc64 etc. to my
> knowledge.
This occurs in default_elf_select_section.  For example,

      case SECCAT_DATA_REL:
       sname = ".data.rel";
       break;
     case SECCAT_DATA_REL_LOCAL:
       sname = ".data.rel.local";
       break;
     case SECCAT_DATA_REL_RO:
       sname = ".data.rel.ro";

The category comes from here:

       else if (! TREE_READONLY (decl)
                || TREE_SIDE_EFFECTS (decl)
                || ! TREE_CONSTANT (DECL_INITIAL (decl)))
         {
           /* Here the reloc_rw_mask is not testing whether the section 
should
              be read-only or not, but whether the dynamic link will have to
              do something.  If so, we wish to segregate the data in 
order to
              minimize cache misses inside the dynamic linker.  */
           if (reloc & targetm.asm_out.reloc_rw_mask ())
             ret = reloc == 1 ? SECCAT_DATA_REL_LOCAL : SECCAT_DATA_REL;
           else
             ret = SECCAT_DATA;
         }

With PIC code, we get SECCAT_DATA_REL for the variable that caused
the diagnostic ICE.  It lacked a "const" qualifier.

Reply via email to