/[gcl]/gcl/binutils/bfd/coff-tic80.c
ViewVC logotype

Diff of /gcl/binutils/bfd/coff-tic80.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by camm, Fri Aug 9 05:34:55 2002 UTC revision 1.1.1.1.20.1 by camm, Fri Sep 30 02:08:55 2005 UTC
# Line 1  Line 1 
1  /* BFD back-end for Texas Instruments TMS320C80 Multimedia Video Processor (MVP).  /* BFD back-end for Texas Instruments TMS320C80 Multimedia Video Processor (MVP).
2     Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.     Copyright 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005
3       Free Software Foundation, Inc.
4    
5     Written by Fred Fish (fnf@cygnus.com)     Written by Fred Fish (fnf@cygnus.com)
6    
# Line 48  static bfd_reloc_status_type glob16_relo Line 49  static bfd_reloc_status_type glob16_relo
49    PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));    PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
50  static bfd_reloc_status_type local16_reloc  static bfd_reloc_status_type local16_reloc
51    PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));    PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
52  static boolean coff_tic80_relocate_section  static bfd_boolean coff_tic80_relocate_section
53    PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,    PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
54             struct internal_reloc *, struct internal_syment *, asection **));             struct internal_reloc *, struct internal_syment *, asection **));
55  static reloc_howto_type * coff_tic80_rtype_to_howto  static reloc_howto_type * coff_tic80_rtype_to_howto
# Line 63  static reloc_howto_type tic80_howto_tabl Line 64  static reloc_howto_type tic80_howto_tabl
64           0,                             /* rightshift */           0,                             /* rightshift */
65           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
66           32,                            /* bitsize */           32,                            /* bitsize */
67           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
68           0,                             /* bitpos */           0,                             /* bitpos */
69           complain_overflow_bitfield,    /* complain_on_overflow */           complain_overflow_bitfield,    /* complain_on_overflow */
70           NULL,                          /* special_function */           NULL,                          /* special_function */
71           "RELLONG",                     /* name */           "RELLONG",                     /* name */
72           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
73           0xffffffff,                    /* src_mask */           0xffffffff,                    /* src_mask */
74           0xffffffff,                    /* dst_mask */           0xffffffff,                    /* dst_mask */
75           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
76    
77    HOWTO (R_MPPCR,                       /* type */    HOWTO (R_MPPCR,                       /* type */
78           2,                             /* rightshift */           2,                             /* rightshift */
79           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
80           32,                            /* bitsize */           32,                            /* bitsize */
81           true,                          /* pc_relative */           TRUE,                          /* pc_relative */
82           0,                             /* bitpos */           0,                             /* bitpos */
83           complain_overflow_signed,      /* complain_on_overflow */           complain_overflow_signed,      /* complain_on_overflow */
84           NULL,                          /* special_function */           NULL,                          /* special_function */
85           "MPPCR",                       /* name */           "MPPCR",                       /* name */
86           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
87           0xffffffff,                    /* src_mask */           0xffffffff,                    /* src_mask */
88           0xffffffff,                    /* dst_mask */           0xffffffff,                    /* dst_mask */
89           true),                         /* pcrel_offset */           TRUE),                         /* pcrel_offset */
90    
91    HOWTO (R_ABS,                         /* type */    HOWTO (R_ABS,                         /* type */
92           0,                             /* rightshift */           0,                             /* rightshift */
93           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
94           32,                            /* bitsize */           32,                            /* bitsize */
95           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
96           0,                             /* bitpos */           0,                             /* bitpos */
97           complain_overflow_bitfield,    /* complain_on_overflow */           complain_overflow_bitfield,    /* complain_on_overflow */
98           NULL,                          /* special_function */           NULL,                          /* special_function */
99           "ABS",                         /* name */           "ABS",                         /* name */
100           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
101           0xffffffff,                    /* src_mask */           0xffffffff,                    /* src_mask */
102           0xffffffff,                    /* dst_mask */           0xffffffff,                    /* dst_mask */
103           false),                                /* pcrel_offset */           FALSE),                                /* pcrel_offset */
104    
105    HOWTO (R_PPBASE,                      /* type */    HOWTO (R_PPBASE,                      /* type */
106           0,                             /* rightshift */           0,                             /* rightshift */
107           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
108           32,                            /* bitsize */           32,                            /* bitsize */
109           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
110           0,                             /* bitpos */           0,                             /* bitpos */
111           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
112           ppbase_reloc,                  /* special_function */           ppbase_reloc,                  /* special_function */
113           "PPBASE",                      /* name */           "PPBASE",                      /* name */
114           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
115           0xffffffff,                    /* src_mask */           0xffffffff,                    /* src_mask */
116           0xffffffff,                    /* dst_mask */           0xffffffff,                    /* dst_mask */
117           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
118    
119    HOWTO (R_PPLBASE,                     /* type */    HOWTO (R_PPLBASE,                     /* type */
120           0,                             /* rightshift */           0,                             /* rightshift */
121           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
122           32,                            /* bitsize */           32,                            /* bitsize */
123           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
124           0,                             /* bitpos */           0,                             /* bitpos */
125           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
126           ppbase_reloc,                  /* special_function */           ppbase_reloc,                  /* special_function */
127           "PPLBASE",                     /* name */           "PPLBASE",                     /* name */
128           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
129           0xffffffff,                    /* src_mask */           0xffffffff,                    /* src_mask */
130           0xffffffff,                    /* dst_mask */           0xffffffff,                    /* dst_mask */
131           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
132    
133    HOWTO (R_PP15,                        /* type */    HOWTO (R_PP15,                        /* type */
134           0,                             /* rightshift */           0,                             /* rightshift */
135           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
136           15,                            /* bitsize */           15,                            /* bitsize */
137           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
138           6,                             /* bitpos */           6,                             /* bitpos */
139           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
140           glob15_reloc,                  /* special_function */           glob15_reloc,                  /* special_function */
141           "PP15",                        /* name */           "PP15",                        /* name */
142           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
143           0x1ffc0,                       /* src_mask */           0x1ffc0,                       /* src_mask */
144           0x1ffc0,                       /* dst_mask */           0x1ffc0,                       /* dst_mask */
145           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
146    
147    HOWTO (R_PP15W,                       /* type */    HOWTO (R_PP15W,                       /* type */
148           2,                             /* rightshift */           2,                             /* rightshift */
149           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
150           15,                            /* bitsize */           15,                            /* bitsize */
151           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
152           6,                             /* bitpos */           6,                             /* bitpos */
153           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
154           glob15_reloc,                  /* special_function */           glob15_reloc,                  /* special_function */
155           "PP15W",                       /* name */           "PP15W",                       /* name */
156           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
157           0x1ffc0,                       /* src_mask */           0x1ffc0,                       /* src_mask */
158           0x1ffc0,                       /* dst_mask */           0x1ffc0,                       /* dst_mask */
159           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
160    
161    HOWTO (R_PP15H,                       /* type */    HOWTO (R_PP15H,                       /* type */
162           1,                             /* rightshift */           1,                             /* rightshift */
163           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
164           15,                            /* bitsize */           15,                            /* bitsize */
165           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
166           6,                             /* bitpos */           6,                             /* bitpos */
167           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
168           glob15_reloc,                  /* special_function */           glob15_reloc,                  /* special_function */
169           "PP15H",                       /* name */           "PP15H",                       /* name */
170           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
171           0x1ffc0,                       /* src_mask */           0x1ffc0,                       /* src_mask */
172           0x1ffc0,                       /* dst_mask */           0x1ffc0,                       /* dst_mask */
173           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
174    
175    HOWTO (R_PP16B,                       /* type */    HOWTO (R_PP16B,                       /* type */
176           0,                             /* rightshift */           0,                             /* rightshift */
177           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
178           16,                            /* bitsize */           16,                            /* bitsize */
179           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
180           6,                             /* bitpos */           6,                             /* bitpos */
181           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
182           glob16_reloc,                  /* special_function */           glob16_reloc,                  /* special_function */
183           "PP16B",                       /* name */           "PP16B",                       /* name */
184           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
185           0x3ffc0,                       /* src_mask */           0x3ffc0,                       /* src_mask */
186           0x3ffc0,                       /* dst_mask */           0x3ffc0,                       /* dst_mask */
187           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
188    
189    HOWTO (R_PPL15,                       /* type */    HOWTO (R_PPL15,                       /* type */
190           0,                             /* rightshift */           0,                             /* rightshift */
191           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
192           15,                            /* bitsize */           15,                            /* bitsize */
193           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
194           0,                             /* bitpos */           0,                             /* bitpos */
195           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
196           NULL,                          /* special_function */           NULL,                          /* special_function */
197           "PPL15",                       /* name */           "PPL15",                       /* name */
198           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
199           0x7fff,                        /* src_mask */           0x7fff,                        /* src_mask */
200           0x7fff,                        /* dst_mask */           0x7fff,                        /* dst_mask */
201           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
202    
203    HOWTO (R_PPL15W,                      /* type */    HOWTO (R_PPL15W,                      /* type */
204           2,                             /* rightshift */           2,                             /* rightshift */
205           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
206           15,                            /* bitsize */           15,                            /* bitsize */
207           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
208           0,                             /* bitpos */           0,                             /* bitpos */
209           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
210           NULL,                          /* special_function */           NULL,                          /* special_function */
211           "PPL15W",                      /* name */           "PPL15W",                      /* name */
212           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
213           0x7fff,                        /* src_mask */           0x7fff,                        /* src_mask */
214           0x7fff,                        /* dst_mask */           0x7fff,                        /* dst_mask */
215           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
216    
217    HOWTO (R_PPL15H,                      /* type */    HOWTO (R_PPL15H,                      /* type */
218           1,                             /* rightshift */           1,                             /* rightshift */
219           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
220           15,                            /* bitsize */           15,                            /* bitsize */
221           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
222           0,                             /* bitpos */           0,                             /* bitpos */
223           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
224           NULL,                          /* special_function */           NULL,                          /* special_function */
225           "PPL15H",                      /* name */           "PPL15H",                      /* name */
226           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
227           0x7fff,                        /* src_mask */           0x7fff,                        /* src_mask */
228           0x7fff,                        /* dst_mask */           0x7fff,                        /* dst_mask */
229           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
230    
231    HOWTO (R_PPL16B,                      /* type */    HOWTO (R_PPL16B,                      /* type */
232           0,                             /* rightshift */           0,                             /* rightshift */
233           2,                             /* size (0 = byte, 1 = short, 2 = long) */           2,                             /* size (0 = byte, 1 = short, 2 = long) */
234           16,                            /* bitsize */           16,                            /* bitsize */
235           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
236           0,                             /* bitpos */           0,                             /* bitpos */
237           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
238           local16_reloc,                 /* special_function */           local16_reloc,                 /* special_function */
239           "PPL16B",                      /* name */           "PPL16B",                      /* name */
240           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
241           0xffff,                        /* src_mask */           0xffff,                        /* src_mask */
242           0xffff,                        /* dst_mask */           0xffff,                        /* dst_mask */
243           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
244    
245    HOWTO (R_PPN15,                       /* type */    HOWTO (R_PPN15,                       /* type */
246           0,                             /* rightshift */           0,                             /* rightshift */
247           -2,                            /* size (0 = byte, 1 = short, 2 = long) */           -2,                            /* size (0 = byte, 1 = short, 2 = long) */
248           15,                            /* bitsize */           15,                            /* bitsize */
249           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
250           6,                             /* bitpos */           6,                             /* bitpos */
251           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
252           glob15_reloc,                  /* special_function */           glob15_reloc,                  /* special_function */
253           "PPN15",                       /* name */           "PPN15",                       /* name */
254           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
255           0x1ffc0,                       /* src_mask */           0x1ffc0,                       /* src_mask */
256           0x1ffc0,                       /* dst_mask */           0x1ffc0,                       /* dst_mask */
257           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
258    
259    HOWTO (R_PPN15W,                      /* type */    HOWTO (R_PPN15W,                      /* type */
260           2,                             /* rightshift */           2,                             /* rightshift */
261           -2,                            /* size (0 = byte, 1 = short, 2 = long) */           -2,                            /* size (0 = byte, 1 = short, 2 = long) */
262           15,                            /* bitsize */           15,                            /* bitsize */
263           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
264           6,                             /* bitpos */           6,                             /* bitpos */
265           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
266           glob15_reloc,                  /* special_function */           glob15_reloc,                  /* special_function */
267           "PPN15W",                      /* name */           "PPN15W",                      /* name */
268           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
269           0x1ffc0,                       /* src_mask */           0x1ffc0,                       /* src_mask */
270           0x1ffc0,                       /* dst_mask */           0x1ffc0,                       /* dst_mask */
271           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
272    
273    HOWTO (R_PPN15H,                      /* type */    HOWTO (R_PPN15H,                      /* type */
274           1,                             /* rightshift */           1,                             /* rightshift */
275           -2,                            /* size (0 = byte, 1 = short, 2 = long) */           -2,                            /* size (0 = byte, 1 = short, 2 = long) */
276           15,                            /* bitsize */           15,                            /* bitsize */
277           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
278           6,                             /* bitpos */           6,                             /* bitpos */
279           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
280           glob15_reloc,                  /* special_function */           glob15_reloc,                  /* special_function */
281           "PPN15H",                      /* name */           "PPN15H",                      /* name */
282           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
283           0x1ffc0,                       /* src_mask */           0x1ffc0,                       /* src_mask */
284           0x1ffc0,                       /* dst_mask */           0x1ffc0,                       /* dst_mask */
285           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
286    
287    HOWTO (R_PPN16B,                      /* type */    HOWTO (R_PPN16B,                      /* type */
288           0,                             /* rightshift */           0,                             /* rightshift */
289           -2,                            /* size (0 = byte, 1 = short, 2 = long) */           -2,                            /* size (0 = byte, 1 = short, 2 = long) */
290           16,                            /* bitsize */           16,                            /* bitsize */
291           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
292           6,                             /* bitpos */           6,                             /* bitpos */
293           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
294           glob16_reloc,                  /* special_function */           glob16_reloc,                  /* special_function */
295           "PPN16B",                      /* name */           "PPN16B",                      /* name */
296           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
297           0x3ffc0,                       /* src_mask */           0x3ffc0,                       /* src_mask */
298           0x3ffc0,                       /* dst_mask */           0x3ffc0,                       /* dst_mask */
299           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
300    
301    HOWTO (R_PPLN15,                      /* type */    HOWTO (R_PPLN15,                      /* type */
302           0,                             /* rightshift */           0,                             /* rightshift */
303           -2,                            /* size (0 = byte, 1 = short, 2 = long) */           -2,                            /* size (0 = byte, 1 = short, 2 = long) */
304           15,                            /* bitsize */           15,                            /* bitsize */
305           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
306           0,                             /* bitpos */           0,                             /* bitpos */
307           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
308           NULL,                          /* special_function */           NULL,                          /* special_function */
309           "PPLN15",                      /* name */           "PPLN15",                      /* name */
310           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
311           0x7fff,                        /* src_mask */           0x7fff,                        /* src_mask */
312           0x7fff,                        /* dst_mask */           0x7fff,                        /* dst_mask */
313           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
314    
315    HOWTO (R_PPLN15W,                     /* type */    HOWTO (R_PPLN15W,                     /* type */
316           2,                             /* rightshift */           2,                             /* rightshift */
317           -2,                            /* size (0 = byte, 1 = short, 2 = long) */           -2,                            /* size (0 = byte, 1 = short, 2 = long) */
318           15,                            /* bitsize */           15,                            /* bitsize */
319           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
320           0,                             /* bitpos */           0,                             /* bitpos */
321           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
322           NULL,                          /* special_function */           NULL,                          /* special_function */
323           "PPLN15W",                     /* name */           "PPLN15W",                     /* name */
324           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
325           0x7fff,                        /* src_mask */           0x7fff,                        /* src_mask */
326           0x7fff,                        /* dst_mask */           0x7fff,                        /* dst_mask */
327           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
328    
329    HOWTO (R_PPLN15H,                     /* type */    HOWTO (R_PPLN15H,                     /* type */
330           1,                             /* rightshift */           1,                             /* rightshift */
331           -2,                            /* size (0 = byte, 1 = short, 2 = long) */           -2,                            /* size (0 = byte, 1 = short, 2 = long) */
332           15,                            /* bitsize */           15,                            /* bitsize */
333           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
334           0,                             /* bitpos */           0,                             /* bitpos */
335           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
336           NULL,                          /* special_function */           NULL,                          /* special_function */
337           "PPLN15H",                     /* name */           "PPLN15H",                     /* name */
338           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
339           0x7fff,                        /* src_mask */           0x7fff,                        /* src_mask */
340           0x7fff,                        /* dst_mask */           0x7fff,                        /* dst_mask */
341           false),                        /* pcrel_offset */           FALSE),                        /* pcrel_offset */
342    
343    HOWTO (R_PPLN16B,                     /* type */    HOWTO (R_PPLN16B,                     /* type */
344           0,                             /* rightshift */           0,                             /* rightshift */
345           -2,                            /* size (0 = byte, 1 = short, 2 = long) */           -2,                            /* size (0 = byte, 1 = short, 2 = long) */
346           15,                            /* bitsize */           15,                            /* bitsize */
347           false,                         /* pc_relative */           FALSE,                         /* pc_relative */
348           0,                             /* bitpos */           0,                             /* bitpos */
349           complain_overflow_dont,        /* complain_on_overflow */           complain_overflow_dont,        /* complain_on_overflow */
350           local16_reloc,                 /* special_function */           local16_reloc,                 /* special_function */
351           "PPLN16B",                     /* name */           "PPLN16B",                     /* name */
352           true,                          /* partial_inplace */           TRUE,                          /* partial_inplace */
353           0xffff,                        /* src_mask */           0xffff,                        /* src_mask */
354           0xffff,                        /* dst_mask */           0xffff,                        /* dst_mask */
355           false)                         /* pcrel_offset */           FALSE)                         /* pcrel_offset */
356  };  };
357    
358  /* Special relocation functions, used when the output file is not  /* Special relocation functions, used when the output file is not
# Line 485  coff_tic80_rtype_to_howto (abfd, sec, re Line 486  coff_tic80_rtype_to_howto (abfd, sec, re
486  /* We need a special relocation routine to handle the PP relocs.  Most  /* We need a special relocation routine to handle the PP relocs.  Most
487     of this is a copy of _bfd_coff_generic_relocate_section.  */     of this is a copy of _bfd_coff_generic_relocate_section.  */
488    
489  static boolean  static bfd_boolean
490  coff_tic80_relocate_section (output_bfd, info, input_bfd,  coff_tic80_relocate_section (output_bfd, info, input_bfd,
491                               input_section, contents, relocs, syms,                               input_section, contents, relocs, syms,
492                               sections)                               sections)
# Line 540  coff_tic80_relocate_section (output_bfd, Line 541  coff_tic80_relocate_section (output_bfd,
541        howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h,        howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h,
542                                         sym, &addend);                                         sym, &addend);
543        if (howto == NULL)        if (howto == NULL)
544          return false;          return FALSE;
545    
546        val = 0;        val = 0;
547    
# Line 576  coff_tic80_relocate_section (output_bfd, Line 577  coff_tic80_relocate_section (output_bfd,
577                       + sec->output_offset);                       + sec->output_offset);
578                }                }
579    
580            else if (! info->relocateable)            else if (! info->relocatable)
581              {              {
582                if (! ((*info->callbacks->undefined_symbol)                if (! ((*info->callbacks->undefined_symbol)
583                       (info, h->root.root.string, input_bfd, input_section,                       (info, h->root.root.string, input_bfd, input_section,
584                        rel->r_vaddr - input_section->vma, true)))                        rel->r_vaddr - input_section->vma, TRUE)))
585                  return false;                  return FALSE;
586              }              }
587          }          }
588    
# Line 683  coff_tic80_relocate_section (output_bfd, Line 684  coff_tic80_relocate_section (output_bfd,
684            break;            break;
685          case bfd_reloc_outofrange:          case bfd_reloc_outofrange:
686            (*_bfd_error_handler)            (*_bfd_error_handler)
687              (_("%s: bad reloc address 0x%lx in section `%s'"),              (_("%B: bad reloc address 0x%lx in section `%A'"),
688               bfd_archive_filename (input_bfd),               input_bfd, input_section, (unsigned long) rel->r_vaddr);
689               (unsigned long) rel->r_vaddr,            return FALSE;
              bfd_get_section_name (input_bfd, input_section));  
           return false;  
690          case bfd_reloc_overflow:          case bfd_reloc_overflow:
691            {            {
692              const char *name;              const char *name;
# Line 696  coff_tic80_relocate_section (output_bfd, Line 695  coff_tic80_relocate_section (output_bfd,
695              if (symndx == -1)              if (symndx == -1)
696                name = "*ABS*";                name = "*ABS*";
697              else if (h != NULL)              else if (h != NULL)
698                name = h->root.root.string;                name = NULL;
699              else              else
700                {                {
701                  name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);                  name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
702                  if (name == NULL)                  if (name == NULL)
703                    return false;                    return FALSE;
704                }                }
705    
706              if (! ((*info->callbacks->reloc_overflow)              if (! ((*info->callbacks->reloc_overflow)
707                     (info, name, howto->name, (bfd_vma) 0, input_bfd,                     (info, (h ? &h->root : NULL), name, howto->name,
708                      input_section, rel->r_vaddr - input_section->vma)))                      (bfd_vma) 0, input_bfd, input_section,
709                return false;                      rel->r_vaddr - input_section->vma)))
710                  return FALSE;
711            }            }
712          }          }
713      }      }
714    return true;    return TRUE;
715  }  }
716    
717    /* Clear the r_reserved field in relocs.  */
718    #define SWAP_OUT_RELOC_EXTRA(abfd,src,dst) \
719      do \
720        { \
721          dst->r_reserved[0] = 0; \
722          dst->r_reserved[1] = 0; \
723        } \
724      while (0)
725    
726  #define TIC80COFF 1             /* Customize coffcode.h */  #define TIC80COFF 1             /* Customize coffcode.h */
727  #undef C_AUTOARG                /* Clashes with TIc80's C_UEXT */  #undef C_AUTOARG                /* Clashes with TIc80's C_UEXT */
728  #undef C_LASTENT                /* Clashes with TIc80's C_STATLAB */  #undef C_LASTENT                /* Clashes with TIc80's C_STATLAB */
729  #include "coffcode.h"  #include "coffcode.h"
730    
731  CREATE_LITTLE_COFF_TARGET_VEC (tic80coff_vec, "coff-tic80", D_PAGED, 0, '_', NULL)  CREATE_LITTLE_COFF_TARGET_VEC (tic80coff_vec, "coff-tic80", D_PAGED, 0, '_', NULL, COFF_SWAP_TABLE)

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.1.20.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26