This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Move mips port to in_small_data_p


Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> writes:
> I've just noticed that this patch broke bootstrap for mips-sgi-irix6o32
> (and mips-sgi-irix5 which I'm currently trying to revive, while
> investigating PR target/10190):

Sorry for the breakage. ;(

o32 irix doesn't need the special string treatment in the current
definition of mips_select_section.  I guess the fix would be to
reinstate this part of the old definition:

      if (((TREE_CODE (decl) == VAR_DECL
            && TREE_READONLY (decl) && !TREE_SIDE_EFFECTS (decl)
            && DECL_INITIAL (decl)
            && (DECL_INITIAL (decl) == error_mark_node
                || TREE_CONSTANT (DECL_INITIAL (decl))))
           /* Deal with calls from output_constant_def_contents.  */
           || (TREE_CODE (decl) != VAR_DECL
               && (TREE_CODE (decl) != STRING_CST
                   || !flag_writable_strings)))
          && ! (flag_pic && reloc))
	readonly_data_section ();
      else
	data_section ();

in a version specific to o32 irix.

It might be worth doing even if we do require gas.  If the native
assembler doesn't accept '.section .data.rel.ro', there doesn't seem
to be any guarantee that the native linker will handle the section
correctly anyway.

I'll try to come up with a patch tomorrow.

Richard


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]