Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: bfd/elf64-ppc.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bfd/elf64-ppc.h ('k') | bfd/elf64-s390.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
None
OLDNEW
1 /* PowerPC64-specific support for 64-bit ELF. 1 /* PowerPC64-specific support for 64-bit ELF.
2 Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2 Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
3 2009, 2010, 2011 Free Software Foundation, Inc. 3 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
4 Written by Linus Nordberg, Swox AB <info@swox.com>, 4 Written by Linus Nordberg, Swox AB <info@swox.com>,
5 based on elf32-ppc.c by Ian Lance Taylor. 5 based on elf32-ppc.c by Ian Lance Taylor.
6 Largely rewritten by Alan Modra. 6 Largely rewritten by Alan Modra.
7 7
8 This file is part of BFD, the Binary File Descriptor library. 8 This file is part of BFD, the Binary File Descriptor library.
9 9
10 This program is free software; you can redistribute it and/or modify 10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by 11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or 12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version. 13 (at your option) any later version.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); 48 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
49 static bfd_reloc_status_type ppc64_elf_toc_reloc 49 static bfd_reloc_status_type ppc64_elf_toc_reloc
50 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); 50 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
51 static bfd_reloc_status_type ppc64_elf_toc_ha_reloc 51 static bfd_reloc_status_type ppc64_elf_toc_ha_reloc
52 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); 52 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
53 static bfd_reloc_status_type ppc64_elf_toc64_reloc 53 static bfd_reloc_status_type ppc64_elf_toc64_reloc
54 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); 54 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
55 static bfd_reloc_status_type ppc64_elf_unhandled_reloc 55 static bfd_reloc_status_type ppc64_elf_unhandled_reloc
56 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); 56 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
57 static bfd_vma opd_entry_value 57 static bfd_vma opd_entry_value
58 (asection *, bfd_vma, asection **, bfd_vma *); 58 (asection *, bfd_vma, asection **, bfd_vma *, bfd_boolean);
59 59
60 #define TARGET_LITTLE_SYM bfd_elf64_powerpcle_vec 60 #define TARGET_LITTLE_SYM bfd_elf64_powerpcle_vec
61 #define TARGET_LITTLE_NAME "elf64-powerpcle" 61 #define TARGET_LITTLE_NAME "elf64-powerpcle"
62 #define TARGET_BIG_SYM bfd_elf64_powerpc_vec 62 #define TARGET_BIG_SYM bfd_elf64_powerpc_vec
63 #define TARGET_BIG_NAME "elf64-powerpc" 63 #define TARGET_BIG_NAME "elf64-powerpc"
64 #define ELF_ARCH bfd_arch_powerpc 64 #define ELF_ARCH bfd_arch_powerpc
65 #define ELF_TARGET_ID PPC64_ELF_DATA 65 #define ELF_TARGET_ID PPC64_ELF_DATA
66 #define ELF_MACHINE_CODE EM_PPC64 66 #define ELF_MACHINE_CODE EM_PPC64
67 #define ELF_MAXPAGESIZE 0x10000 67 #define ELF_MAXPAGESIZE 0x10000
68 #define ELF_COMMONPAGESIZE 0x1000 68 #define ELF_COMMONPAGESIZE 0x1000
(...skipping 29 matching lines...) Expand all
98 #define elf_backend_check_directives ppc64_elf_process_dot_syms 98 #define elf_backend_check_directives ppc64_elf_process_dot_syms
99 #define elf_backend_as_needed_cleanup ppc64_elf_as_needed_cleanup 99 #define elf_backend_as_needed_cleanup ppc64_elf_as_needed_cleanup
100 #define elf_backend_archive_symbol_lookup ppc64_elf_archive_symbol_lookup 100 #define elf_backend_archive_symbol_lookup ppc64_elf_archive_symbol_lookup
101 #define elf_backend_check_relocs ppc64_elf_check_relocs 101 #define elf_backend_check_relocs ppc64_elf_check_relocs
102 #define elf_backend_gc_keep ppc64_elf_gc_keep 102 #define elf_backend_gc_keep ppc64_elf_gc_keep
103 #define elf_backend_gc_mark_dynamic_ref ppc64_elf_gc_mark_dynamic_ref 103 #define elf_backend_gc_mark_dynamic_ref ppc64_elf_gc_mark_dynamic_ref
104 #define elf_backend_gc_mark_hook ppc64_elf_gc_mark_hook 104 #define elf_backend_gc_mark_hook ppc64_elf_gc_mark_hook
105 #define elf_backend_gc_sweep_hook ppc64_elf_gc_sweep_hook 105 #define elf_backend_gc_sweep_hook ppc64_elf_gc_sweep_hook
106 #define elf_backend_adjust_dynamic_symbol ppc64_elf_adjust_dynamic_symbol 106 #define elf_backend_adjust_dynamic_symbol ppc64_elf_adjust_dynamic_symbol
107 #define elf_backend_hide_symbol ppc64_elf_hide_symbol 107 #define elf_backend_hide_symbol ppc64_elf_hide_symbol
108 #define elf_backend_maybe_function_sym ppc64_elf_maybe_function_sym
108 #define elf_backend_always_size_sections ppc64_elf_func_desc_adjust 109 #define elf_backend_always_size_sections ppc64_elf_func_desc_adjust
109 #define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections 110 #define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections
110 #define elf_backend_init_index_section _bfd_elf_init_2_index_sections 111 #define elf_backend_init_index_section _bfd_elf_init_2_index_sections
111 #define elf_backend_action_discarded ppc64_elf_action_discarded 112 #define elf_backend_action_discarded ppc64_elf_action_discarded
112 #define elf_backend_relocate_section ppc64_elf_relocate_section 113 #define elf_backend_relocate_section ppc64_elf_relocate_section
113 #define elf_backend_finish_dynamic_symbol ppc64_elf_finish_dynamic_symbol 114 #define elf_backend_finish_dynamic_symbol ppc64_elf_finish_dynamic_symbol
114 #define elf_backend_reloc_type_class ppc64_elf_reloc_type_class 115 #define elf_backend_reloc_type_class ppc64_elf_reloc_type_class
115 #define elf_backend_finish_dynamic_sections ppc64_elf_finish_dynamic_sections 116 #define elf_backend_finish_dynamic_sections ppc64_elf_finish_dynamic_sections
116 #define elf_backend_link_output_symbol_hook ppc64_elf_output_symbol_hook 117 #define elf_backend_link_output_symbol_hook ppc64_elf_output_symbol_hook
117 #define elf_backend_special_sections ppc64_elf_special_sections 118 #define elf_backend_special_sections ppc64_elf_special_sections
(...skipping 27 matching lines...) Expand all
145 #define LD_R2_0R12 0xe84c0000 /* ld %r2,xxx+8@l(%r12) */ 146 #define LD_R2_0R12 0xe84c0000 /* ld %r2,xxx+8@l(%r12) */
146 /* ld %r11,xxx+16@l(%r12) */ 147 /* ld %r11,xxx+16@l(%r12) */
147 #define BCTR 0x4e800420 /* bctr */ 148 #define BCTR 0x4e800420 /* bctr */
148 149
149 150
150 #define ADDIS_R12_R12 0x3d8c0000 /* addis %r12,%r12,off@ha */ 151 #define ADDIS_R12_R12 0x3d8c0000 /* addis %r12,%r12,off@ha */
151 #define ADDI_R12_R12 0x398c0000 /* addi %r12,%r12,off@l */ 152 #define ADDI_R12_R12 0x398c0000 /* addi %r12,%r12,off@l */
152 #define ADDIS_R2_R2 0x3c420000 /* addis %r2,%r2,off@ha */ 153 #define ADDIS_R2_R2 0x3c420000 /* addis %r2,%r2,off@ha */
153 #define ADDI_R2_R2 0x38420000 /* addi %r2,%r2,off@l */ 154 #define ADDI_R2_R2 0x38420000 /* addi %r2,%r2,off@l */
154 155
156 #define XOR_R11_R11_R11 0x7d6b5a78 /* xor %r11,%r11,%r11 */
157 #define ADD_R12_R12_R11 0x7d8c5a14 /* add %r12,%r12,%r11 */
158 #define ADD_R2_R2_R11 0x7c425a14 /* add %r2,%r2,%r11 */
159 #define CMPLDI_R2_0 0x28220000 /* cmpldi %r2,0 */
160 #define BNECTR 0x4ca20420 /* bnectr+ */
161 #define BNECTR_P4 0x4ce20420 /* bnectr+ */
162
155 #define LD_R11_0R2 0xe9620000 /* ld %r11,xxx+0(%r2) */ 163 #define LD_R11_0R2 0xe9620000 /* ld %r11,xxx+0(%r2) */
156 #define LD_R2_0R2 0xe8420000 /* ld %r2,xxx+0(%r2) */ 164 #define LD_R2_0R2 0xe8420000 /* ld %r2,xxx+0(%r2) */
157 165
158 #define LD_R2_40R1 0xe8410028 /* ld %r2,40(%r1) */ 166 #define LD_R2_40R1 0xe8410028 /* ld %r2,40(%r1) */
159 167
160 /* glink call stub instructions. We enter with the index in R0. */ 168 /* glink call stub instructions. We enter with the index in R0. */
161 #define GLINK_CALL_STUB_SIZE (16*4) 169 #define GLINK_CALL_STUB_SIZE (16*4)
162 /* 0: */ 170 /* 0: */
163 /* .quad plt0-1f */ 171 /* .quad plt0-1f */
164 /* __glink: */ 172 /* __glink: */
(...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2329 2337
2330 static bfd_reloc_status_type 2338 static bfd_reloc_status_type
2331 ppc64_elf_branch_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, 2339 ppc64_elf_branch_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
2332 void *data, asection *input_section, 2340 void *data, asection *input_section,
2333 bfd *output_bfd, char **error_message) 2341 bfd *output_bfd, char **error_message)
2334 { 2342 {
2335 if (output_bfd != NULL) 2343 if (output_bfd != NULL)
2336 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data, 2344 return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
2337 input_section, output_bfd, error_message); 2345 input_section, output_bfd, error_message);
2338 2346

error: old chunk mismatch

OLDNEW
« no previous file with comments | « bfd/elf64-ppc.h ('k') | bfd/elf64-s390.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698