00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "bfd.h"
00026 #include "sysdep.h"
00027 #include "libbfd.h"
00028 #include "elf-bfd.h"
00029
00030
00031
00032
00033 static reloc_howto_type dummy =
00034 HOWTO (0,
00035 0,
00036 0,
00037 0,
00038 FALSE,
00039 0,
00040 complain_overflow_dont,
00041 NULL,
00042 "UNKNOWN",
00043 FALSE,
00044 0,
00045 0,
00046 FALSE);
00047
00048 static void elf_generic_info_to_howto
00049 PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
00050 static void elf_generic_info_to_howto_rel
00051 PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
00052 static bfd_boolean elf64_generic_link_add_symbols
00053 PARAMS ((bfd *, struct bfd_link_info *));
00054
00055 static void
00056 elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
00057 bfd *abfd ATTRIBUTE_UNUSED;
00058 arelent *bfd_reloc;
00059 Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
00060 {
00061 bfd_reloc->howto = &dummy;
00062 }
00063
00064 static void
00065 elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
00066 bfd *abfd ATTRIBUTE_UNUSED;
00067 arelent *bfd_reloc;
00068 Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED;
00069 {
00070 bfd_reloc->howto = &dummy;
00071 }
00072
00073 static bfd_boolean
00074 elf64_generic_link_add_symbols (abfd, info)
00075 bfd *abfd;
00076 struct bfd_link_info *info;
00077 {
00078 asection *o;
00079
00080
00081 for (o = abfd->sections; o != NULL; o = o->next)
00082 if ((o->flags & SEC_RELOC) != 0)
00083 {
00084 Elf_Internal_Ehdr *ehdrp;
00085
00086 ehdrp = elf_elfheader (abfd);
00087 (*_bfd_error_handler) (_("%B: Relocations in generic ELF (EM: %d)"),
00088 abfd, ehdrp->e_machine);
00089
00090 bfd_set_error (bfd_error_wrong_format);
00091 return FALSE;
00092 }
00093
00094 return bfd_elf_link_add_symbols (abfd, info);
00095 }
00096
00097 #define TARGET_LITTLE_SYM bfd_elf64_little_generic_vec
00098 #define TARGET_LITTLE_NAME "elf64-little"
00099 #define TARGET_BIG_SYM bfd_elf64_big_generic_vec
00100 #define TARGET_BIG_NAME "elf64-big"
00101 #define ELF_ARCH bfd_arch_unknown
00102 #define ELF_MACHINE_CODE EM_NONE
00103 #define ELF_MAXPAGESIZE 0x1
00104 #define bfd_elf64_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
00105 #define bfd_elf64_bfd_link_add_symbols elf64_generic_link_add_symbols
00106 #define elf_info_to_howto elf_generic_info_to_howto
00107 #define elf_info_to_howto_rel elf_generic_info_to_howto_rel
00108
00109 #include "elf64-target.h"