* elf64-mmix.c (mmix_elf_add_symbol_hook): Mark reg section
SEC_LINKER_CREATED. (mmix_elf_final_link): Check that section hasn't already been removed before removing. * mmo.c (mmo_scan): Mark reg contents section SEC_LINKER_CREATED. (mmo_canonicalize_symtab): Likewise for reg section.
This commit is contained in:
parent
96f8ade546
commit
46fda84e78
3 changed files with 21 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2005-08-17 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf64-mmix.c (mmix_elf_add_symbol_hook): Mark reg section
|
||||||
|
SEC_LINKER_CREATED.
|
||||||
|
(mmix_elf_final_link): Check that section hasn't already been
|
||||||
|
removed before removing.
|
||||||
|
* mmo.c (mmo_scan): Mark reg contents section SEC_LINKER_CREATED.
|
||||||
|
(mmo_canonicalize_symtab): Likewise for reg section.
|
||||||
|
|
||||||
2005-08-17 Alan Modra <amodra@bigpond.net.au>
|
2005-08-17 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* elf32-cris.c (elf_cris_adjust_gotplt_to_got): Move assert later.
|
* elf32-cris.c (elf_cris_adjust_gotplt_to_got): Move assert later.
|
||||||
|
|
|
@ -2184,7 +2184,10 @@ mmix_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
|
||||||
bfd_vma *valp ATTRIBUTE_UNUSED;
|
bfd_vma *valp ATTRIBUTE_UNUSED;
|
||||||
{
|
{
|
||||||
if (sym->st_shndx == SHN_REGISTER)
|
if (sym->st_shndx == SHN_REGISTER)
|
||||||
*secp = bfd_make_section_old_way (abfd, MMIX_REG_SECTION_NAME);
|
{
|
||||||
|
*secp = bfd_make_section_old_way (abfd, MMIX_REG_SECTION_NAME);
|
||||||
|
(*secp)->flags |= SEC_LINKER_CREATED;
|
||||||
|
}
|
||||||
else if ((*namep)[0] == '_' && (*namep)[1] == '_' && (*namep)[2] == '.'
|
else if ((*namep)[0] == '_' && (*namep)[1] == '_' && (*namep)[2] == '.'
|
||||||
&& strncmp (*namep, MMIX_LOC_SECTION_START_SYMBOL_PREFIX,
|
&& strncmp (*namep, MMIX_LOC_SECTION_START_SYMBOL_PREFIX,
|
||||||
strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX)) == 0)
|
strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX)) == 0)
|
||||||
|
@ -2261,9 +2264,12 @@ mmix_elf_final_link (abfd, info)
|
||||||
if (bfd_get_section_flags (abfd, reg_section) & SEC_HAS_CONTENTS)
|
if (bfd_get_section_flags (abfd, reg_section) & SEC_HAS_CONTENTS)
|
||||||
_bfd_abort (__FILE__, __LINE__, _("Register section has contents\n"));
|
_bfd_abort (__FILE__, __LINE__, _("Register section has contents\n"));
|
||||||
|
|
||||||
/* Really remove the section. */
|
/* Really remove the section, if it hasn't already been done. */
|
||||||
bfd_section_list_remove (abfd, reg_section);
|
if (!bfd_section_removed_from_list (abfd, reg_section))
|
||||||
--abfd->section_count;
|
{
|
||||||
|
bfd_section_list_remove (abfd, reg_section);
|
||||||
|
--abfd->section_count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! bfd_elf_final_link (abfd, info))
|
if (! bfd_elf_final_link (abfd, info))
|
||||||
|
|
|
@ -1853,6 +1853,7 @@ mmo_scan (bfd *abfd)
|
||||||
rsec
|
rsec
|
||||||
= bfd_make_section_old_way (abfd,
|
= bfd_make_section_old_way (abfd,
|
||||||
MMIX_REG_CONTENTS_SECTION_NAME);
|
MMIX_REG_CONTENTS_SECTION_NAME);
|
||||||
|
rsec->flags |= SEC_LINKER_CREATED;
|
||||||
rsec->vma = z * 8;
|
rsec->vma = z * 8;
|
||||||
loc = mmo_get_loc (rsec, z * 8, (255 - z) * 8);
|
loc = mmo_get_loc (rsec, z * 8, (255 - z) * 8);
|
||||||
bfd_put_64 (abfd, first_octa, loc);
|
bfd_put_64 (abfd, first_octa, loc);
|
||||||
|
@ -2146,6 +2147,7 @@ mmo_canonicalize_symtab (bfd *abfd, asymbol **alocation)
|
||||||
{
|
{
|
||||||
c->section
|
c->section
|
||||||
= bfd_make_section_old_way (abfd, MMIX_REG_SECTION_NAME);
|
= bfd_make_section_old_way (abfd, MMIX_REG_SECTION_NAME);
|
||||||
|
c->section->flags |= SEC_LINKER_CREATED;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue