Commit 38e596df by Richard Sandiford Committed by Richard Sandiford

mips.c (override_options): Disable -G on targets that have no .section support.

	* config/mips/mips.c (override_options): Disable -G on targets that
	have no .section support.
	(mips_select_section): Use default_select_section for such targets.

From-SVN: r70154
parent 76d2e2c5
2003-08-04 Richard Sandiford <rsandif@redhat.com>
* config/mips/mips.c (override_options): Disable -G on targets that
have no .section support.
(mips_select_section): Use default_select_section for such targets.
2003-08-04 Nathanael Nerode <neroden@gcc.gnu.org> 2003-08-04 Nathanael Nerode <neroden@gcc.gnu.org>
* fixinc/inclhack.def (svr4_undeclared_getrnge): Introduce and enable. * fixinc/inclhack.def (svr4_undeclared_getrnge): Introduce and enable.
......
...@@ -5059,6 +5059,13 @@ override_options () ...@@ -5059,6 +5059,13 @@ override_options ()
if (!TARGET_EXPLICIT_RELOCS && !TARGET_GAS) if (!TARGET_EXPLICIT_RELOCS && !TARGET_GAS)
mips_section_threshold = 0; mips_section_threshold = 0;
/* We switch to small data sections using ".section", which the native
o32 irix assemblers don't understand. Disable -G accordingly.
We must do this regardless of command-line options since otherwise
the compiler would abort. */
if (!targetm.have_named_sections)
mips_section_threshold = 0;
/* -membedded-pic is a form of PIC code suitable for embedded /* -membedded-pic is a form of PIC code suitable for embedded
systems. All calls are made using PC relative addressing, and systems. All calls are made using PC relative addressing, and
all data is addressed using the $gp register. This requires gas, all data is addressed using the $gp register. This requires gas,
...@@ -7879,8 +7886,11 @@ mips_select_section (decl, reloc, align) ...@@ -7879,8 +7886,11 @@ mips_select_section (decl, reloc, align)
For mips16 code, put strings in the text section so that a PC For mips16 code, put strings in the text section so that a PC
relative load instruction can be used to get their address. */ relative load instruction can be used to get their address. */
text_section (); text_section ();
else else if (targetm.have_named_sections)
default_elf_select_section (decl, reloc, align); default_elf_select_section (decl, reloc, align);
else
/* The native irix o32 assembler doesn't support named sections. */
default_select_section (decl, reloc, align);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment