X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf64-mmix.c;h=a1148b09acd176848e31d7fd617b3cf3688d8108;hb=b5f79c764c4d8fa336c92946eec8e2d8f4e9bffd;hp=95cbd76f1bc4a15fd0ef53026d44a29e98a50fd8;hpb=f8df10f4f595488c4b6a8e49ffc99721d5aefdba;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c index 95cbd76f1b..a1148b09ac 100644 --- a/bfd/elf64-mmix.c +++ b/bfd/elf64-mmix.c @@ -1,5 +1,5 @@ /* 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 This file is part of BFD, the Binary File Descriptor library. @@ -77,7 +77,7 @@ static bfd_reloc_status_type mmix_elf_perform_relocation 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 *, @@ -1264,11 +1264,18 @@ mmix_final_link_relocate (howto, input_section, contents, } 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. */ @@ -1384,13 +1391,7 @@ mmix_elf_gc_mark_hook (abfd, info, rel, h, sym) } 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; @@ -1563,9 +1564,8 @@ mmix_elf_symbol_processing (abfd, asym) 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; { @@ -1673,14 +1673,12 @@ mmix_elf_final_link (abfd, info) 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; }