* config/tc-mips.c (md_begin): If -64, create a .MIPS.options
section rather than a .reginfo section. (mips_elf_final_processing): If -64, write out 64 bit RegInfo information.
This commit is contained in:
parent
bc05732be6
commit
871781804f
|
@ -1,5 +1,10 @@
|
|||
Fri May 31 01:08:06 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* config/tc-mips.c (md_begin): If -64, create a .MIPS.options
|
||||
section rather than a .reginfo section.
|
||||
(mips_elf_final_processing): If -64, write out 64 bit RegInfo
|
||||
information.
|
||||
|
||||
* config/tc-mips.c (load_register): If mips_isa < 3, permit a 32
|
||||
bit value with the high bit set.
|
||||
|
||||
|
|
|
@ -774,6 +774,9 @@ md_begin ()
|
|||
|
||||
seg = now_seg;
|
||||
subseg = now_subseg;
|
||||
|
||||
if (! mips_64)
|
||||
{
|
||||
sec = subseg_new (".reginfo", (subsegT) 0);
|
||||
|
||||
/* The ABI says this section should be loaded so that the
|
||||
|
@ -786,6 +789,36 @@ md_begin ()
|
|||
#ifdef OBJ_ELF
|
||||
mips_regmask_frag = frag_more (sizeof (Elf32_External_RegInfo));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
/* The 64-bit ABI uses a .MIPS.options section rather than
|
||||
.reginfo section. */
|
||||
sec = subseg_new (".MIPS.options", (subsegT) 0);
|
||||
(void) bfd_set_section_flags (stdoutput, sec,
|
||||
(SEC_ALLOC | SEC_LOAD
|
||||
| SEC_READONLY | SEC_DATA));
|
||||
(void) bfd_set_section_alignment (stdoutput, sec, 3);
|
||||
|
||||
#ifdef OBJ_ELF
|
||||
/* Set up the option header. */
|
||||
{
|
||||
Elf_Internal_Options opthdr;
|
||||
char *f;
|
||||
|
||||
opthdr.kind = ODK_REGINFO;
|
||||
opthdr.size = (sizeof (Elf_External_Options)
|
||||
+ sizeof (Elf64_External_RegInfo));
|
||||
opthdr.section = 0;
|
||||
opthdr.info = 0;
|
||||
f = frag_more (sizeof (Elf_External_Options));
|
||||
bfd_mips_elf_swap_options_out (stdoutput, &opthdr,
|
||||
(Elf_External_Options *) f);
|
||||
|
||||
mips_regmask_frag = frag_more (sizeof (Elf64_External_RegInfo));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (ECOFF_DEBUGGING)
|
||||
{
|
||||
|
@ -7647,10 +7680,12 @@ mips_local_label (name)
|
|||
|
||||
void
|
||||
mips_elf_final_processing ()
|
||||
{
|
||||
/* Write out the register information. */
|
||||
if (! mips_64)
|
||||
{
|
||||
Elf32_RegInfo s;
|
||||
|
||||
/* Write out the .reginfo section. */
|
||||
s.ri_gprmask = mips_gprmask;
|
||||
s.ri_cprmask[0] = mips_cprmask[0];
|
||||
s.ri_cprmask[1] = mips_cprmask[1];
|
||||
|
@ -7661,6 +7696,23 @@ mips_elf_final_processing ()
|
|||
bfd_mips_elf32_swap_reginfo_out (stdoutput, &s,
|
||||
((Elf32_External_RegInfo *)
|
||||
mips_regmask_frag));
|
||||
}
|
||||
else
|
||||
{
|
||||
Elf64_Internal_RegInfo s;
|
||||
|
||||
s.ri_gprmask = mips_gprmask;
|
||||
s.ri_pad = 0;
|
||||
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_elf64_swap_reginfo_out (stdoutput, &s,
|
||||
((Elf64_External_RegInfo *)
|
||||
mips_regmask_frag));
|
||||
}
|
||||
|
||||
/* Set the MIPS ELF flag bits. FIXME: There should probably be some
|
||||
sort of BFD interface for this. */
|
||||
|
|
Loading…
Reference in New Issue