PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
static boolean mips_elf_sym_is_global PARAMS ((bfd *, asymbol *));
static boolean mips_elf_object_p PARAMS ((bfd *));
-static void mips_elf_final_write_processing PARAMS ((bfd *));
+static void mips_elf_final_write_processing
+ PARAMS ((bfd *, boolean));
static boolean mips_elf_section_from_shdr
PARAMS ((bfd *, Elf32_Internal_Shdr *, char *));
static boolean mips_elf_fake_sections
abort ();
ret = bfd_reloc_ok;
- if (symbol->section == &bfd_und_section
+ if (bfd_is_und_section (symbol->section)
&& output_bfd == (bfd *) NULL)
ret = bfd_reloc_undefined;
output_bfd = symbol->section->output_section->owner;
}
- if (symbol->section == &bfd_und_section
+ if (bfd_is_und_section (symbol->section)
&& relocateable == false)
return bfd_reloc_undefined;
file. This gets the MIPS architecture right based on the machine
number. */
+/*ARGSUSED*/
static void
-mips_elf_final_write_processing (abfd)
+mips_elf_final_write_processing (abfd, linker)
bfd *abfd;
+ boolean linker;
{
unsigned long val;
unsigned int i;
const char *name;
asection *sec;
- BFD_ASSERT ((*hdrpp)->rawdata != NULL);
- name = ((asection *) (*hdrpp)->rawdata)->name;
+ BFD_ASSERT ((*hdrpp)->bfd_section != NULL);
+ name = bfd_get_section_name (abfd, (*hdrpp)->bfd_section);
BFD_ASSERT (name != NULL
&& strncmp (name, ".gptab.", sizeof ".gptab." - 1) == 0);
sec = bfd_get_section_by_name (abfd, name + sizeof ".gptab" - 1);
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
return false;
- newsect = (asection *) hdr->rawdata;
+ newsect = hdr->bfd_section;
if (hdr->sh_type == SHT_MIPS_DEBUG)
{
*retval = SHN_MIPS_SCOMMON;
return true;
}
- if ((asection *) hdr->rawdata == sec)
- return true;
+ if (strcmp (bfd_get_section_name (abfd, sec), ".acommon") == 0)
+ {
+ *retval = SHN_MIPS_ACOMMON;
+ return true;
+ }
return false;
}
return false;
}
- if (hdr->rawdata != NULL)
+ if (hdr->bfd_section != NULL)
{
- const char *name = ((asection *) hdr->rawdata)->name;
+ const char *name = bfd_get_section_name (abfd, hdr->bfd_section);
if (strcmp (name, ".sdata") == 0)
{
break;
case SHN_MIPS_SUNDEFINED:
- asym->section = &bfd_und_section;
+ asym->section = bfd_und_section_ptr;
break;
}
}
break;
case SHN_MIPS_SUNDEFINED:
- *secp = &bfd_und_section;
+ *secp = bfd_und_section_ptr;
break;
}
for (; rel < relend; rel++)
{
int r_type;
- const reloc_howto_type *howto;
+ reloc_howto_type *howto;
long r_symndx;
bfd_vma addend;
struct elf_link_hash_entry *h;