(mips_regmask_frag): New static variable, if OBJ_ELF.
(md_begin): If OBJ_ELF, create .reginfo section and set
mips_regmask_frag to a frag.
(mips_elf_final_processing): New function, if OBJ_ELF. Set
mips_regmask_frag to register mask information.
* config/tc-mips.h (elf_tc_final_processing): New macro, defined
if OBJ_ELF.
+Tue Oct 12 17:26:15 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * config/tc-mips.c: If OBJ_ELF, include elf/mips.h.
+ (mips_regmask_frag): New static variable, if OBJ_ELF.
+ (md_begin): If OBJ_ELF, create .reginfo section and set
+ mips_regmask_frag to a frag.
+ (mips_elf_final_processing): New function, if OBJ_ELF. Set
+ mips_regmask_frag to register mask information.
+ * config/tc-mips.h (elf_tc_final_processing): New macro, defined
+ if OBJ_ELF.
+
Tue Oct 12 03:33:26 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
* messages.c (as_fatal): Use myname when printing messages.
Tue Oct 12 03:33:26 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
* messages.c (as_fatal): Use myname when printing messages.
+#ifdef OBJ_ELF
+#include "elf/mips.h"
+
+static char *mips_regmask_frag;
+#endif
+
#define AT 1
#define GP 28
#define RA 31
#define AT 1
#define GP 28
#define RA 31
bfd_set_gp_size (stdoutput, g_switch_value);
#endif
bfd_set_gp_size (stdoutput, g_switch_value);
#endif
+#ifdef OBJ_ELF
+ /* Create a .reginfo section for register masks. */
+ {
+ segT seg;
+ subsegT subseg;
+ segT regsec;
+
+ seg = now_seg;
+ subseg = now_subseg;
+ regsec = subseg_new (".reginfo", (subsegT) 0);
+
+ /* I don't know why this section should be loaded, but the ABI
+ says that SHF_ALLOC should be set. */
+ bfd_set_section_flags (stdoutput, regsec,
+ SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA);
+
+ mips_regmask_frag = frag_more (sizeof (Elf32_External_RegInfo));
+
+ subseg_set (seg, subseg);
+ }
+#endif /* OBJ_ELF */
+
#ifndef OBJ_ECOFF
md_obj_begin ();
#endif
#ifndef OBJ_ECOFF
md_obj_begin ();
#endif
+#ifdef OBJ_ELF
+
+/* Write out the .reginfo section for a MIPS ELF file. */
+
+void
+mips_elf_final_processing ()
+{
+ Elf32_RegInfo s;
+
+ s.ri_gprmask = mips_gprmask;
+ s.ri_cprmask[0] = mips_cprmask[0];
+ s.ri_cprmask[1] = mips_cprmask[1];
+ s.ri_cprmask[2] = mips_cprmask[2];
+ s.ri_cprmask[3] = mips_cprmask[3];
+ /* The gp_value field is set by the MIPS ELF backend. */
+
+ bfd_mips_elf32_swap_reginfo_out (stdoutput, &s,
+ ((Elf32_External_RegInfo *)
+ mips_regmask_frag));
+}
+
+#endif /* OBJ_ELF */
+\f
#ifndef OBJ_ECOFF
/* These functions should really be defined by the object file format,
#ifndef OBJ_ECOFF
/* These functions should really be defined by the object file format,