elf32-gen.c revision 60484
133965Sjdp/* Generic support for 32-bit ELF 260484Sobrien Copyright 1993, 1995, 1998, 1999 Free Software Foundation, Inc. 333965Sjdp 433965SjdpThis file is part of BFD, the Binary File Descriptor library. 533965Sjdp 633965SjdpThis program is free software; you can redistribute it and/or modify 733965Sjdpit under the terms of the GNU General Public License as published by 833965Sjdpthe Free Software Foundation; either version 2 of the License, or 933965Sjdp(at your option) any later version. 1033965Sjdp 1133965SjdpThis program is distributed in the hope that it will be useful, 1233965Sjdpbut WITHOUT ANY WARRANTY; without even the implied warranty of 1333965SjdpMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1433965SjdpGNU General Public License for more details. 1533965Sjdp 1633965SjdpYou should have received a copy of the GNU General Public License 1733965Sjdpalong with this program; if not, write to the Free Software 1833965SjdpFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 1933965Sjdp 2033965Sjdp#include "bfd.h" 2133965Sjdp#include "sysdep.h" 2233965Sjdp#include "libbfd.h" 2333965Sjdp#include "elf-bfd.h" 2433965Sjdp 2560484Sobrien/* This does not include any relocation information, but should be 2660484Sobrien good enough for GDB or objdump to read the file. */ 2733965Sjdp 2860484Sobrienstatic reloc_howto_type dummy = 2960484Sobrien HOWTO (0, /* type */ 3060484Sobrien 0, /* rightshift */ 3160484Sobrien 0, /* size (0 = byte, 1 = short, 2 = long) */ 3260484Sobrien 0, /* bitsize */ 3360484Sobrien false, /* pc_relative */ 3460484Sobrien 0, /* bitpos */ 3560484Sobrien complain_overflow_dont, /* complain_on_overflow */ 3660484Sobrien NULL, /* special_function */ 3760484Sobrien "UNKNOWN", /* name */ 3860484Sobrien false, /* partial_inplace */ 3960484Sobrien 0, /* src_mask */ 4060484Sobrien 0, /* dst_mask */ 4160484Sobrien false); /* pcrel_offset */ 4260484Sobrien 4360484Sobrienstatic void 4460484Sobrienelf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc) 4560484Sobrien bfd *abfd ATTRIBUTE_UNUSED; 4660484Sobrien arelent *bfd_reloc; 4760484Sobrien Elf32_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED; 4860484Sobrien{ 4960484Sobrien bfd_reloc->howto = &dummy; 5060484Sobrien} 5160484Sobrien 5260484Sobrienstatic void 5360484Sobrienelf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc) 5460484Sobrien bfd *abfd ATTRIBUTE_UNUSED; 5560484Sobrien arelent *bfd_reloc; 5660484Sobrien Elf32_Internal_Rel *elf_reloc ATTRIBUTE_UNUSED; 5760484Sobrien{ 5860484Sobrien bfd_reloc->howto = &dummy; 5960484Sobrien} 6060484Sobrien 6133965Sjdp#define TARGET_LITTLE_SYM bfd_elf32_little_generic_vec 6233965Sjdp#define TARGET_LITTLE_NAME "elf32-little" 6333965Sjdp#define TARGET_BIG_SYM bfd_elf32_big_generic_vec 6433965Sjdp#define TARGET_BIG_NAME "elf32-big" 6533965Sjdp#define ELF_ARCH bfd_arch_unknown 6633965Sjdp#define ELF_MACHINE_CODE EM_NONE 6760484Sobrien#define ELF_MAXPAGESIZE 0x1 6833965Sjdp#define bfd_elf32_bfd_reloc_type_lookup bfd_default_reloc_type_lookup 6960484Sobrien#define elf_info_to_howto elf_generic_info_to_howto 7060484Sobrien#define elf_info_to_howto_rel elf_generic_info_to_howto_rel 7133965Sjdp 7233965Sjdp#include "elf32-target.h" 73