/* MMIX-specific support for 64-bit ELF.
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com>
This file is part of BFD, the Binary File Descriptor library.
PARAMS ((asection *, reloc_howto_type *, PTR, bfd_vma, bfd_vma));
static boolean mmix_elf_section_from_bfd_section
- PARAMS ((bfd *, Elf64_Internal_Shdr *, asection *, int *));
+ PARAMS ((bfd *, asection *, int *));
static boolean mmix_elf_add_symbol_hook
PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
}
else
{
- (*_bfd_error_handler)
- (_("%s: register relocation against non-register symbol: %s in %s"),
- bfd_get_filename (input_section->owner),
- symname == NULL || *symname == 0 ? _("(unknown)") : symname,
- bfd_get_section_name (symsec->owner, symsec));
+ /* Note: This is seperated out into two messages in order
+ to ease the translation into other languages. */
+ if (symname == NULL || *symname == 0)
+ (*_bfd_error_handler)
+ (_("%s: register relocation against non-register symbol: (unknown) in %s"),
+ bfd_get_filename (input_section->owner),
+ bfd_get_section_name (symsec->owner, symsec));
+ else
+ (*_bfd_error_handler)
+ (_("%s: register relocation against non-register symbol: %s in %s"),
+ bfd_get_filename (input_section->owner), symname,
+ bfd_get_section_name (symsec->owner, symsec));
/* The bfd_reloc_outofrange return value, though intuitively a
better value, will not get us an error. */
}
else
{
- if (!(elf_bad_symtab (abfd)
- && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
- && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
- && sym->st_shndx != SHN_COMMON))
- {
- return bfd_section_from_elf_index (abfd, sym->st_shndx);
- }
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
}
return NULL;
index. */
static boolean
-mmix_elf_section_from_bfd_section (abfd, hdr, sec, retval)
+mmix_elf_section_from_bfd_section (abfd, sec, retval)
bfd * abfd ATTRIBUTE_UNUSED;
- Elf64_Internal_Shdr * hdr ATTRIBUTE_UNUSED;
asection * sec;
int * retval;
{
if (bfd_get_section_flags (abfd, reg_section) & SEC_HAS_CONTENTS)
_bfd_abort (__FILE__, __LINE__, _("Register section has contents\n"));
- /* FIXME: This does not seem like the proper way to kill a section,
- but it's the way it's done elsewhere, like elf64-alpha.c. */
/* Really remove the section. */
for (secpp = &abfd->sections;
*secpp != reg_section;
secpp = &(*secpp)->next)
;
- *secpp = (*secpp)->next;
+ bfd_section_list_remove (abfd, secpp);
--abfd->section_count;
}