home *** CD-ROM | disk | FTP | other *** search
-
- To enable debugging under Irix 5, you must get GNU as 2.3 and apply the
- following patch to it. Then build and install GNU as.
-
- Now configure gcc using the --with-gnu-as option, and build and install
- it normally. Debugging will now work. It will probably work better with
- gdb than with dbx.
-
- *** tc-mips.c.orig Thu May 5 18:22:31 1994
- --- tc-mips.c Mon Jun 6 12:51:08 1994
- *************** static char *mips_regmask_frag;
- *** 90,95 ****
- --- 90,106 ----
-
- const char *mips_target_format = DEFAULT_TARGET_FORMAT;
-
- + /* The name of the readonly data section. */
- + #ifdef OBJ_AOUT
- + #define RDATA_SECTION_NAME ".data"
- + #endif
- + #ifdef OBJ_ECOFF
- + #define RDATA_SECTION_NAME ".rdata"
- + #endif
- + #ifdef OBJ_ELF
- + #define RDATA_SECTION_NAME ".rodata"
- + #endif
- +
- /* These variables are filled in with the masks of registers used.
- The object format code reads them and puts them in the appropriate
- place. */
- *************** macro (ip)
- *** 2987,3003 ****
- && offset_expr.X_add_number == 0);
- macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)",
- treg, (int) BFD_RELOC_MIPS_LITERAL, GP);
- }
- else if (mips_pic == SVR4_PIC
- || mips_pic == EMBEDDED_PIC)
- {
- assert (imm_expr.X_op == O_constant);
- ! load_register (&icnt, treg, &imm_expr);
- }
- else
- ! abort ();
- !
- ! return;
-
- case M_LI_D:
- /* We know that sym is in the .rdata section. First we get the
- --- 2998,3019 ----
- && offset_expr.X_add_number == 0);
- macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)",
- treg, (int) BFD_RELOC_MIPS_LITERAL, GP);
- + return;
- }
- else if (mips_pic == SVR4_PIC
- || mips_pic == EMBEDDED_PIC)
- {
- assert (imm_expr.X_op == O_constant);
- ! load_register (&icnt, AT, &imm_expr);
- ! macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- ! "mtc1", "t,G", AT, treg);
- ! break;
- }
- else
- ! {
- ! abort ();
- ! return;
- ! }
-
- case M_LI_D:
- /* We know that sym is in the .rdata section. First we get the
- *************** macro (ip)
- *** 3043,3049 ****
- treg + 1, (int) BFD_RELOC_LO16, AT);
- }
- }
- !
- break;
-
- case M_LI_DD:
- --- 3059,3070 ----
- treg + 1, (int) BFD_RELOC_LO16, AT);
- }
- }
- !
- ! /* To avoid confusion in tc_gen_reloc, we must ensure that this
- ! does not become a variant frag. */
- ! frag_wane (frag_now);
- ! frag_new (0);
- !
- break;
-
- case M_LI_DD:
- *************** macro (ip)
- *** 3100,3105 ****
- --- 3121,3132 ----
- macro_build ((char *) NULL, &icnt, &offset_expr, "lwc1", "T,o(b)",
- byte_order == LITTLE_ENDIAN ? treg + 1 : treg,
- (int) r, breg);
- +
- + /* To avoid confusion in tc_gen_reloc, we must ensure that this
- + does not become a variant frag. */
- + frag_wane (frag_now);
- + frag_new (0);
- +
- if (breg != AT)
- return;
- break;
- *************** mips_ip (str, ip)
- *** 4478,4487 ****
- {
- default: /* unused default case avoids warnings. */
- case 'L':
- ! newname = (mips_pic != SVR4_PIC ? ".lit8" : ".rdata");
- break;
- case 'F':
- ! newname = ".rdata";
- break;
- case 'l':
- assert (mips_pic == NO_PIC);
- --- 4505,4516 ----
- {
- default: /* unused default case avoids warnings. */
- case 'L':
- ! newname = (mips_pic != SVR4_PIC
- ! ? ".lit8"
- ! : RDATA_SECTION_NAME);
- break;
- case 'F':
- ! newname = RDATA_SECTION_NAME;
- break;
- case 'l':
- assert (mips_pic == NO_PIC);
- *************** mips_ip (str, ip)
- *** 4489,4496 ****
- break;
- }
- new_seg = subseg_new (newname, (subsegT) 0);
- #ifdef OBJ_ELF
- ! bfd_set_section_alignment (stdoutput, new_seg, 4);
- #endif
- if (seg == now_seg)
- as_bad ("Can't use floating point insn in this section");
- --- 4518,4528 ----
- break;
- }
- new_seg = subseg_new (newname, (subsegT) 0);
- + frag_align (*args == 'l' ? 2 : 3, 0);
- #ifdef OBJ_ELF
- ! record_alignment (new_seg, 4);
- ! #else
- ! record_alignment (new_seg, *args == 'l' ? 2 : 3);
- #endif
- if (seg == now_seg)
- as_bad ("Can't use floating point insn in this section");
- *************** s_change_sec (sec)
- *** 5478,5490 ****
- break;
-
- case 'r':
- ! #ifdef OBJ_ECOFF
- ! subseg_new (".rdata", (subsegT) get_absolute_expression ());
- ! demand_empty_rest_of_line ();
- ! break;
- ! #else /* ! defined (OBJ_ECOFF) */
- #ifdef OBJ_ELF
- - seg = subseg_new (".rodata", (subsegT) get_absolute_expression ());
- bfd_set_section_flags (stdoutput, seg,
- (SEC_ALLOC
- | SEC_LOAD
- --- 5510,5518 ----
- break;
-
- case 'r':
- ! seg = subseg_new (RDATA_SECTION_NAME,
- ! (subsegT) get_absolute_expression ());
- #ifdef OBJ_ELF
- bfd_set_section_flags (stdoutput, seg,
- (SEC_ALLOC
- | SEC_LOAD
- *************** s_change_sec (sec)
- *** 5492,5504 ****
- | SEC_RELOC
- | SEC_DATA));
- bfd_set_section_alignment (stdoutput, seg, 4);
- demand_empty_rest_of_line ();
- break;
- - #else /* ! defined (OBJ_ELF) */
- - s_data (0);
- - break;
- - #endif /* ! defined (OBJ_ELF) */
- - #endif /* ! defined (OBJ_ECOFF) */
-
- case 's':
- #ifdef GPOPT
- --- 5520,5528 ----
- | SEC_RELOC
- | SEC_DATA));
- bfd_set_section_alignment (stdoutput, seg, 4);
- + #endif
- demand_empty_rest_of_line ();
- break;
-
- case 's':
- #ifdef GPOPT
-
-