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

Side by Side Diff: bfd/aout-tic30.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/aout-sparcle.c ('k') | bfd/aout0.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* BFD back-end for TMS320C30 a.out binaries. 1 /* BFD back-end for TMS320C30 a.out binaries.
2 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2 Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009,
3 2010, 2011 3 2010, 2011, 2012
4 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au) 5 Contributed by Steven Haworth (steve@pm.cse.rmit.edu.au)
6 6
7 This file is part of BFD, the Binary File Descriptor library. 7 This file is part of BFD, the Binary File Descriptor library.
8 8
9 This program is free software; you can redistribute it and/or modify 9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by 10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or 11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version. 12 (at your option) any later version.
13 13
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 arelent *reloc_entry, 182 arelent *reloc_entry,
183 asymbol *symbol, 183 asymbol *symbol,
184 void * data, 184 void * data,
185 asection *input_section ATTRIBUTE_UNUSED, 185 asection *input_section ATTRIBUTE_UNUSED,
186 bfd *output_bfd, 186 bfd *output_bfd,
187 char **error_message ATTRIBUTE_UNUSED) 187 char **error_message ATTRIBUTE_UNUSED)
188 { 188 {
189 bfd_vma relocation; 189 bfd_vma relocation;
190 190
191 /* Make sure that the symbol's section is defined. */ 191 /* Make sure that the symbol's section is defined. */
192 if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0) 192 if (bfd_is_und_section (symbol->section) && (symbol->flags & BSF_WEAK) == 0)
193 return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined; 193 return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined;
194 /* Get the size of the input section and turn it into the TMS320C30 194 /* Get the size of the input section and turn it into the TMS320C30
195 32-bit address format. */ 195 32-bit address format. */
196 relocation = (symbol->section->vma >> 2); 196 relocation = (symbol->section->vma >> 2);
197 relocation += bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address); 197 relocation += bfd_get_16 (abfd, (bfd_byte *) data + reloc_entry->address);
198 bfd_put_16 (abfd, relocation, (bfd_byte *) data + reloc_entry->address); 198 bfd_put_16 (abfd, relocation, (bfd_byte *) data + reloc_entry->address);
199 return bfd_reloc_ok; 199 return bfd_reloc_ok;
200 } 200 }
201 201
202 /* This function does the same thing as tic30_aout_fix_16 except for 32 202 /* This function does the same thing as tic30_aout_fix_16 except for 32
203 bit relocations. */ 203 bit relocations. */
204 204
205 static bfd_reloc_status_type 205 static bfd_reloc_status_type
206 tic30_aout_fix_32 (bfd *abfd, 206 tic30_aout_fix_32 (bfd *abfd,
207 arelent *reloc_entry, 207 arelent *reloc_entry,
208 asymbol *symbol, 208 asymbol *symbol,
209 void * data, 209 void * data,
210 asection *input_section ATTRIBUTE_UNUSED, 210 asection *input_section ATTRIBUTE_UNUSED,
211 bfd *output_bfd, 211 bfd *output_bfd,
212 char **error_message ATTRIBUTE_UNUSED) 212 char **error_message ATTRIBUTE_UNUSED)
213 { 213 {
214 bfd_vma relocation; 214 bfd_vma relocation;
215 215
216 /* Make sure that the symbol's section is defined. */ 216 /* Make sure that the symbol's section is defined. */
217 if (symbol->section == &bfd_und_section && (symbol->flags & BSF_WEAK) == 0) 217 if (bfd_is_und_section (symbol->section) && (symbol->flags & BSF_WEAK) == 0)
218 return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined; 218 return output_bfd ? bfd_reloc_ok : bfd_reloc_undefined;
219 /* Get the size of the input section and turn it into the TMS320C30 219 /* Get the size of the input section and turn it into the TMS320C30
220 32-bit address format. */ 220 32-bit address format. */
221 relocation = (symbol->section->vma >> 2); 221 relocation = (symbol->section->vma >> 2);
222 relocation += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address); 222 relocation += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
223 bfd_put_32 (abfd, relocation, (bfd_byte *) data + reloc_entry->address); 223 bfd_put_32 (abfd, relocation, (bfd_byte *) data + reloc_entry->address);
224 return bfd_reloc_ok; 224 return bfd_reloc_ok;
225 } 225 }
226 226
227 /* This table lists the relocation types for the TMS320C30. There are 227 /* This table lists the relocation types for the TMS320C30. There are
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 BFD_JUMP_TABLE_RELOCS (MY), 1105 BFD_JUMP_TABLE_RELOCS (MY),
1106 BFD_JUMP_TABLE_WRITE (MY), 1106 BFD_JUMP_TABLE_WRITE (MY),
1107 BFD_JUMP_TABLE_LINK (MY), 1107 BFD_JUMP_TABLE_LINK (MY),
1108 BFD_JUMP_TABLE_DYNAMIC (MY), 1108 BFD_JUMP_TABLE_DYNAMIC (MY),
1109 1109
1110 NULL, 1110 NULL,
1111 1111
1112 MY_backend_data 1112 MY_backend_data
1113 }; 1113 };
1114 #endif /* MY_BFD_TARGET */ 1114 #endif /* MY_BFD_TARGET */
OLDNEW
« no previous file with comments | « bfd/aout-sparcle.c ('k') | bfd/aout0.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698