diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2001-05-28 05:21:37 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2001-05-28 05:21:37 +0000 |
commit | c9edceadd8a0c5acc1f58da35396d952bdaaf786 (patch) | |
tree | ae2a6f4f4987889b7bd2af7bdf0b86fa580df011 /contrib/binutils/bfd/elf64-gen.c | |
parent | bf9a5db426c4b39201fc3149bbed3c8f14edbe86 (diff) |
Import of GNU Binutils version 2.11.0.
Believe it or not, this is heavily stripped down.
Notes
Notes:
svn path=/vendor/binutils/dist/; revision=77298
Diffstat (limited to 'contrib/binutils/bfd/elf64-gen.c')
-rw-r--r-- | contrib/binutils/bfd/elf64-gen.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/binutils/bfd/elf64-gen.c b/contrib/binutils/bfd/elf64-gen.c index 78dc09d39788..c071934991d9 100644 --- a/contrib/binutils/bfd/elf64-gen.c +++ b/contrib/binutils/bfd/elf64-gen.c @@ -58,6 +58,37 @@ elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc) bfd_reloc->howto = &dummy; } +static boolean +elf64_generic_link_add_symbols (abfd, info) + bfd *abfd; + struct bfd_link_info *info; +{ + asection *o; + + /* Check if there are any relocations. */ + for (o = abfd->sections; o != NULL; o = o->next) + if ((o->flags & SEC_RELOC) != 0) + { + Elf_Internal_Ehdr *ehdrp; + + ehdrp = elf_elfheader (abfd); + if (abfd->my_archive) + (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"), + bfd_get_filename (abfd->my_archive), + bfd_get_filename (abfd), + ehdrp->e_machine); + else + (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"), + bfd_get_filename (abfd), + ehdrp->e_machine); + + bfd_set_error (bfd_error_wrong_format); + return false; + } + + return bfd_elf64_bfd_link_add_symbols (abfd, info); +} + #define TARGET_LITTLE_SYM bfd_elf64_little_generic_vec #define TARGET_LITTLE_NAME "elf64-little" #define TARGET_BIG_SYM bfd_elf64_big_generic_vec @@ -66,6 +97,7 @@ elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc) #define ELF_MACHINE_CODE EM_NONE #define ELF_MAXPAGESIZE 0x1 #define bfd_elf64_bfd_reloc_type_lookup bfd_default_reloc_type_lookup +#define bfd_elf64_bfd_link_add_symbols elf64_generic_link_add_symbols #define elf_info_to_howto elf_generic_info_to_howto #define elf_info_to_howto_rel elf_generic_info_to_howto_rel |