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

Side by Side Diff: bfd/elf32-spu.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/elf32-sh.c ('k') | bfd/elf32-tic6x.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 /* SPU specific support for 32-bit ELF 1 /* SPU specific support for 32-bit ELF
2 2
3 Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 3 Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
4 Free Software Foundation, Inc.
4 5
5 This file is part of BFD, the Binary File Descriptor library. 6 This file is part of BFD, the Binary File Descriptor library.
6 7
7 This program is free software; you can redistribute it and/or modify 8 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 9 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 10 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version. 11 (at your option) any later version.
11 12
12 This program is distributed in the hope that it will be useful, 13 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 len = 8 + sizeof (".ovl_call.") - 1; 1419 len = 8 + sizeof (".ovl_call.") - 1;
1419 if (h != NULL) 1420 if (h != NULL)
1420 len += strlen (h->root.root.string); 1421 len += strlen (h->root.root.string);
1421 else 1422 else
1422 len += 8 + 1 + 8; 1423 len += 8 + 1 + 8;
1423 add = 0; 1424 add = 0;
1424 if (irela != NULL) 1425 if (irela != NULL)
1425 add = (int) irela->r_addend & 0xffffffff; 1426 add = (int) irela->r_addend & 0xffffffff;
1426 if (add != 0) 1427 if (add != 0)
1427 len += 1 + 8; 1428 len += 1 + 8;
1428 name = bfd_malloc (len); 1429 name = bfd_malloc (len + 1);
1429 if (name == NULL) 1430 if (name == NULL)
1430 return FALSE; 1431 return FALSE;
1431 1432
1432 sprintf (name, "%08x.ovl_call.", g->ovl); 1433 sprintf (name, "%08x.ovl_call.", g->ovl);
1433 if (h != NULL) 1434 if (h != NULL)
1434 strcpy (name + 8 + sizeof (".ovl_call.") - 1, h->root.root.string); 1435 strcpy (name + 8 + sizeof (".ovl_call.") - 1, h->root.root.string);
1435 else 1436 else
1436 sprintf (name + 8 + sizeof (".ovl_call.") - 1, "%x:%x", 1437 sprintf (name + 8 + sizeof (".ovl_call.") - 1, "%x:%x",
1437 dest_sec->id & 0xffffffff, 1438 dest_sec->id & 0xffffffff,
1438 (int) ELF32_R_SYM (irela->r_info) & 0xffffffff); 1439 (int) ELF32_R_SYM (irela->r_info) & 0xffffffff);
(...skipping 3449 matching lines...) Expand 10 before | Expand all | Expand 10 after
4888 if (!info->callbacks->undefined_symbol (info, 4889 if (!info->callbacks->undefined_symbol (info,
4889 h->root.root.string, 4890 h->root.root.string,
4890 input_bfd, 4891 input_bfd,
4891 input_section, 4892 input_section,
4892 rel->r_offset, err)) 4893 rel->r_offset, err))
4893 return FALSE; 4894 return FALSE;
4894 } 4895 }
4895 sym_name = h->root.root.string; 4896 sym_name = h->root.root.string;
4896 } 4897 }
4897 4898
4898 if (sec != NULL && elf_discarded_section (sec)) 4899 if (sec != NULL && discarded_section (sec))
4899 RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section, 4900 RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
4900 » » » » » rel, relend, howto, contents); 4901 » » » » » rel, 1, relend, howto, 0, contents);
4901 4902
4902 if (info->relocatable) 4903 if (info->relocatable)
4903 continue; 4904 continue;
4904 4905
4905 /* Change "a rt,ra,rb" to "ai rt,ra,0". */ 4906 /* Change "a rt,ra,rb" to "ai rt,ra,0". */
4906 if (r_type == R_SPU_ADD_PIC 4907 if (r_type == R_SPU_ADD_PIC
4907 && h != NULL 4908 && h != NULL
4908 && !(h->def_regular || ELF_COMMON_DEF_P (h))) 4909 && !(h->def_regular || ELF_COMMON_DEF_P (h)))
4909 { 4910 {
4910 bfd_byte *loc = contents + rel->r_offset; 4911 bfd_byte *loc = contents + rel->r_offset;
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
5472 5473
5473 #define elf_backend_additional_program_headers spu_elf_additional_program_heade rs 5474 #define elf_backend_additional_program_headers spu_elf_additional_program_heade rs
5474 #define elf_backend_modify_segment_map spu_elf_modify_segment_map 5475 #define elf_backend_modify_segment_map spu_elf_modify_segment_map
5475 #define elf_backend_modify_program_headers spu_elf_modify_program_headers 5476 #define elf_backend_modify_program_headers spu_elf_modify_program_headers
5476 #define elf_backend_post_process_headers spu_elf_post_process_headers 5477 #define elf_backend_post_process_headers spu_elf_post_process_headers
5477 #define elf_backend_fake_sections spu_elf_fake_sections 5478 #define elf_backend_fake_sections spu_elf_fake_sections
5478 #define elf_backend_special_sections spu_elf_special_sections 5479 #define elf_backend_special_sections spu_elf_special_sections
5479 #define bfd_elf32_bfd_final_link spu_elf_final_link 5480 #define bfd_elf32_bfd_final_link spu_elf_final_link
5480 5481
5481 #include "elf32-target.h" 5482 #include "elf32-target.h"
OLDNEW
« no previous file with comments | « bfd/elf32-sh.c ('k') | bfd/elf32-tic6x.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698