OLD | NEW |
1 /* BFD back-end for ns32k a.out-ish binaries. | 1 /* BFD back-end for ns32k a.out-ish binaries. |
2 Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 1999, 2000, 2001, | 2 Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
3 2002, 2003, 2005, 2006, 2007, 2010 Free Software Foundation, Inc. | 3 2002, 2003, 2005, 2006, 2007, 2010, 2012 Free Software Foundation, Inc. |
4 Contributed by Ian Dall (idall@eleceng.adelaide.edu.au). | 4 Contributed by Ian Dall (idall@eleceng.adelaide.edu.au). |
5 | 5 |
6 This file is part of BFD, the Binary File Descriptor library. | 6 This file is part of BFD, the Binary File Descriptor library. |
7 | 7 |
8 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 |
9 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 |
10 the Free Software Foundation; either version 3 of the License, or | 10 the Free Software Foundation; either version 3 of the License, or |
11 (at your option) any later version. | 11 (at your option) any later version. |
12 | 12 |
13 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, |
14 but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 GNU General Public License for more details. | 16 GNU General Public License for more details. |
17 | 17 |
18 You should have received a copy of the GNU General Public License | 18 You should have received a copy of the GNU General Public License |
19 along with this program; if not, write to the Free Software | 19 along with this program; if not, write to the Free Software |
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | 20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
21 MA 02110-1301, USA. */ | 21 MA 02110-1301, USA. */ |
22 | 22 |
| 23 #include "sysdep.h" |
23 #include "bfd.h" | 24 #include "bfd.h" |
24 #include "aout/aout64.h" | 25 #include "aout/aout64.h" |
25 #include "ns32k.h" | 26 #include "ns32k.h" |
26 | 27 |
27 /* Do not "beautify" the CONCAT* macro args. Traditional C will not | 28 /* Do not "beautify" the CONCAT* macro args. Traditional C will not |
28 remove whitespace added here, and thus will fail to concatenate | 29 remove whitespace added here, and thus will fail to concatenate |
29 the tokens. */ | 30 the tokens. */ |
30 #define MYNS(OP) CONCAT2 (ns32kaout_,OP) | 31 #define MYNS(OP) CONCAT2 (ns32kaout_,OP) |
31 | 32 |
32 reloc_howto_type * MYNS (bfd_reloc_type_lookup) (bfd *, bfd_reloc_code_real_type
); | 33 reloc_howto_type * MYNS (bfd_reloc_type_lookup) (bfd *, bfd_reloc_code_real_type
); |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 297 |
297 /* Name was clobbered by aout_write_syms to be symbol index. */ | 298 /* Name was clobbered by aout_write_syms to be symbol index. */ |
298 | 299 |
299 /* If this relocation is relative to a symbol then set the | 300 /* If this relocation is relative to a symbol then set the |
300 r_index to the symbols index, and the r_extern bit. | 301 r_index to the symbols index, and the r_extern bit. |
301 | 302 |
302 Absolute symbols can come in in two ways, either as an offset | 303 Absolute symbols can come in in two ways, either as an offset |
303 from the abs section, or as a symbol which has an abs value. | 304 from the abs section, or as a symbol which has an abs value. |
304 Check for that here. */ | 305 Check for that here. */ |
305 if (bfd_is_com_section (output_section) | 306 if (bfd_is_com_section (output_section) |
306 || output_section == &bfd_abs_section | 307 || bfd_is_abs_section (output_section) |
307 || output_section == &bfd_und_section) | 308 || bfd_is_und_section (output_section)) |
308 { | 309 { |
309 if (bfd_abs_section.symbol == sym) | 310 if (bfd_abs_section_ptr->symbol == sym) |
310 { | 311 { |
311 /* Whoops, looked like an abs symbol, but is really an offset | 312 /* Whoops, looked like an abs symbol, but is really an offset |
312 from the abs section. */ | 313 from the abs section. */ |
313 r_index = 0; | 314 r_index = 0; |
314 r_extern = 0; | 315 r_extern = 0; |
315 } | 316 } |
316 else | 317 else |
317 { | 318 { |
318 /* Fill in symbol. */ | 319 /* Fill in symbol. */ |
319 r_extern = 1; | 320 r_extern = 1; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 break; | 356 break; |
356 case 2: | 357 case 2: |
357 return _bfd_relocate_contents (howto, input_bfd, relocation, | 358 return _bfd_relocate_contents (howto, input_bfd, relocation, |
358 location); | 359 location); |
359 default: | 360 default: |
360 return bfd_reloc_notsupported; | 361 return bfd_reloc_notsupported; |
361 } | 362 } |
362 return _bfd_do_ns32k_reloc_contents (howto, input_bfd, relocation, | 363 return _bfd_do_ns32k_reloc_contents (howto, input_bfd, relocation, |
363 location, get_data, put_data); | 364 location, get_data, put_data); |
364 } | 365 } |
OLD | NEW |