OLD | NEW |
1 /* BFD back-end for ARM COFF files. | 1 /* BFD back-end for ARM COFF files. |
2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | 3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 |
4 Free Software Foundation, Inc. | 4 Free Software Foundation, Inc. |
5 Written by Cygnus Support. | 5 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 asection *input_section, | 592 asection *input_section, |
593 bfd *output_bfd, | 593 bfd *output_bfd, |
594 char **error_message ATTRIBUTE_UNUSED) | 594 char **error_message ATTRIBUTE_UNUSED) |
595 { | 595 { |
596 bfd_vma relocation; | 596 bfd_vma relocation; |
597 bfd_size_type addr = reloc_entry->address; | 597 bfd_size_type addr = reloc_entry->address; |
598 long target = bfd_get_32 (abfd, (bfd_byte *) data + addr); | 598 long target = bfd_get_32 (abfd, (bfd_byte *) data + addr); |
599 bfd_reloc_status_type flag = bfd_reloc_ok; | 599 bfd_reloc_status_type flag = bfd_reloc_ok; |
600 | 600 |
601 /* If this is an undefined symbol, return error. */ | 601 /* If this is an undefined symbol, return error. */ |
602 if (symbol->section == &bfd_und_section | 602 if (bfd_is_und_section (symbol->section) |
603 && (symbol->flags & BSF_WEAK) == 0) | 603 && (symbol->flags & BSF_WEAK) == 0) |
604 return output_bfd ? bfd_reloc_continue : bfd_reloc_undefined; | 604 return output_bfd ? bfd_reloc_continue : bfd_reloc_undefined; |
605 | 605 |
606 /* If the sections are different, and we are doing a partial relocation, | 606 /* If the sections are different, and we are doing a partial relocation, |
607 just ignore it for now. */ | 607 just ignore it for now. */ |
608 if (symbol->section->name != input_section->name | 608 if (symbol->section->name != input_section->name |
609 && output_bfd != (bfd *)NULL) | 609 && output_bfd != (bfd *)NULL) |
610 return bfd_reloc_continue; | 610 return bfd_reloc_continue; |
611 | 611 |
612 relocation = (target & 0x00ffffff) << 2; | 612 relocation = (target & 0x00ffffff) << 2; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 dstmsk = 0x07ff07ff; | 680 dstmsk = 0x07ff07ff; |
681 offmsk = 0x007fffff; | 681 offmsk = 0x007fffff; |
682 signbit = 0x00400000; | 682 signbit = 0x00400000; |
683 break; | 683 break; |
684 | 684 |
685 default: | 685 default: |
686 abort (); | 686 abort (); |
687 } | 687 } |
688 | 688 |
689 /* If this is an undefined symbol, return error. */ | 689 /* If this is an undefined symbol, return error. */ |
690 if (symbol->section == &bfd_und_section | 690 if (bfd_is_und_section (symbol->section) |
691 && (symbol->flags & BSF_WEAK) == 0) | 691 && (symbol->flags & BSF_WEAK) == 0) |
692 return output_bfd ? bfd_reloc_continue : bfd_reloc_undefined; | 692 return output_bfd ? bfd_reloc_continue : bfd_reloc_undefined; |
693 | 693 |
694 /* If the sections are different, and we are doing a partial relocation, | 694 /* If the sections are different, and we are doing a partial relocation, |
695 just ignore it for now. */ | 695 just ignore it for now. */ |
696 if (symbol->section->name != input_section->name | 696 if (symbol->section->name != input_section->name |
697 && output_bfd != (bfd *)NULL) | 697 && output_bfd != (bfd *)NULL) |
698 return bfd_reloc_continue; | 698 return bfd_reloc_continue; |
699 | 699 |
700 switch (btype) | 700 switch (btype) |
(...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2559 #define EXTRA_S_FLAGS SEC_CODE | 2559 #define EXTRA_S_FLAGS SEC_CODE |
2560 #endif | 2560 #endif |
2561 #endif | 2561 #endif |
2562 | 2562 |
2563 /* Forward declaration for use initialising alternative_target field. */ | 2563 /* Forward declaration for use initialising alternative_target field. */ |
2564 extern const bfd_target TARGET_BIG_SYM ; | 2564 extern const bfd_target TARGET_BIG_SYM ; |
2565 | 2565 |
2566 /* Target vectors. */ | 2566 /* Target vectors. */ |
2567 CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, E
XTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM, COFF_SWAP_TABLE) | 2567 CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED, E
XTRA_S_FLAGS, TARGET_UNDERSCORE, & TARGET_BIG_SYM, COFF_SWAP_TABLE) |
2568 CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FL
AGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM, COFF_SWAP_TABLE) | 2568 CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED, EXTRA_S_FL
AGS, TARGET_UNDERSCORE, & TARGET_LITTLE_SYM, COFF_SWAP_TABLE) |
OLD | NEW |