mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
* config/tc-mips.c (mips_ip): Mark sections created to hold
floating point information as read only.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Fri May 24 18:24:11 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* config/tc-mips.c (mips_ip): Mark sections created to hold
|
||||||
|
floating point information as read only.
|
||||||
|
|
||||||
Fri May 24 12:07:54 1996 David Edelsohn <edelsohn@mhpcc.edu>
|
Fri May 24 12:07:54 1996 David Edelsohn <edelsohn@mhpcc.edu>
|
||||||
|
|
||||||
* config/tc-ppc.c (ppc_set_cpu): Change defaults to match AIX.
|
* config/tc-ppc.c (ppc_set_cpu): Change defaults to match AIX.
|
||||||
|
@ -5496,6 +5496,12 @@ mips_ip (str, ip)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
new_seg = subseg_new (newname, (subsegT) 0);
|
new_seg = subseg_new (newname, (subsegT) 0);
|
||||||
|
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
||||||
|
bfd_set_section_flags (stdoutput, new_seg,
|
||||||
|
(SEC_ALLOC
|
||||||
|
| SEC_LOAD
|
||||||
|
| SEC_READONLY
|
||||||
|
| SEC_DATA));
|
||||||
frag_align (*args == 'l' ? 2 : 3, 0);
|
frag_align (*args == 'l' ? 2 : 3, 0);
|
||||||
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
|
||||||
record_alignment (new_seg, 4);
|
record_alignment (new_seg, 4);
|
||||||
@ -6315,7 +6321,7 @@ mips_frob_file ()
|
|||||||
for (l = mips_hi_fixup_list; l != NULL; l = l->next)
|
for (l = mips_hi_fixup_list; l != NULL; l = l->next)
|
||||||
{
|
{
|
||||||
segment_info_type *seginfo;
|
segment_info_type *seginfo;
|
||||||
fixS *f, *prev;
|
int pass;
|
||||||
|
|
||||||
assert (l->fixp->fx_r_type == BFD_RELOC_HI16_S);
|
assert (l->fixp->fx_r_type == BFD_RELOC_HI16_S);
|
||||||
|
|
||||||
@ -6328,46 +6334,57 @@ mips_frob_file ()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Look through the fixups for this segment for a matching %lo.
|
/* Look through the fixups for this segment for a matching %lo.
|
||||||
When we find one, move the %hi just in front of it. */
|
When we find one, move the %hi just in front of it. We do
|
||||||
|
this in two passes. In the first pass, we try to find a
|
||||||
|
unique %lo. In the second pass, we permit multiple %hi
|
||||||
|
relocs for a single %lo (this is a GNU extension). */
|
||||||
seginfo = seg_info (l->seg);
|
seginfo = seg_info (l->seg);
|
||||||
prev = NULL;
|
for (pass = 0; pass < 2; pass++)
|
||||||
for (f = seginfo->fix_root; f != NULL; f = f->fx_next)
|
|
||||||
{
|
{
|
||||||
/* Check whether this is a %lo fixup which matches l->fixp;
|
fixS *f, *prev;
|
||||||
we can't use it if the %lo is already matching a %hi. */
|
|
||||||
if (f->fx_r_type == BFD_RELOC_LO16
|
prev = NULL;
|
||||||
&& f->fx_addsy == l->fixp->fx_addsy
|
for (f = seginfo->fix_root; f != NULL; f = f->fx_next)
|
||||||
&& f->fx_offset == l->fixp->fx_offset
|
|
||||||
&& (prev == NULL
|
|
||||||
|| prev->fx_r_type != BFD_RELOC_HI16_S
|
|
||||||
|| prev->fx_addsy != f->fx_addsy
|
|
||||||
|| prev->fx_offset != f->fx_offset))
|
|
||||||
{
|
{
|
||||||
fixS **pf;
|
/* Check whether this is a %lo fixup which matches l->fixp. */
|
||||||
|
if (f->fx_r_type == BFD_RELOC_LO16
|
||||||
|
&& f->fx_addsy == l->fixp->fx_addsy
|
||||||
|
&& f->fx_offset == l->fixp->fx_offset
|
||||||
|
&& (pass == 1
|
||||||
|
|| prev == NULL
|
||||||
|
|| prev->fx_r_type != BFD_RELOC_HI16_S
|
||||||
|
|| prev->fx_addsy != f->fx_addsy
|
||||||
|
|| prev->fx_offset != f->fx_offset))
|
||||||
|
{
|
||||||
|
fixS **pf;
|
||||||
|
|
||||||
/* Move l->fixp before f. */
|
/* Move l->fixp before f. */
|
||||||
for (pf = &seginfo->fix_root;
|
for (pf = &seginfo->fix_root;
|
||||||
*pf != l->fixp;
|
*pf != l->fixp;
|
||||||
pf = &(*pf)->fx_next)
|
pf = &(*pf)->fx_next)
|
||||||
assert (*pf != NULL);
|
assert (*pf != NULL);
|
||||||
|
|
||||||
*pf = l->fixp->fx_next;
|
*pf = l->fixp->fx_next;
|
||||||
|
|
||||||
l->fixp->fx_next = f;
|
l->fixp->fx_next = f;
|
||||||
if (prev == NULL)
|
if (prev == NULL)
|
||||||
seginfo->fix_root = l->fixp;
|
seginfo->fix_root = l->fixp;
|
||||||
else
|
else
|
||||||
prev->fx_next = l->fixp;
|
prev->fx_next = l->fixp;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
prev = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
prev = f;
|
if (f != NULL)
|
||||||
}
|
break;
|
||||||
|
|
||||||
if (f == NULL)
|
if (pass == 1)
|
||||||
as_warn_where (l->fixp->fx_file, l->fixp->fx_line,
|
as_warn_where (l->fixp->fx_file, l->fixp->fx_line,
|
||||||
"Unmatched %%hi reloc");
|
"Unmatched %%hi reloc");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user