| OLD | NEW |
| 1 /* FRV-specific support for 32-bit ELF. | 1 /* FRV-specific support for 32-bit ELF. |
| 2 Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 | 2 Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 |
| 3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
| 4 | 4 |
| 5 This file is part of BFD, the Binary File Descriptor library. | 5 This file is part of BFD, the Binary File Descriptor library. |
| 6 | 6 |
| 7 This program is free software; you can redistribute it and/or modify | 7 This program is free software; you can redistribute it and/or modify |
| 8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
| 9 the Free Software Foundation; either version 3 of the License, or | 9 the Free Software Foundation; either version 3 of the License, or |
| 10 (at your option) any later version. | 10 (at your option) any later version. |
| 11 | 11 |
| 12 This program is distributed in the hope that it will be useful, | 12 This program is distributed in the hope that it will be useful, |
| 13 but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 GNU General Public License for more details. | 15 GNU General Public License for more details. |
| 16 | 16 |
| 17 You should have received a copy of the GNU General Public License | 17 You should have received a copy of the GNU General Public License |
| 18 along with this program; if not, write to the Free Software | 18 along with this program; if not, write to the Free Software |
| 19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | 19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
| 20 MA 02110-1301, USA. */ | 20 MA 02110-1301, USA. */ |
| 21 | 21 |
| 22 #include "sysdep.h" | 22 #include "sysdep.h" |
| 23 #include "bfd.h" | 23 #include "bfd.h" |
| 24 #include "libbfd.h" | 24 #include "libbfd.h" |
| 25 #include "elf-bfd.h" | 25 #include "elf-bfd.h" |
| 26 #include "elf/frv.h" | 26 #include "elf/frv.h" |
| 27 #include "dwarf2.h" | 27 #include "dwarf2.h" |
| 28 #include "hashtab.h" | 28 #include "hashtab.h" |
| 29 | 29 |
| 30 /* Forward declarations. */ | 30 /* Forward declarations. */ |
| 31 static bfd_reloc_status_type elf32_frv_relocate_lo16 | 31 |
| 32 PARAMS ((bfd *, Elf_Internal_Rela *, bfd_byte *, bfd_vma)); | |
| 33 static bfd_reloc_status_type elf32_frv_relocate_hi16 | |
| 34 PARAMS ((bfd *, Elf_Internal_Rela *, bfd_byte *, bfd_vma)); | |
| 35 static bfd_reloc_status_type elf32_frv_relocate_label24 | |
| 36 PARAMS ((bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_vma)); | |
| 37 static bfd_reloc_status_type elf32_frv_relocate_gprel12 | |
| 38 PARAMS ((struct bfd_link_info *, bfd *, asection *, Elf_Internal_Rela *, | |
| 39 » bfd_byte *, bfd_vma)); | |
| 40 static bfd_reloc_status_type elf32_frv_relocate_gprelu12 | |
| 41 PARAMS ((struct bfd_link_info *, bfd *, asection *, Elf_Internal_Rela *, | |
| 42 » bfd_byte *, bfd_vma)); | |
| 43 static bfd_reloc_status_type elf32_frv_relocate_gprello | |
| 44 PARAMS ((struct bfd_link_info *, bfd *, asection *, Elf_Internal_Rela *, | |
| 45 » bfd_byte *, bfd_vma)); | |
| 46 static bfd_reloc_status_type elf32_frv_relocate_gprelhi | |
| 47 PARAMS ((struct bfd_link_info *, bfd *, asection *, Elf_Internal_Rela *, | |
| 48 » bfd_byte *, bfd_vma)); | |
| 49 static reloc_howto_type *frv_reloc_type_lookup | |
| 50 PARAMS ((bfd *, bfd_reloc_code_real_type)); | |
| 51 static void frv_info_to_howto_rela | |
| 52 PARAMS ((bfd *, arelent *, Elf_Internal_Rela *)); | |
| 53 static bfd_boolean elf32_frv_relocate_section | |
| 54 PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, | |
| 55 » Elf_Internal_Rela *, Elf_Internal_Sym *, asection **)); | |
| 56 static bfd_boolean elf32_frv_add_symbol_hook | |
| 57 PARAMS (( bfd *, struct bfd_link_info *, Elf_Internal_Sym *, | |
| 58 » const char **, flagword *, asection **, bfd_vma *)); | |
| 59 static bfd_reloc_status_type frv_final_link_relocate | |
| 60 PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, | |
| 61 » Elf_Internal_Rela *, bfd_vma)); | |
| 62 static bfd_boolean elf32_frv_check_relocs | |
| 63 PARAMS ((bfd *, struct bfd_link_info *, asection *, | |
| 64 » const Elf_Internal_Rela *)); | |
| 65 static int elf32_frv_machine | |
| 66 PARAMS ((bfd *)); | |
| 67 static bfd_boolean elf32_frv_object_p | |
| 68 PARAMS ((bfd *)); | |
| 69 static bfd_boolean frv_elf_set_private_flags | |
| 70 PARAMS ((bfd *, flagword)); | |
| 71 static bfd_boolean frv_elf_copy_private_bfd_data | |
| 72 PARAMS ((bfd *, bfd *)); | |
| 73 static bfd_boolean frv_elf_merge_private_bfd_data | |
| 74 PARAMS ((bfd *, bfd *)); | |
| 75 static bfd_boolean frv_elf_print_private_bfd_data | |
| 76 PARAMS ((bfd *, PTR)); | |
| 77 static bfd_boolean elf32_frv_grok_prstatus (bfd * abfd, | |
| 78 » » » » » Elf_Internal_Note * note); | |
| 79 static bfd_boolean elf32_frv_grok_psinfo (bfd * abfd, | |
| 80 » » » » » Elf_Internal_Note * note); | |
| 81 | 32 |
| 82 static reloc_howto_type elf32_frv_howto_table [] = | 33 static reloc_howto_type elf32_frv_howto_table [] = |
| 83 { | 34 { |
| 84 /* This reloc does nothing. */ | 35 /* This reloc does nothing. */ |
| 85 HOWTO (R_FRV_NONE, /* type */ | 36 HOWTO (R_FRV_NONE, /* type */ |
| 86 0, /* rightshift */ | 37 0, /* rightshift */ |
| 87 2, /* size (0 = byte, 1 = short, 2 = long) */ | 38 2, /* size (0 = byte, 1 = short, 2 = long) */ |
| 88 32, /* bitsize */ | 39 32, /* bitsize */ |
| 89 FALSE, /* pc_relative */ | 40 FALSE, /* pc_relative */ |
| 90 0, /* bitpos */ | 41 0, /* bitpos */ |
| (...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2166 bfd_put_32 (output_bfd, 0x9008f148, plt_code); | 2117 bfd_put_32 (output_bfd, 0x9008f148, plt_code); |
| 2167 plt_code += 4; | 2118 plt_code += 4; |
| 2168 } | 2119 } |
| 2169 /* jmpl @(gr8,gr0) */ | 2120 /* jmpl @(gr8,gr0) */ |
| 2170 bfd_put_32 (output_bfd, 0x80308000, plt_code); | 2121 bfd_put_32 (output_bfd, 0x80308000, plt_code); |
| 2171 } | 2122 } |
| 2172 } | 2123 } |
| 2173 | 2124 |
| 2174 return TRUE; | 2125 return TRUE; |
| 2175 } | 2126 } |
error: old chunk mismatch |
None
| OLD | NEW |