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

Side by Side Diff: bfd/coff-apollo.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/coff-alpha.c ('k') | bfd/coff-arm.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 Apollo 68000 COFF binaries. 1 /* BFD back-end for Apollo 68000 COFF binaries.
2 Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2 Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001, 2002, 2003,
3 2005, 2007, 2008 Free Software Foundation, Inc. 3 2005, 2007, 2008, 2012 Free Software Foundation, Inc.
4 By Troy Rollo (troy@cbme.unsw.edu.au) 4 By Troy Rollo (troy@cbme.unsw.edu.au)
5 Based on m68k standard COFF version Written by Cygnus Support. 5 Based on m68k standard COFF version Written by Cygnus Support.
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 }; 45 };
46 #endif /* not ONLY_DECLARE_RELOCS */ 46 #endif /* not ONLY_DECLARE_RELOCS */
47 47
48 #ifndef BADMAG 48 #ifndef BADMAG
49 #define BADMAG(x) M68KBADMAG(x) 49 #define BADMAG(x) M68KBADMAG(x)
50 #endif 50 #endif
51 #define APOLLO_M68 1 /* Customize coffcode.h */ 51 #define APOLLO_M68 1 /* Customize coffcode.h */
52 52
53 /* Turn a howto into a reloc number. */ 53 /* Turn a howto into a reloc number. */
54 54
55 extern void apollo_rtype2howto PARAMS ((arelent *, int)); 55 extern void apollo_rtype2howto (arelent *, int);
56 extern int apollo_howto2rtype PARAMS ((reloc_howto_type *)); 56 extern int apollo_howto2rtype (reloc_howto_type *);
57 #ifndef ONLY_DECLARE_RELOCS 57 #ifndef ONLY_DECLARE_RELOCS
58 58
59 void 59 void
60 apollo_rtype2howto (internal, relocentry) 60 apollo_rtype2howto (arelent *internal, int relocentry)
61 arelent *internal;
62 int relocentry;
63 { 61 {
64 switch (relocentry) 62 switch (relocentry)
65 { 63 {
66 case R_RELBYTE: internal->howto = apollocoff_howto_table + 0; break; 64 case R_RELBYTE: internal->howto = apollocoff_howto_table + 0; break;
67 case R_RELWORD: internal->howto = apollocoff_howto_table + 1; break; 65 case R_RELWORD: internal->howto = apollocoff_howto_table + 1; break;
68 case R_RELLONG: internal->howto = apollocoff_howto_table + 2; break; 66 case R_RELLONG: internal->howto = apollocoff_howto_table + 2; break;
69 case R_PCRBYTE: internal->howto = apollocoff_howto_table + 3; break; 67 case R_PCRBYTE: internal->howto = apollocoff_howto_table + 3; break;
70 case R_PCRWORD: internal->howto = apollocoff_howto_table + 4; break; 68 case R_PCRWORD: internal->howto = apollocoff_howto_table + 4; break;
71 case R_PCRLONG: internal->howto = apollocoff_howto_table + 5; break; 69 case R_PCRLONG: internal->howto = apollocoff_howto_table + 5; break;
72 case R_RELLONG_NEG: internal->howto = apollocoff_howto_table + 6; break; 70 case R_RELLONG_NEG: internal->howto = apollocoff_howto_table + 6; break;
73 } 71 }
74 } 72 }
75 73
76 int 74 int
77 apollo_howto2rtype (internal) 75 apollo_howto2rtype (reloc_howto_type *internal)
78 reloc_howto_type *internal;
79 { 76 {
80 if (internal->pc_relative) 77 if (internal->pc_relative)
81 { 78 {
82 switch (internal->bitsize) 79 switch (internal->bitsize)
83 { 80 {
84 case 32: return R_PCRLONG; 81 case 32: return R_PCRLONG;
85 case 16: return R_PCRWORD; 82 case 16: return R_PCRWORD;
86 case 8: return R_PCRBYTE; 83 case 8: return R_PCRBYTE;
87 } 84 }
88 } 85 }
(...skipping 26 matching lines...) Expand all
115 112
116 #ifndef TARGET_NAME 113 #ifndef TARGET_NAME
117 #define TARGET_NAME "apollo-m68k" 114 #define TARGET_NAME "apollo-m68k"
118 #endif 115 #endif
119 116
120 #ifdef NAMES_HAVE_UNDERSCORE 117 #ifdef NAMES_HAVE_UNDERSCORE
121 CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, '_', NULL, COFF_SWAP_ TABLE) 118 CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, '_', NULL, COFF_SWAP_ TABLE)
122 #else 119 #else
123 CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, 0, NULL, COFF_SWAP_TA BLE) 120 CREATE_BIG_COFF_TARGET_VEC (TARGET_SYM, TARGET_NAME, 0, 0, 0, NULL, COFF_SWAP_TA BLE)
124 #endif 121 #endif
OLDNEW
« no previous file with comments | « bfd/coff-alpha.c ('k') | bfd/coff-arm.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698